mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-24 22:25:15 +00:00
fix: resolve API intercept alias conflicts in linkShare and subtask-duplicates
- Fix multiple cy.intercept() calls with same '@loadTasks' alias - Replace with single regex pattern in linkShare.spec.ts and subtask-duplicates.spec.ts - Prevents Cypress from using only the last defined intercept - Should resolve timeouts in link sharing and subtask duplicate tests 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -25,10 +25,8 @@ describe('Link shares', () => {
|
||||
it('Can view a link share', () => {
|
||||
const {share, project, tasks} = prepareLinkShare()
|
||||
|
||||
// Set up comprehensive API intercepts for all possible task loading endpoints BEFORE navigation
|
||||
cy.intercept('GET', '**/api/v1/projects/*/views/*/tasks**').as('loadTasks')
|
||||
cy.intercept('GET', '**/api/v1/projects/*/tasks**').as('loadTasks')
|
||||
cy.intercept('GET', '**/api/v1/tasks/all**').as('loadTasks')
|
||||
// Set up comprehensive API intercept for all possible task loading endpoints BEFORE navigation
|
||||
cy.intercept('GET', /\/api\/v1\/(projects\/\d+(\/views\/\d+)?\/tasks|tasks\/all)/).as('loadTasks')
|
||||
|
||||
cy.visit(`/share/${share.hash}/auth`)
|
||||
|
||||
@@ -56,10 +54,8 @@ describe('Link shares', () => {
|
||||
it('Should work when directly viewing a project with share hash present', () => {
|
||||
const {share, project, tasks} = prepareLinkShare()
|
||||
|
||||
// Set up comprehensive API intercepts for all possible task loading endpoints BEFORE navigation
|
||||
cy.intercept('GET', '**/api/v1/projects/*/views/*/tasks**').as('loadTasks')
|
||||
cy.intercept('GET', '**/api/v1/projects/*/tasks**').as('loadTasks')
|
||||
cy.intercept('GET', '**/api/v1/tasks/all**').as('loadTasks')
|
||||
// Set up comprehensive API intercept for all possible task loading endpoints BEFORE navigation
|
||||
cy.intercept('GET', /\/api\/v1\/(projects\/\d+(\/views\/\d+)?\/tasks|tasks\/all)/).as('loadTasks')
|
||||
|
||||
cy.visit(`/projects/${project.id}/1#share-auth-token=${share.hash}`)
|
||||
|
||||
|
||||
@@ -53,10 +53,8 @@ describe('Subtask duplicate handling', () => {
|
||||
|
||||
it('shows subtask only once in project list', () => {
|
||||
// Add API intercepts to wait for all necessary data to load
|
||||
// Set up comprehensive API intercepts for all possible task loading endpoints
|
||||
cy.intercept('GET', '**/api/v1/projects/*/views/*/tasks**').as('loadTasks')
|
||||
cy.intercept('GET', '**/api/v1/projects/*/tasks**').as('loadTasks')
|
||||
cy.intercept('GET', '**/api/v1/tasks/all**').as('loadTasks')
|
||||
// Set up comprehensive API intercept for all possible task loading endpoints
|
||||
cy.intercept('GET', /\/api\/v1\/(projects\/\d+(\/views\/\d+)?\/tasks|tasks\/all)/).as('loadTasks')
|
||||
cy.intercept('GET', '**/api/v1/projects/*').as('loadProject')
|
||||
cy.intercept('GET', '**/api/v1/tasks/*/relations').as('loadTaskRelations')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user