elm-program-test icon indicating copy to clipboard operation
elm-program-test copied to clipboard

Add support for navigation (back, forward)

Open avh4 opened this issue 6 years ago • 1 comments

The browser history is already maintained in the ProgramTest model (inspectable with expectBrowserUrl and expectBrowserHistory). This issue would add back and forward to SimulatedEffect.Navigation to parallel the functions in https://package.elm-lang.org/packages/elm/browser/latest/Browser-Navigation . Simulating those events should have the effect of calling routeChangeHelper with the new URL if the action can be performed, or failing the test if not.

Implementing forward will require adding the forward "history" to the ProgramTest model.

If you are looking to contribute, feel free to make a PR that only implements one of these functions. This is marked "good first issue", but you'd need to have a good understanding of using elm-program-test and of https://elm-program-test.netlify.com/cmds.html or else this probably won't be easy.

avh4 avatar Jun 27 '19 05:06 avh4

Back is done in #94

brookeangel avatar Jan 21 '20 22:01 brookeangel