From ef0fe0b11d8cedd9222298f8dfe401949302238e Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 13 Jul 2022 17:00:38 +0200 Subject: [PATCH] fix(tests): correctly set task position in cypress test fixtures --- cypress/e2e/list/list-view-list.spec.ts | 8 +++++--- cypress/factories/task.ts | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/list/list-view-list.spec.ts b/cypress/e2e/list/list-view-list.spec.ts index 7a8564348..c637cc237 100644 --- a/cypress/e2e/list/list-view-list.spec.ts +++ b/cypress/e2e/list/list-view-list.spec.ts @@ -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) }) }) \ No newline at end of file diff --git a/cypress/factories/task.ts b/cypress/factories/task.ts index febc01da6..46c8e8654 100644 --- a/cypress/factories/task.ts +++ b/cypress/factories/task.ts @@ -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) }