fix(views): make table view cypress tests work again

This commit is contained in:
kolaente 2024-03-19 14:43:52 +01:00
parent 974c9cdd21
commit b65d05ec3d
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 3 deletions

View File

@ -1,13 +1,15 @@
import {createFakeUserAndLogin} from '../../support/authenticateUser' import {createFakeUserAndLogin} from '../../support/authenticateUser'
import {TaskFactory} from '../../factories/task' import {TaskFactory} from '../../factories/task'
import {prepareProjects} from './prepareProjects'
describe('Project View Table', () => { describe('Project View Table', () => {
createFakeUserAndLogin() createFakeUserAndLogin()
prepareProjects()
it('Should show a table with tasks', () => { it('Should show a table with tasks', () => {
const tasks = TaskFactory.create(1) const tasks = TaskFactory.create(1)
cy.visit('/projects/1/table') cy.visit('/projects/1/3')
cy.get('.project-table table.table') cy.get('.project-table table.table')
.should('exist') .should('exist')
@ -17,7 +19,7 @@ describe('Project View Table', () => {
it('Should have working column switches', () => { it('Should have working column switches', () => {
TaskFactory.create(1) TaskFactory.create(1)
cy.visit('/projects/1/table') cy.visit('/projects/1/3')
cy.get('.project-table .filter-container .items .button') cy.get('.project-table .filter-container .items .button')
.contains('Columns') .contains('Columns')
@ -42,7 +44,7 @@ describe('Project View Table', () => {
id: '{increment}', id: '{increment}',
project_id: 1, project_id: 1,
}) })
cy.visit('/projects/1/table') cy.visit('/projects/1/3')
cy.get('.project-table table.table') cy.get('.project-table table.table')
.contains(tasks[0].title) .contains(tasks[0].title)