Skip to content

dexturr/acceptance-test-blueprint

Repository files navigation

Acceptance Test Blueprint

The purpose of this repository is to demonstrate how to override the default acceptance test blueprint in order to provide custom test setup and avoid blueprint code.

In the tests folder there is a helper which performs our custom setup logic. The idea is that this provides all the boiler plate setup for each test, for example if using ember-simple-auth or ember-cli-mirage as well then we could perform test setup for these in here.

The blueprints folder contains the actual logic which performs the actual overriding of the acceptance-test blueprint. If your helper is also named setup-application-test you can just copy the entire blueprints folder into your project.

Usage

To use this pattern:

  • Create your own setup-application-test.js helper in the tests folder
  • Copy the acceptance-test blueprint into your project (if you have named your helper setup-application-test you can just copy the blueprints folder into your project).

Thats it!

Try out ember g acceptance-test foo and observe the text in the acceptance test blueprint is now based off our blueprint file and includes our helper!

About

A demonstration of how to override the acceptance-test blueprint in Ember

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published