From 8a4e43fb96246841b01971f4e4e608f9bcd265f8 Mon Sep 17 00:00:00 2001 From: Claude Loop Date: Sun, 21 Sep 2025 07:27:28 +0000 Subject: [PATCH] fix: add loading state waits to navigation and task interaction tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add loading state waits to 'Marks a task as done' test - Add loading state waits to navigation tests: - 'provides back navigation to the project in the list view' - 'provides back navigation to the project in the table view' - 'provides back navigation to the project in the kanban view on mobile' - 'does not provide back navigation to the project in the kanban view on desktop' - These fixes prevent CypressError where task elements have CSS pointer-events: none - All tests now wait for .is-loading class removal before attempting element interactions - Comprehensive coverage of task interaction patterns that were causing CI failures 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- frontend/cypress/e2e/task/task.spec.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/cypress/e2e/task/task.spec.ts b/frontend/cypress/e2e/task/task.spec.ts index c9b20abeb..d7df25468 100644 --- a/frontend/cypress/e2e/task/task.spec.ts +++ b/frontend/cypress/e2e/task/task.spec.ts @@ -147,6 +147,8 @@ describe('Task', () => { cy.intercept('GET', /\/api\/v1\/(projects\/\d+(\/views\/\d+)?\/tasks|tasks\/all)/).as('loadTasks') cy.visit('/projects/1/1') cy.wait('@loadTasks', { timeout: 30000 }) + // Wait for loading state to complete + cy.get('.is-loading', {timeout: 30000}).should('not.exist') cy.get('.tasks .task .fancy-checkbox') .first() .should('be.visible') @@ -236,6 +238,8 @@ describe('Task', () => { cy.intercept('GET', /\/api\/v1\/(projects\/\d+(\/views\/\d+)?\/tasks|tasks\/all)/).as('loadTasks') cy.visit('/projects/1/1') cy.wait('@loadTasks', { timeout: 30000 }) + // Wait for loading state to complete + cy.get('.is-loading', {timeout: 30000}).should('not.exist') cy.get('.list-view .task') .first() .find('a.task-link') @@ -252,6 +256,8 @@ describe('Task', () => { cy.intercept('GET', /\/api\/v1\/(projects\/\d+(\/views\/\d+)?\/tasks|tasks\/all)/).as('loadTasks') cy.visit('/projects/1/3') cy.wait('@loadTasks', { timeout: 30000 }) + // Wait for loading state to complete + cy.get('.is-loading', {timeout: 30000}).should('not.exist') cy.get('tbody tr') .first() .find('a') @@ -271,6 +277,8 @@ describe('Task', () => { cy.intercept('GET', /\/api\/v1\/(projects\/\d+(\/views\/\d+)?\/tasks|tasks\/all)/).as('loadTasks') cy.visit('/projects/1/4') cy.wait('@loadTasks', { timeout: 30000 }) + // Wait for loading state to complete + cy.get('.is-loading', {timeout: 30000}).should('not.exist') cy.get('.kanban-view .tasks .task') .first() .click() @@ -288,6 +296,8 @@ describe('Task', () => { cy.intercept('GET', /\/api\/v1\/(projects\/\d+(\/views\/\d+)?\/tasks|tasks\/all)/).as('loadTasks') cy.visit('/projects/1/4') cy.wait('@loadTasks', { timeout: 30000 }) + // Wait for loading state to complete + cy.get('.is-loading', {timeout: 30000}).should('not.exist') cy.get('.kanban-view .tasks .task') .first() .click()