Router: Replace landing with catch-all route

This also mitigates the issue where clicking the image-builder nav link
would redirect you to `image-builder/image-builder` if image-builder was
already opened. And `/` didn't catch that path.
This commit is contained in:
Sanne Raymaekers 2021-11-30 15:25:28 +01:00 committed by jkozol
parent 4d987eb05e
commit 6567323ef6
3 changed files with 6 additions and 7 deletions

View file

@ -23,7 +23,7 @@ function verifyButtons() {
function verifyCancelButton(cancel, history) {
cancel.click();
expect(history.location.pathname).toBe('/landing');
expect(history.location.pathname).toBe('/');
}
// packages
@ -860,7 +860,7 @@ describe('Click through all steps', () => {
await expect(composeImage).toHaveBeenCalledTimes(3);
// returns back to the landing page
await waitFor(() => expect(history.location.pathname).toBe('/landing'));
await waitFor(() => expect(history.location.pathname).toBe('/'));
expect(store.getStore().getState().composes.allIds).toEqual(ids);
});