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-06-07 23:13:07 +0300
committerMax <max@nextcloud.com>2022-06-08 00:11:06 +0300
commit0162bb016c9b3f32f4583144eadd16bd1cfe68e7 (patch)
tree66016cbee531b81f20c713901d447ded703f04ad /cypress
parentb1ccb60cb6a0d9265e145f7db750add1e832e52d (diff)
fix: return promise in cypress command to wait for it
Tests were failing because cypress proceeded with adding files to a folder that had not been created yet: https://github.com/nextcloud/text/runs/6780248454?check_suite_focus=true Do not create the callout test directory twice. Nested cypress blocks will execute `beforeEach` on all levels. Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'cypress')
-rw-r--r--cypress/e2e/workspace.spec.js4
-rw-r--r--cypress/support/commands.js2
2 files changed, 1 insertions, 5 deletions
diff --git a/cypress/e2e/workspace.spec.js b/cypress/e2e/workspace.spec.js
index 1983b7b93..9273bc8d8 100644
--- a/cypress/e2e/workspace.spec.js
+++ b/cypress/e2e/workspace.spec.js
@@ -173,10 +173,6 @@ 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.openWorkspace().type('Callout')
})
// eslint-disable-next-line cypress/no-async-tests
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
index 4bfa8149a..482b50e2f 100644
--- a/cypress/support/commands.js
+++ b/cypress/support/commands.js
@@ -141,7 +141,7 @@ Cypress.Commands.add('shareFileToUser', (userId, password, path, targetUserId) =
Cypress.Commands.add('createFolder', dirName => {
cy.window().then(win => {
- win.OC.Files.getClient().createDirectory(dirName)
+ return win.OC.Files.getClient().createDirectory(dirName)
})
})