diff options
author | max-nextcloud <max@nextcloud.com> | 2022-11-07 17:20:55 +0300 |
---|---|---|
committer | Max <max@nextcloud.com> | 2022-11-07 20:12:05 +0300 |
commit | 755939cf031346ae9a734678743d8e7e54d169f6 (patch) | |
tree | 97dfcb2111a94efa250b232b1fbb9f9ca6a7b633 | |
parent | 6ac917c10155dfbed9e0cfe3df0064cf0959199f (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 5570ce8ea..2f001eb4d 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') }) |