Skip to content

Commit cde6965

Browse files
committed
test: try to make image test retryable
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 <[email protected]>
1 parent ab5e383 commit cde6965

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

cypress/e2e/images.spec.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ describe('Test all image insertion methods', () => {
140140

141141
// Upload test files to user's storage
142142
cy.uploadFile('test.md', 'text/markdown')
143-
cy.uploadFile('empty.md', 'text/markdown')
144143
cy.uploadFile('github.png', 'image/png')
145144

146145
cy.nextcloudCreateUser(randUser2, 'password')
@@ -198,8 +197,10 @@ describe('Test all image insertion methods', () => {
198197
})
199198

200199
it('Upload images with the same name', () => {
201-
cy.uploadFile('empty.md', 'text/markdown')
202-
cy.openFile('empty.md')
200+
// make sure we start from an emtpy file even on retries
201+
const filename = randHash() + '.md'
202+
cy.uploadFile('empty.md', 'text/markdown', filename)
203+
cy.openFile(filename)
203204

204205
const assertImage = index => {
205206
return clickOnImageAction(ACTION_UPLOAD_LOCAL_FILE)

0 commit comments

Comments
 (0)