mirror of
https://github.com/go-vikunja/vikunja.git
synced 2025-12-05 19:16:51 -06:00
fix: add loading state waits to navigation and task interaction tests
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user