From 7944d20c65a44b629cbe88755805ca53af56c34f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 23 Jun 2023 21:56:11 +0200 Subject: [PATCH] ci(cypress): Use cypress select file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- cypress/e2e/attachments.spec.js | 8 ++++++-- cypress/e2e/nodes/Mentions.spec.js | 1 - package-lock.json | 20 -------------------- package.json | 1 - 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/cypress/e2e/attachments.spec.js b/cypress/e2e/attachments.spec.js index f8ffe0bc1a..30d3b2893d 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/e2e/nodes/Mentions.spec.js b/cypress/e2e/nodes/Mentions.spec.js index 25c0ce69cb..e732ea866b 100644 --- a/cypress/e2e/nodes/Mentions.spec.js +++ b/cypress/e2e/nodes/Mentions.spec.js @@ -1,5 +1,4 @@ import { initUserAndFiles, randUser } from '../../utils/index.js' -import 'cypress-file-upload' const user = randUser() const mentionMe = randUser() diff --git a/package-lock.json b/package-lock.json index f0e535cb85..9187bf48a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -95,7 +95,6 @@ "@vue/test-utils": "^1.3.0 <2", "@vue/vue2-jest": "^29.2.4", "cypress": "^12.15.0", - "cypress-file-upload": "^5.0.8", "eslint-plugin-cypress": "^2.13.3", "identity-obj-proxy": "^3.0.0", "jest": "^29.5.0", @@ -7975,18 +7974,6 @@ "node": "^14.0.0 || ^16.0.0 || >=18.0.0" } }, - "node_modules/cypress-file-upload": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/cypress-file-upload/-/cypress-file-upload-5.0.8.tgz", - "integrity": "sha512-+8VzNabRk3zG6x8f8BWArF/xA/W0VK4IZNx3MV0jFWrJS/qKn8eHfa5nU73P9fOQAgwHFJx7zjg4lwOnljMO8g==", - "dev": true, - "engines": { - "node": ">=8.2.1" - }, - "peerDependencies": { - "cypress": ">3.0.0" - } - }, "node_modules/cypress/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -27746,13 +27733,6 @@ } } }, - "cypress-file-upload": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/cypress-file-upload/-/cypress-file-upload-5.0.8.tgz", - "integrity": "sha512-+8VzNabRk3zG6x8f8BWArF/xA/W0VK4IZNx3MV0jFWrJS/qKn8eHfa5nU73P9fOQAgwHFJx7zjg4lwOnljMO8g==", - "dev": true, - "requires": {} - }, "dash-ast": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", diff --git a/package.json b/package.json index f97e42242d..683581a7b7 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,6 @@ "@vue/test-utils": "^1.3.0 <2", "@vue/vue2-jest": "^29.2.4", "cypress": "^12.15.0", - "cypress-file-upload": "^5.0.8", "eslint-plugin-cypress": "^2.13.3", "identity-obj-proxy": "^3.0.0", "jest": "^29.5.0",