Skip to content

Commit a4958f2

Browse files
authored
improve documentation in readme
1 parent f862949 commit a4958f2

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ember-cli-browser-navigation-button-test-helper
2-
[![Build Status](https://travis-ci.org/jelhan/ember-cli-browser-navigation-button-test-helpers.svg?branch=master)](https://travis-ci.org/jelhan/ember-cli-browser-navigation-button-test-helpers)
32

4-
Test helper to simulate browsers back and forward buttons in acceptance tests.
3+
Test helper to simulate browser's back and forward buttons in acceptance tests
4+
of Ember applications.
55

66
Compatibility
77
------------------------------------------------------------------------------
@@ -20,14 +20,20 @@ ember install ember-cli-browser-navigation-button-test-helper
2020
Usage
2121
------------------------------------------------------------------------------
2222

23-
This addon exportes three test helpers: `setupBrowserNavigationButtons()`, `backButton()` and `forwardButton()` from `ember-cli-browser-navigation-button-test-helper/test-support`. `setupBrowserNavigationButtons` should be called at the very beginning of every acceptance test which should use the later ones. It registers a service to manage history. The other two simulates clicks on browsers back and forward buttons.
23+
This addon exports three test helpers from `ember-cli-browser-navigation-button-test-helper/test-support`:
2424

25-
There is 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).
25+
- `setupBrowserNavigationButtons`,
26+
- `backButton` and
27+
- `forwardButton`.
2628

27-
Known limitations
28-
------------------------------------------------------------------------------
29+
`setupBrowserNavigationButtons` must be called in every acceptance test which
30+
uses `backButton` and `forwardButton` _before_ `visit()`. It registers a service
31+
to track and manage the history.
32+
33+
`backbutton` and `forwardButton` simulates the browser's back and forward
34+
buttons by firing a transition using `RouterService.transitionTo()`.
2935

30-
Support for old-style acceptance tests (before RFC #232 and #268) was dropped in `v0.1.0`. You could use `v0.0.5` if you need to support them, but this one does not support Ember 3.x.
36+
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).
3137

3238

3339
Contributing

0 commit comments

Comments
 (0)