diff --git a/cypress/e2e/attachments.spec.js b/cypress/e2e/attachments.spec.js index f8ffe0bc1a5..30d3b2893da 100644 --- a/cypress/e2e/attachments.spec.js +++ b/cypress/e2e/attachments.spec.js @@ -21,7 +21,6 @@ */ import { initUserAndFiles, randHash, randUser } from '../utils/index.js' -import 'cypress-file-upload' const user = randUser() const recipient = randUser() @@ -41,7 +40,12 @@ function attachFile(name, requestAlias = null) { } return cy.getEditor() .find('input[type="file"][data-text-el="attachment-file-input"]') - .attachFile(name) + .selectFile([ + { + contents: 'cypress/fixtures/' + name, + fileName: name, + }, + ], { force: true }) } /** diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 1589634a792..1be1cfb57d5 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -72,8 +72,8 @@ Cypress.Commands.add('uploadFile', (fileName, mimeType, target) => { headers: { requesttoken, 'Content-Type': mimeType, - } - }); + }, + }) }).then(response => { const fileId = Number( response.headers['oc-fileid']?.split('oc')?.[0]