diff options
author | Max <max@nextcloud.com> | 2022-06-20 12:34:35 +0300 |
---|---|---|
committer | Max <max@nextcloud.com> | 2022-06-20 12:34:39 +0300 |
commit | cde69653d5d5c602d64c99e5e538e1ed2773ad26 (patch) | |
tree | 3aa363d60b1c9c11e4e86761aa49096ae49aeca4 | |
parent | ab5e38392a93524f1cb77ccd421eac24a2f32068 (diff) |
test: try to make image test retryabletest/retry-failed-cypress-tests
Use a unique filename so retries work on different files.
Uploading the existing file again would cause a conflict
resulting in retries failing.
Signed-off-by: Max <max@nextcloud.com>
-rw-r--r-- | cypress/e2e/images.spec.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cypress/e2e/images.spec.js b/cypress/e2e/images.spec.js index 0926dd6d1..1b577a3b6 100644 --- a/cypress/e2e/images.spec.js +++ b/cypress/e2e/images.spec.js @@ -140,7 +140,6 @@ describe('Test all image insertion methods', () => { // Upload test files to user's storage cy.uploadFile('test.md', 'text/markdown') - cy.uploadFile('empty.md', 'text/markdown') cy.uploadFile('github.png', 'image/png') cy.nextcloudCreateUser(randUser2, 'password') @@ -198,8 +197,10 @@ describe('Test all image insertion methods', () => { }) it('Upload images with the same name', () => { - cy.uploadFile('empty.md', 'text/markdown') - cy.openFile('empty.md') + // make sure we start from an emtpy file even on retries + const filename = randHash() + '.md' + cy.uploadFile('empty.md', 'text/markdown', filename) + cy.openFile(filename) const assertImage = index => { return clickOnImageAction(ACTION_UPLOAD_LOCAL_FILE) |