Skip to content

Commit 440c75d

Browse files
committed
test: try to make image test retryable
Uploading the existing file again would cause a conflict resulting in retries failing. Try to open the file instead and clear its content. Signed-off-by: Max <max@nextcloud.com>
1 parent 4c7a079 commit 440c75d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cypress/e2e/images.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,9 @@ describe('Test all image insertion methods', () => {
198198
})
199199

200200
it('Upload images with the same name', () => {
201-
cy.uploadFile('empty.md', 'text/markdown')
202201
cy.openFile('empty.md')
202+
// clear leftover content in case of a retry
203+
cy.get('#viewer .ProseMirror').type('{ctrl}a{del}')
203204

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

0 commit comments

Comments
 (0)