Skip to content

Commit

Permalink
test: try to make image test retryable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
max-nextcloud committed Jun 20, 2022
1 parent 4c7a079 commit 440c75d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cypress/e2e/images.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ describe('Test all image insertion methods', () => {
})

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

const assertImage = index => {
return clickOnImageAction(ACTION_UPLOAD_LOCAL_FILE)
Expand Down

0 comments on commit 440c75d

Please sign in to comment.