Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement startApplicationTest from emberjs/rfcs#268. #302

Merged
merged 4 commits into from
Dec 17, 2017

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