This addon provides and registers test helpers for use in the testing of your application.
clickAndAssertPath(assert, selector, expectedPath);
Click on the element specified by selector
and assert that it has transitioned to route expectedPath
.
// Example:
clickAndAssertPath(assert, 'button', 'other.route');
visitAndAssertPath(assert, path, expectedPath);
Visit path and assert that it has transitioned to route expectedPath
.
// Example:
visitAndAssertPath(assert, '/a/path', 'a.path');
visitAndAssertPath(assert, '/will/redirect', 'expected.route');
ember install flos-ember-test-helpers
For each test helper you wish to use, you will need to import them.
- Add
import './flos-test-helpers/click-and-assert-path';
to the beginning of thetests/helpers/start-app.js
file - Add
import './flos-test-helpers/visit-and-assert-path';
to the beginning of thetests/helpers/start-app.js
file - Ignore globals in eslint / jshint
- Add
"clickAndAssertPath": true,
to the globals section of the.eslintrc
- Add "clickAndAssertPath", to the predef section of the
/tests/.jshintrc
file
- Add