avh4 / elm-program-test / SimulatedEffect.Navigation

This module parallels elm/browsers's Browser.Navigation module. Pull requests are welcome to add any functions that are missing.

The functions here produce SimulatedEffects instead of Cmds, which are meant to be used to help you implement the function to provide when using ProgramTest.withSimulatedEffects.

Navigate within Page

pushUrl : String -> ProgramTest.SimulatedEffect msg

Change the URL, but do not trigger a page load. This will add a new entry to the browser history.

replaceUrl : String -> ProgramTest.SimulatedEffect msg

Change the URL, but do not trigger a page load. This will not add a new entry to the browser history.

back : Basics.Int -> ProgramTest.SimulatedEffect msg

Go back some number of pages.

Navigate to other Pages

load : String -> ProgramTest.SimulatedEffect msg

Leave the current page and load the given URL.

reload : ProgramTest.SimulatedEffect msg

Reload the current page.

reloadAndSkipCache : ProgramTest.SimulatedEffect msg

Reload the current page without using the browser cache.