Open jfmengels opened 2 years ago
ensurePageChange
is meant for when you clicked a link that your app doesn't handle, so the browser is handling it and navigating you to a new URL, so this would correspond to the Elm app being destroyed!
ensureBrowserUrl
/ expectBrowserUrl
instead.ensureViewHas [ tag "a", attribute (href "href"), containing [ text "Text" ]
|> Expect.all
[ ProgramTest.clickLink "Text" "href"
>> ProgramTest.ensurePageChange "/href"
, ... more stuff ...
]
There is a
expectPageChange
function in the API, but there is noensurePageChange
.Context
We would like to have a test that asserts the flow of multiple pages, and the flow includes a click on a link.
Is there a limitation in the framework to do this, or is it counter to the philosophy of the tool?