-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement acceptance-test blueprint for RFC268.
- Loading branch information
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
blueprints/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { module, test } from 'qunit'; | ||
import { visit, currentURL } from '@ember/test-helpers'; | ||
import { setupApplicationTest } from 'ember-qunit'; | ||
|
||
module('<%= friendlyTestName %>', function(hooks) { | ||
setupApplicationTest(hooks); | ||
|
||
test('visiting /<%= dasherizedModuleName %>', async function(assert) { | ||
await visit('/<%= dasherizedModuleName %>'); | ||
|
||
assert.equal(currentURL(), '/<%= dasherizedModuleName %>'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,19 @@ describe('Blueprint: acceptance-test', function() { | |
}); | ||
}); | ||
|
||
describe('with [email protected]', function() { | ||
beforeEach(function() { | ||
generateFakePackageManifest('ember-cli-qunit', '4.1.1'); | ||
}); | ||
|
||
it('acceptance-test foo', function() { | ||
return emberGenerateDestroy(['acceptance-test', 'foo'], _file => { | ||
expect(_file('tests/acceptance/foo-test.js')) | ||
.to.equal(fixture('acceptance-test/qunit-rfc268.js')); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('with ember-cli-mocha', function() { | ||
beforeEach(function() { | ||
return modifyPackages([ | ||
|
@@ -69,5 +82,18 @@ describe('Blueprint: acceptance-test', function() { | |
.to.not.exist; | ||
}); | ||
}); | ||
|
||
describe('with [email protected]', function() { | ||
beforeEach(function() { | ||
generateFakePackageManifest('ember-cli-qunit', '4.1.1'); | ||
}); | ||
|
||
it('acceptance-test foo', function() { | ||
return emberGenerateDestroy(['acceptance-test', 'foo'], _file => { | ||
expect(_file('tests/acceptance/foo-test.js')) | ||
.to.equal(fixture('acceptance-test/qunit-rfc268.js')); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { module, test } from 'qunit'; | ||
import { visit, currentURL } from '@ember/test-helpers'; | ||
import { setupApplicationTest } from 'ember-qunit'; | ||
|
||
module('Acceptance | foo', function(hooks) { | ||
setupApplicationTest(hooks); | ||
|
||
test('visiting /foo', async function(assert) { | ||
await visit('/foo'); | ||
|
||
assert.equal(currentURL(), '/foo'); | ||
}); | ||
}); |