Skip to content

Commit

Permalink
Merge pull request #47671 from nextcloud/chore/cypress-intercept-timeout
Browse files Browse the repository at this point in the history
test(cypress): Await promise in response to prevent timeout
  • Loading branch information
susnux authored Sep 2, 2024
2 parents 02a6f12 + 7e2bea6 commit 69f4a39
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cypress/e2e/files/files-renaming.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ describe('files: Rename nodes', { testIsolation: true }, () => {
cy.intercept(
'MOVE',
/\/remote.php\/dav\/files\//,
async () => { await promise },
(request) => {
// we need to wait in the onResponse handler as the intercept handler times out otherwise
request.on('response', async () => { await promise })
},
).as('moveFile')

// Start the renaming
Expand Down

0 comments on commit 69f4a39

Please sign in to comment.