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
Signed by untrusted user: konrad
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.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')
.contains('2')
@ -100,8 +102,8 @@ describe('List View List', () => {
cy.url()
.should('contain', '?page=2')
cy.get('.tasks-container .tasks')
.should('contain', tasks[1].title)
.should('contain', tasks[99].title)
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,
created_by_id: 1,
index: '{increment}',
position: '{increment}',
created: formatISO(now),
updated: formatISO(now)
}