Closed deonclem closed 8 years ago
Hi @deonclem . I haven't tried this myself, but here is something I think should work:
Have you tried splitting each new page load into separate tests? Something similar to this were each "get()" call would be a call to a new URL. This way the mocks can be setup before the page is loaded for each URL. Note: if you have the same mocks for all URLs, you can put the "mock(...)" call in a "beforeEach()".
Let me know how it goes.
If I'm inside a test and manually update the url (using
browser.get(path)
), all the mocked calls aren't working anymore and I get a bunch of 404's instead. Same problem withbrowser.navigate().refresh()
I might be missing something but is there a way around this ? I need to reload my page with different url params to test different scenarios but I can't achieve that.