Skip to content

Implement startApplicationTest from emberjs/rfcs#268.#302

Merged
rwjblue merged 4 commits intomasterfrom
application-tests
Dec 17, 2017
Merged

Implement startApplicationTest from emberjs/rfcs#268.#302
rwjblue merged 4 commits intomasterfrom
application-tests

Conversation

@rwjblue
Copy link
Member

@rwjblue rwjblue commented Dec 16, 2017

Implements the startApplicationTest API proposed by emberjs/rfcs#268.

@rwjblue rwjblue requested a review from Turbo87 December 16, 2017 18:43
@rwjblue
Copy link
Member Author

rwjblue commented Dec 17, 2017

Once this lands, normal application acceptance tests will look like (demo uses qunit-dom because its awesome):

import { module, test } from 'qunit';
import { visit, click } from '@ember/test-helpers';
import { setupApplicationTest } from 'ember-qunit';

module('my awesome feature', function(hooks) {
  setupApplicationTest(hooks);

  test('can click on the button', async function(assert) {
    await visit('/whatever/route');
    
    assert.dom('.counter').hasText('0');

    await click('.increment-counter');

    assert.dom('.counter').hasText('1');
  });
});

@rwjblue rwjblue merged commit 39f1ac6 into master Dec 17, 2017
@rwjblue rwjblue deleted the application-tests branch December 17, 2017 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants