diff options
author | Max <max@nextcloud.com> | 2022-07-03 08:54:32 +0300 |
---|---|---|
committer | Vinicius Reis (Rebase PR Action) <luiz.vinicius73@gmail.com> | 2022-07-05 19:12:36 +0300 |
commit | 8c6cd4dd3b46c598123e91804f5bcc012c942b0c (patch) | |
tree | db881dab12f5b1282fbed591e7899573889ac7f1 /cypress | |
parent | 99ed401d8bdc6d3adb30478d7672c3c178a8e238 (diff) |
fix: take retry into account for test folders
Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'cypress')
-rw-r--r-- | cypress/e2e/workspace.spec.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/cypress/e2e/workspace.spec.js b/cypress/e2e/workspace.spec.js index 37bc71335..5d78763bb 100644 --- a/cypress/e2e/workspace.spec.js +++ b/cypress/e2e/workspace.spec.js @@ -30,10 +30,15 @@ describe('Workspace', function() { }) beforeEach(function() { - cy.login(randUser, 'password') - // isolate tests - each happens in it's own folder - cy.createFolder(Cypress.currentTest.title) - cy.visit(`apps/files?dir=/${encodeURIComponent(Cypress.currentTest.title)}`) + cy.login(randUser, 'password').then(() => { + // isolate tests - each happens in its own folder + const retry = cy.state('test').currentRetry() + const folderName = retry + ? `${Cypress.currentTest.title} (${retry})` + : Cypress.currentTest.title + cy.createFolder(folderName) + cy.visit(`apps/files?dir=/${encodeURIComponent(folderName)}`) + }) }) it('adds a Readme.md', function() { |