Skip to content

Commit

Permalink
Merge pull request #2658 from nextcloud/test/folder-names-with-retry
Browse files Browse the repository at this point in the history
fix: take retry into account for test folders
  • Loading branch information
max-nextcloud authored Jul 5, 2022
2 parents 99ed401 + 8c6cd4d commit 163eddf
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions cypress/e2e/workspace.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 163eddf

Please sign in to comment.