When writing acceptance tests for our application, we use ember generate to stub out the test (ember generate acceptance-test <name>
).
The next step is typically to modify the generated test to call ember-simple-auth-testing's authenticateSession()
in the module block (and most likely perform some setup with ember-data-factory-guy).
What I would like to do is make a slight tweak to the acceptance-test blueprint's template, however I can't seem to find any documentation on how to extend blueprints.
Does anyone know if any such documentation exists, or how I might go about doing this?
Thanks!
You can't extend one, but you can overwrite one. From the Ember CLI docs on blueprints:
Blueprints in your project’s directory take precedence over those packaged with ember-cli. This makes it easy to override the built-in blueprints just by generating one with the same name.
So just run the following command, then modify the templates as you see fit:
ember generate blueprint acceptance-test
You can find the Ember CLI acceptance-test blueprint here. That should be a good reference for writing yours. Also be sure to read the entire section on blueprints in the documentation that I linked to — that should get you familiar with how to write a blueprint.
There is an issue under ember-cli/blueprint about the possibility of supporting 'extend' for blueprints.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With