diff options
author | max-nextcloud <max@nextcloud.com> | 2022-11-07 17:20:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-07 17:20:55 +0300 |
commit | 9fed8ea72469d6d25c6723689aa5c2b634ea1a52 (patch) | |
tree | da01bb1b04e684c392e18a6fb28c8f9be1d79655 | |
parent | f85a3cd5c996dbfe8d2230859d67ae5c17847242 (diff) |
Fix minor issues in cypress tests leading to failures
* `#workspace` is not found on the recent pages view at all - so need to combine selectors
* allow tests to pass in retries by using a consistent path name.
Signed-off-by: max-nextcloud <max@nextcloud.com>
-rw-r--r-- | cypress/e2e/workspace.spec.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cypress/e2e/workspace.spec.js b/cypress/e2e/workspace.spec.js index 012c0d65f..d067fc7c6 100644 --- a/cypress/e2e/workspace.spec.js +++ b/cypress/e2e/workspace.spec.js @@ -44,8 +44,8 @@ describe('Workspace', function() { }) it('Hides the workspace when switching to another folder', function() { - cy.uploadFile('test.md', 'text/markdown', `${Cypress.currentTest.title}/README.md`) - cy.createFolder(`${Cypress.currentTest.title}/subdirectory`) + cy.uploadFile('test.md', 'text/markdown', `${currentFolder}/README.md`) + cy.createFolder(`${currentFolder}/subdirectory`) cy.reload() cy.get('.files-fileList').should('contain', 'README.md') cy.get('#rich-workspace .ProseMirror') @@ -57,15 +57,14 @@ describe('Workspace', function() { }) it('Hides the workspace when switching to another view', function() { - cy.uploadFile('test.md', 'text/markdown', `${Cypress.currentTest.title}/README.md`) + cy.uploadFile('test.md', 'text/markdown', `${currentFolder}/README.md`) cy.reload() cy.get('.files-fileList').should('contain', 'README.md') cy.get('#rich-workspace .ProseMirror') .should('contain', 'Hello world') cy.get('.nav-recent') .click() - cy.get('#rich-workspace') - .get('.ProseMirror') + cy.get('#rich-workspace .ProseMirror') .should('not.exist') }) |