fix: make sure redirects to a saved view work as intended
This commit is contained in:
parent
24b4576c00
commit
a64c0c19e5
@ -35,9 +35,11 @@ describe('Projects', () => {
|
||||
})
|
||||
|
||||
it('Should redirect to a specific project view after visited', () => {
|
||||
cy.intercept(Cypress.env('API_URL') + '/projects/*/buckets*').as('loadBuckets')
|
||||
cy.visit('/projects/1/kanban')
|
||||
cy.url()
|
||||
.should('contain', '/projects/1/kanban')
|
||||
cy.wait('@loadBuckets')
|
||||
cy.visit('/projects/1')
|
||||
cy.url()
|
||||
.should('contain', '/projects/1/kanban')
|
||||
|
@ -90,7 +90,7 @@ export const getProjectView = (projectId: IProject['id']) => {
|
||||
}
|
||||
|
||||
const projectViewSettings = JSON.parse(projectViewSettingsString) as ProjectViewSettings
|
||||
if (router.hasRoute(projectViewSettings[projectId])) {
|
||||
if (!router.hasRoute(projectViewSettings[projectId])) {
|
||||
throw new Error()
|
||||
}
|
||||
return projectViewSettings[projectId]
|
||||
|
Loading…
x
Reference in New Issue
Block a user