Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax <max@nextcloud.com>2022-07-03 08:54:32 +0300
committerVinicius Reis (Rebase PR Action) <luiz.vinicius73@gmail.com>2022-07-05 19:12:36 +0300
commit8c6cd4dd3b46c598123e91804f5bcc012c942b0c (patch)
treedb881dab12f5b1282fbed591e7899573889ac7f1 /cypress
parent99ed401d8bdc6d3adb30478d7672c3c178a8e238 (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.js13
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() {