From 04f1aae5a09addfa1f00c2fed6532dfe1724fbd5 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 5 Mar 2025 13:06:39 +0100 Subject: [PATCH] feat: refs #8698 add Cypress tests for Order Catalog and Supplier Balance, improve module name handling --- Jenkinsfile | 2 +- test/cypress/docker/find/get-modules.js | 4 +++- .../cypress/integration/{Order => order}/orderCatalog.spec.js | 0 .../{Supplier => supplier}/SupplierBalance.spec.js | 0 4 files changed, 4 insertions(+), 2 deletions(-) rename test/cypress/integration/{Order => order}/orderCatalog.spec.js (100%) rename test/cypress/integration/{Supplier => supplier}/SupplierBalance.spec.js (100%) diff --git a/Jenkinsfile b/Jenkinsfile index 05e21e25f..012917fdf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -123,7 +123,7 @@ pipeline { def modules = sh(script: 'node test/cypress/docker/find/find.js', returnStdout: true).trim() image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") { - sh "cypress run --browser chromium --spec ${modules}|| true" + sh "cypress run --browser chromium --spec '${modules}' || true" } } } diff --git a/test/cypress/docker/find/get-modules.js b/test/cypress/docker/find/get-modules.js index 0aaa3bf41..4ac9ec8c4 100644 --- a/test/cypress/docker/find/get-modules.js +++ b/test/cypress/docker/find/get-modules.js @@ -4,7 +4,9 @@ export function getModules(files) { const modules = []; for (const file of files) { if (file.startsWith('src/page')) { - modules.push(CYPRESS_PREFIX + file.split('/')[2] + CYPRESS_SUFIX); + modules.push( + CYPRESS_PREFIX + file.split('/')[2].toLowerCase() + CYPRESS_SUFIX, + ); } } return modules; diff --git a/test/cypress/integration/Order/orderCatalog.spec.js b/test/cypress/integration/order/orderCatalog.spec.js similarity index 100% rename from test/cypress/integration/Order/orderCatalog.spec.js rename to test/cypress/integration/order/orderCatalog.spec.js diff --git a/test/cypress/integration/Supplier/SupplierBalance.spec.js b/test/cypress/integration/supplier/SupplierBalance.spec.js similarity index 100% rename from test/cypress/integration/Supplier/SupplierBalance.spec.js rename to test/cypress/integration/supplier/SupplierBalance.spec.js