This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch 3644-remove-cypress-file-upload-dependency
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to
refs/heads/3644-remove-cypress-file-upload-dependency by this push:
new f0c036dbbc chore(#3644): remove cypress-file-upload dependency and
update file upload method
f0c036dbbc is described below
commit f0c036dbbcc5761a6a60ff9ab818c09e242ab133
Author: Philipp Zehnder <[email protected]>
AuthorDate: Fri Jun 6 14:40:33 2025 +0200
chore(#3644): remove cypress-file-upload dependency and update file upload
method
---
ui/cypress/support/e2e.ts | 2 --
ui/cypress/support/utils/FileManagementUtils.ts | 10 ++++++++--
ui/package-lock.json | 14 --------------
ui/package.json | 1 -
4 files changed, 8 insertions(+), 19 deletions(-)
diff --git a/ui/cypress/support/e2e.ts b/ui/cypress/support/e2e.ts
index c37c43ac26..8d94143390 100644
--- a/ui/cypress/support/e2e.ts
+++ b/ui/cypress/support/e2e.ts
@@ -19,8 +19,6 @@
import { login } from './general/login';
import { logout } from './general/logout';
import { dataCy } from './general/dataCy';
-// tslint:disable-next-line:no-implicit-dependencies
-import 'cypress-file-upload';
import { resetStreamPipes } from './general/resetStreamPipes';
import { initStreamPipesTest } from './general/InitStreamPipesTest';
import { removeDownloadDirectory } from './general/removeDownloadDirectory';
diff --git a/ui/cypress/support/utils/FileManagementUtils.ts
b/ui/cypress/support/utils/FileManagementUtils.ts
index d35c383ff9..c7274bf5fa 100644
--- a/ui/cypress/support/utils/FileManagementUtils.ts
+++ b/ui/cypress/support/utils/FileManagementUtils.ts
@@ -25,11 +25,17 @@ export class FileManagementUtils {
cy.dataCy('sp-open-file-upload-dialog').click();
// Upload file
- // const filepath = 'fileTest/test.csv'
- cy.dataCy('sp-file-management-file-input').attachFile(filePath);
+ cy.dataCy('sp-file-management-file-input').selectFile(
+ this.addFixtureDirectoryPrefix(filePath),
+ { force: true },
+ );
cy.dataCy('sp-file-management-store-file').click();
}
+ private static addFixtureDirectoryPrefix(filePath: string): string {
+ return 'cypress/fixtures/' + filePath;
+ }
+
public static deleteFile() {
// Go to StreamPipes file management
cy.visit('#/configuration/files');
diff --git a/ui/package-lock.json b/ui/package-lock.json
index c17b519256..569e56ebc1 100644
--- a/ui/package-lock.json
+++ b/ui/package-lock.json
@@ -84,7 +84,6 @@
"assert": "^2.1.0",
"csv-string": "^4.1.1",
"cypress": "^14.4.1",
- "cypress-file-upload": "^5.0.8",
"deepl-node": "^1.16.0",
"eslint": "9.19.0",
"eslint-config-prettier": "^10.0.1",
@@ -9549,19 +9548,6 @@
"node": "^18.0.0 || ^20.0.0 || >=22.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,
- "license": "MIT",
- "engines": {
- "node": ">=8.2.1"
- },
- "peerDependencies": {
- "cypress": ">3.0.0"
- }
- },
"node_modules/cypress/node_modules/cli-truncate": {
"version": "2.1.0",
"resolved":
"https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz",
diff --git a/ui/package.json b/ui/package.json
index 494c44c0ac..db299c42eb 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -105,7 +105,6 @@
"assert": "^2.1.0",
"csv-string": "^4.1.1",
"cypress": "^14.4.1",
- "cypress-file-upload": "^5.0.8",
"deepl-node": "^1.16.0",
"eslint": "9.19.0",
"eslint-config-prettier": "^10.0.1",