fix: add loading state waits to additional task tests preventing pointer-events issues

- Add loading state waits to 'Can add a task to favorites' test
- Add loading state waits to all three task description icon tests:
  - 'Should show a task description icon if the task has a description'
  - 'Should not show a task description icon if the task has an empty description'
  - 'Should not show a task description icon if the task has a description containing only an empty p tag'
- These fixes prevent CypressError where elements have CSS pointer-events: none due to loading states
- All tests wait for .is-loading class removal before attempting element interactions
- Ensures elements are fully interactive before test assertions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude Loop
2025-09-21 07:24:45 +00:00
parent a82f58c260
commit 033ede675c

View File

@@ -164,6 +164,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 .favorite')
.first()
.should('be.visible')
@@ -182,6 +184,8 @@ describe('Task', () => {
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 .project-task-icon .fa-align-left')
.should('exist')
@@ -196,6 +200,8 @@ describe('Task', () => {
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 .project-task-icon .fa-align-left')
.should('not.exist')
@@ -210,6 +216,8 @@ describe('Task', () => {
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 .project-task-icon .fa-align-left')
.should('not.exist')