fix(tests): correctly set task position in cypress test fixtures

This commit is contained in:
kolaente 2022-07-13 17:00:38 +02:00
parent 99cd68ad43
commit ef0fe0b11d
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 6 additions and 3 deletions

View file

@ -91,7 +91,9 @@ describe('List View List', () => {
cy.visit('/lists/1/list') cy.visit('/lists/1/list')
cy.get('.tasks-container .tasks') cy.get('.tasks-container .tasks')
.should('contain', tasks[99].title) .should('contain', tasks[1].title)
cy.get('.tasks-container .tasks')
.should('not.contain', tasks[99].title)
cy.get('.card-content .pagination .pagination-link') cy.get('.card-content .pagination .pagination-link')
.contains('2') .contains('2')
@ -100,8 +102,8 @@ describe('List View List', () => {
cy.url() cy.url()
.should('contain', '?page=2') .should('contain', '?page=2')
cy.get('.tasks-container .tasks') cy.get('.tasks-container .tasks')
.should('contain', tasks[1].title) .should('contain', tasks[99].title)
cy.get('.tasks-container .tasks') cy.get('.tasks-container .tasks')
.should('not.contain', tasks[99].title) .should('not.contain', tasks[1].title)
}) })
}) })

View file

@ -15,6 +15,7 @@ export class TaskFactory extends Factory {
list_id: 1, list_id: 1,
created_by_id: 1, created_by_id: 1,
index: '{increment}', index: '{increment}',
position: '{increment}',
created: formatISO(now), created: formatISO(now),
updated: formatISO(now) updated: formatISO(now)
} }