Questions tagged [ember-qunit]

Unit test helpers for Ember applications.

Ember-qunit is a tool design to enhance the ability to write unit tests for Ember applications.

Ember QUnit uses your application's resolver to find and automatically create test subjects for you with the moduleFor and test helpers.

See more:

160 questions
0
votes
1 answer

Ember Integration Test: Promise rejected before it renders

Strange error started occurring in my Ember.js (2.2) application. I created a new component that uses a global library (e.g. Bloodhound). Suddenly some of my other UNRELATED/UNTOUCHED component integration tests stopped working, returning the…
Dan
  • 1,955
  • 17
  • 21
0
votes
1 answer

Ember CLI model testing fails

Hi i'm trying to write first tests in Ember CLI. This is what my test looks like > ... > > moduleForModel('recipe/recipe', 'Recipe Model works', { > needs: ['model:recipe/recipe'] }); > test('Recipe is a valid ember-data Model', function…
kristjan reinhold
  • 2,038
  • 1
  • 17
  • 34
0
votes
0 answers

Ember JS | Qunit - Phantom JS Set called on already destroyed object

I am running into this weird problem, where Ember Qunit Tests pass successfully when I run a single module. But they fail when I run all modules test cases. The failure error looks like this set called on already destroyed object. Can someone…
Aditya Kappagantula
  • 564
  • 1
  • 7
  • 21
0
votes
1 answer

How to configure Ember 2.0 for Integration Testing

I created a sample ember-cli project using ember 1.13.5. I create one component and a dummy integration test. It runs just fine. import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('selected-product', 'Integration |…
anschoewe
  • 1,089
  • 1
  • 14
  • 34
0
votes
0 answers

Browserstack-runner tests are timing out with ember-qunit tests

I have an ember-cli project and all the tests are written using ember-qunit. I am using browserstack-runner to run the tests on Browserstack. browserstack-runner provides the plugin for qunit which I am using. Below is my browserstack.json { …
kushdilip
  • 7,606
  • 3
  • 24
  • 30
0
votes
0 answers

Acceptance tests aren't resetting

I have some acceptance tests that test a component. If I run each test separately, they pass just fine. However, when I run the tests together, they fail because they're retaining the values from the previous tests. Here is my…
NJP
  • 815
  • 1
  • 7
  • 20
0
votes
1 answer

How do I convert an Ember unit test using ObjectProxy to an integration test?

Before upgrading to Ember CLI 1.13.1 all components generated a unit test, if my component relied on a property I may have written something like: var supplier = var supplier = Ember.ObjectProxy.create({ ... }); // Creates the component…
Adam Knights
  • 2,141
  • 1
  • 25
  • 48
0
votes
0 answers

Wait for foundation modal dialog in acceptance test

During acceptance test, in order to simulate user interaction, the button on the foundation modal dialog should be clicked: test('sets correct country name after manual lookup', function(assert) { visit('/sign-in'); click('#country-name'); …
lessless
  • 866
  • 10
  • 27
0
votes
1 answer

Simple Ember component test with computed properties

I know this should be simple, I'm just not doing something right, and haven't found the example to mimic nor I guess do I fully understand what should go inside an Ember.run() Here is my component code: import Ember from 'ember'; export default…
redOctober13
  • 3,662
  • 6
  • 34
  • 61
0
votes
1 answer

Ember Testing: Why use Assert.?

I see a lot of examples (including ember-cli generated tests) that use assert.function() but I can use the function as is, so am I doing something wrong, or do examples just show not-really-necessary qualifiers? For example, either of these work in…
redOctober13
  • 3,662
  • 6
  • 34
  • 61
0
votes
1 answer

this.subject() returns already destroyed object at beginning of test

I have several qunit tests for my ember model. When I try to save my model, it raises Assertion Failed: calling set on destroyed object And when I run this this.subject().get('isDestroyed') it returns true. What is going on here?
Dodds_M
  • 9
  • 4
0
votes
1 answer

Ember.js dynamic routes not resolving in test, but work in production

So, I'm trying to use the Twitter-style URL syntax, allowing a user to go to example.com/quaunaut to visit the user page of the user with the username 'quaunaut'. I was able to accomplish this via: app/router.js export default Router.map(function()…
bravely
  • 185
  • 3
  • 12
0
votes
1 answer

Ember-cli customize test-body layout (content-for)

In the latest version of ember-cli-qunit, the test-body.html template looks like this...
Is there any way to customize…
sammy34
  • 5,312
  • 5
  • 29
  • 42
0
votes
0 answers

can't test ember component that appends a div to the dom

I have a ember-cli-addon that adds a component which appends a div with a specific class to the consuming application. I'm trying to test this integration and having difficulty to setup the test. I have tried to unit test the component as well but…
ashraf
  • 537
  • 7
  • 16
0
votes
1 answer

Why do I have to 'need' all models when testing models in ember

I have three entities Token - N:1 - User - N:1 - Company. I let ember-cli to generate model tests and all of them failed. Thats somehow expected, since when testing Token it should need User so I added user into needs. Whats mysterious to me is why…
Keo
  • 1,143
  • 8
  • 19
1 2 3
10
11