Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jelhan/ember-cli-browser-navigation-button-test-helpers
Test helper to simulate browser's back and forward buttons in acceptance tests of Ember applications.
https://github.com/jelhan/ember-cli-browser-navigation-button-test-helpers
ember ember-addons ember-testing test-helpers
Last synced: about 2 months ago
JSON representation
Test helper to simulate browser's back and forward buttons in acceptance tests of Ember applications.
- Host: GitHub
- URL: https://github.com/jelhan/ember-cli-browser-navigation-button-test-helpers
- Owner: jelhan
- License: mit
- Created: 2016-04-10T21:11:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-03T17:23:24.000Z (4 months ago)
- Last Synced: 2024-10-03T12:27:15.755Z (3 months ago)
- Topics: ember, ember-addons, ember-testing, test-helpers
- Language: JavaScript
- Homepage:
- Size: 961 KB
- Stars: 1
- Watchers: 3
- Forks: 5
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ember-cli-browser-navigation-button-test-helper
Test helper to simulate browser's back and forward buttons in acceptance tests
of Ember applications.Compatibility
------------------------------------------------------------------------------* Ember.js v3.20 or above
* Ember CLI v3.20 or above
* Node.js v12 or aboveInstallation
------------------------------------------------------------------------------```
ember install ember-cli-browser-navigation-button-test-helper
```Usage
------------------------------------------------------------------------------This addon exports three test helpers from `ember-cli-browser-navigation-button-test-helper/test-support`:
- `setupBrowserNavigationButtons`,
- `backButton` and
- `forwardButton`.`setupBrowserNavigationButtons` must be called in every acceptance test which
uses `backButton` and `forwardButton` _before_ `visit()`. It registers a service
to track and manage the history.`backbutton` and `forwardButton` simulates the browser's back and forward
buttons by firing a transition using `RouterService.transitionTo()`.Please find an usage example [in this acceptance test](https://github.com/jelhan/ember-cli-browser-navigation-button-test-helpers/blob/master/tests/acceptance/browser-navigation-buttons-test.js).
Contributing
------------------------------------------------------------------------------See the [Contributing](CONTRIBUTING.md) guide for details.
License
------------------------------------------------------------------------------This project is licensed under the [MIT License](LICENSE.md).