Repository navigation
Description
Background
We need to implement changes in blueprints and docs realted to RFC 232 and RFC 268.
(Some background for those unfamiliar http://rwjblue.com/2017/10/23/ember-qunit-simplication/)
As of ember-cli-qunit@^4.1.1 (which is in the default blueprint as of [email protected]), we can implement the "Simplified QUnit" style tests in all tests except for acceptance tests.
In a future release of ember-qunit (likely 3.2.x), we will be able to leverage the implementation of setupApplicationTest from RFC 268 for use in acceptance-tests. Once these changes are implemented upstream, we must implement the blueprint updates.
Currently, we have no way to generate these test files but we can run the ember-qunit-codemod to migrate test files and continue to iterate on the final output in the blueprint specific pull requests.
The desired behavior when generating testing blueprints is to, generate "Simplified QUnit" style tests if supported by the host app. We have several tasks below to extend the blueprints to support the "Simplified QUnit" style blueprints alongside the legacy, and ember-mocha blueprints. We can likely add to the behavior of test-framework-detector.js to support this other extension. Once these changes are completed we also need to update the guides to be consistent with the current ember-cli codebase. We should work with @rwjblue and the learning team (cc @locks) to determine how we best teach this.
Tasks
- (🔒 @Turbo87) Extend
test-framework-detector.jsto support a directory calledqunit-rfc-232-fileswhich will be where the "Simplified QUnit" blueprints will live in each of the blueprint test folders (e.gblueprints/component-test/qunit-rfc-232-files/). The decision to use thequnit-rfc-232-filesdirectory should be based on the host'sember-cli-qunit - Add
<type>-test"simplified QUnit" blueprints- acceptance-test - Update acceptance-test blueprint for RFC#268. #15999
- (🔒 @Turbo87) component-test
- (🔒 @snewcomer) controller-test
- (🔒 @snewcomer) helper-test
- (🔒 @snewcomer) initializer-test
- (🔒 @snewcomer) instance-initializer-test
- (🔒 @boyanyordanov) mixin-test
- (:lock: @rwwagner90) route-test
- (🔒 @boyanyordanov) service-test
- (🔒 @snewcomer) util-test
- (🔒 @alexander-alvarez) Extract the above tests blueprints into a standalone polyfill addon https://github.com/alexander-alvarez/ember-qunit-nested-module-blueprints-polyfill so developers can access the new testing blueprints regardless of what version of
ember-clithey are on (so long as they are runningember-cli-qunit@^4.1.1) - (:lock: @jessica-jordan) Update testing section in https://github.com/emberjs/guides to reflect new style (note this should land very close to when the changes above are implemented)
To pick up one of these items, please comment below and we'll update the checklist with :lock: @your-name-here...
Activity
rwjblue commentedon Dec 6, 2017
Awesome, thanks for organizing this @alexander-alvarez!
[-]Qunit Blueprints Quest Issue[/-][+]QUnit Blueprints Quest Issue[/+]Turbo87 commentedon Dec 6, 2017
@alexander-alvarez should we use
qunitfor the new API blueprints and something else instead ofqunitfor the old blueprints? this would seem more intuitive to me 🤔Turbo87 commentedon Dec 6, 2017
also I'm wondering if we should do the implementation in https://github.com/alexander-alvarez/ember-qunit-nested-module-blueprints-polyfill first and once those are solid we can import them here
rwjblue commentedon Dec 6, 2017
@Turbo87 - I'd prefer to land the "real" implementations first (so that the polyfill truly is a polyfill). If that turns out to be costly (or I'm too much of a blocker in landing PR's) we can swap to targeting the polyfill addon first...
rwjblue commentedon Dec 6, 2017
OK, first implementation is done and landed (along with the test framework detector changes required to support the path forward). The game is afoot!
snewcomer commentedon Dec 7, 2017
Doing the
helper-testright now.RobbieTheWagner commentedon Dec 7, 2017
@rwjblue I'm always happy to work on blueprints. Want to assign a couple my way?
Turbo87 commentedon Dec 7, 2017
@rwwagner90 choose one and announce it here, so that others are not doing the same work too :)
RobbieTheWagner commentedon Dec 7, 2017
@Turbo87 I'm not picky, but I'll randomly choose
route-testrwjblue commentedon Dec 7, 2017
Updated description:
route-testfor @rwwagner90helper-testcomponent-testsnewcomer commentedon Dec 7, 2017
Tackling controller && initializer && instance-initializer tests in 3 separate PR's!
137 remaining items
update(testing): upd. route testing section (emberjs/ember.js#15933)
update(testing): upd. model testing (emberjs/ember.js#15933)
update(testing): upd. testing introduction (emberjs/ember.js#15933)
update(testing): renames title of test. basics (emberjs/ember.js#15933)
update(testing): upd. acc. test code examples (emberjs/ember.js#15933)
update(testing): upd. unit testing section (emberjs/ember.js#15933)
update(testing): updates component section (emberjs/ember.js#15933)
update(testing): upd. helper testing section (emberjs/ember.js#15933)
update(testing): upd. controller section (emberjs/ember.js#15933)
update(testing): upd. route testing section (emberjs/ember.js#15933)
update(testing): upd. model testing (emberjs/ember.js#15933)
update(testing): upd. testing introduction (emberjs/ember.js#15933)
update(testing): renames title of test. basics (emberjs/ember.js#15933)
rwjblue commentedon Apr 21, 2018
Thanks everyone for your hard work here!