Test helper to simulate browsers back and forward buttons in acceptance tests.
ember install ember-cli-browser-navigation-button-test-helper
- Add
import registerBrowserNavigationButtons from './browser-navigation-buttons';
and a call ofregisterBrowserNavigationButtons();
beforeapplication.injectTestHelpers();
intests/helpers/start-app.js
. - Add
backButton
,forwardButton
andsetupBrowserNavigationButtons
as predef intests/.jshintrc
or as globals intests/.eslintrc
.
- Call
setupBrowserNavigationButtons();
at the start of your acceptance test. - Simulate back button clicks by
backButton();
. - Simpute forward button clicks by
forwardButton();
.
There is an usage example in this acceptance test.
For more information on using ember-cli, visit http://ember-cli.com/.