feature/rename-lists-to-projects__rebased #2978

Merged
konrad merged 15 commits from dpschen/frontend:feature/rename-lists-to-projects__rebased into main 2023-03-14 14:04:25 +00:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 6507066f0f - Show all commits

View File

@ -35,9 +35,11 @@ describe('Projects', () => {
}) })
it('Should redirect to a specific project view after visited', () => { 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.visit('/projects/1/kanban')
cy.url() cy.url()
.should('contain', '/projects/1/kanban') .should('contain', '/projects/1/kanban')
cy.wait('@loadBuckets')
cy.visit('/projects/1') cy.visit('/projects/1')
cy.url() cy.url()
.should('contain', '/projects/1/kanban') .should('contain', '/projects/1/kanban')

View File

@ -90,7 +90,7 @@ export const getProjectView = (projectId: IProject['id']) => {
} }
const projectViewSettings = JSON.parse(projectViewSettingsString) as ProjectViewSettings const projectViewSettings = JSON.parse(projectViewSettingsString) as ProjectViewSettings
if (router.hasRoute(projectViewSettings[projectId])) { if (!router.hasRoute(projectViewSettings[projectId])) {
throw new Error() throw new Error()
} }
return projectViewSettings[projectId] return projectViewSettings[projectId]