From 2d129dde01304ea492e34a1ee7af78ad15aaca6e Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 7 Apr 2025 14:14:22 +0200 Subject: [PATCH] fix: enable Jenkins find changes --- Jenkinsfile | 6 +++--- test/cypress/cypressParallel.sh | 15 --------------- test/cypress/docker/find/find.js | 2 +- test/cypress/docker/run.sh | 2 +- .../{client => customer}/clientAddress.spec.js | 0 .../{client => customer}/clientBalance.spec.js | 0 .../{client => customer}/clientBasicData.spec.js | 0 .../clientBillingData.spec.js | 0 .../{client => customer}/clientCredits.spec.js | 0 .../{client => customer}/clientFiscalData.spec.js | 0 .../{client => customer}/clientGreuges.spec.js | 0 .../{client => customer}/clientList.spec.js | 0 .../{client => customer}/clientNotes.spec.js | 0 .../{client => customer}/clientRecoveries.spec.js | 0 .../{client => customer}/clientSms.spec.js | 0 .../{client => customer}/clientWebAccess.spec.js | 0 .../clientCreditContracts.spec.js | 0 .../credit-management/clientCreditOpinion.spec.js | 0 .../others/clientConsumption.spec.js | 0 .../others/clientContacts.spec.js | 0 .../others/clientMandates.spec.js | 0 .../others/clientSamples.spec.js | 0 .../others/clientUnpaid.spec.js | 0 .../others/clientWebPayments.spec.js | 0 24 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 test/cypress/cypressParallel.sh rename test/cypress/integration/{client => customer}/clientAddress.spec.js (100%) rename test/cypress/integration/{client => customer}/clientBalance.spec.js (100%) rename test/cypress/integration/{client => customer}/clientBasicData.spec.js (100%) rename test/cypress/integration/{client => customer}/clientBillingData.spec.js (100%) rename test/cypress/integration/{client => customer}/clientCredits.spec.js (100%) rename test/cypress/integration/{client => customer}/clientFiscalData.spec.js (100%) rename test/cypress/integration/{client => customer}/clientGreuges.spec.js (100%) rename test/cypress/integration/{client => customer}/clientList.spec.js (100%) rename test/cypress/integration/{client => customer}/clientNotes.spec.js (100%) rename test/cypress/integration/{client => customer}/clientRecoveries.spec.js (100%) rename test/cypress/integration/{client => customer}/clientSms.spec.js (100%) rename test/cypress/integration/{client => customer}/clientWebAccess.spec.js (100%) rename test/cypress/integration/{client => customer}/credit-management/clientCreditContracts.spec.js (100%) rename test/cypress/integration/{client => customer}/credit-management/clientCreditOpinion.spec.js (100%) rename test/cypress/integration/{client => customer}/others/clientConsumption.spec.js (100%) rename test/cypress/integration/{client => customer}/others/clientContacts.spec.js (100%) rename test/cypress/integration/{client => customer}/others/clientMandates.spec.js (100%) rename test/cypress/integration/{client => customer}/others/clientSamples.spec.js (100%) rename test/cypress/integration/{client => customer}/others/clientUnpaid.spec.js (100%) rename test/cypress/integration/{client => customer}/others/clientWebPayments.spec.js (100%) diff --git a/Jenkinsfile b/Jenkinsfile index f85b2f990..a9db9d369 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -125,10 +125,10 @@ pipeline { sh "docker-compose ${env.COMPOSE_PARAMS} pull db" sh "docker-compose ${env.COMPOSE_PARAMS} up -d" - // def modules = sh(script: 'node test/cypress/docker/find/find.js', returnStdout: true).trim() - // echo "E2E MODULES: ${modules}" + def modules = sh(script: 'node test/cypress/docker/find/find.js', returnStdout: true).trim() + echo "E2E MODULES: ${modules}" image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ --init") { - sh "sh test/cypress/docker/cypressParallel.sh 1" + sh "sh test/cypress/docker/cypressParallel.sh 1 '${modules}'" } } } diff --git a/test/cypress/cypressParallel.sh b/test/cypress/cypressParallel.sh deleted file mode 100644 index 8ef26bcde..000000000 --- a/test/cypress/cypressParallel.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -find 'test/cypress/integration' \ - -mindepth 1 \ - -maxdepth 1 \ - -type d | \ -xargs -P "$1" -I {} sh -c ' - echo "🔷 {}" && - xvfb-run -a cypress run \ - --headless \ - --spec "{}" \ - --quiet \ - > /dev/null -' -wait diff --git a/test/cypress/docker/find/find.js b/test/cypress/docker/find/find.js index 453c2ae2e..b89aab230 100644 --- a/test/cypress/docker/find/find.js +++ b/test/cypress/docker/find/find.js @@ -25,7 +25,7 @@ async function getChangedModules() { if (change.startsWith(E2E_PATH)) changedArray.push(change); changedModules = new Set(changedArray); } - return [...changedModules].join(' '); + return [...changedModules].join('\n'); } getChangedModules() diff --git a/test/cypress/docker/run.sh b/test/cypress/docker/run.sh index 6de127790..f62f57960 100755 --- a/test/cypress/docker/run.sh +++ b/test/cypress/docker/run.sh @@ -44,6 +44,6 @@ docker run -it --rm \ -e CI \ -e TZ \ lilium-dev \ - bash -c "sh test/cypress/docker/cypressParallel.sh 2 $files" + bash -c "sh test/cypress/docker/cypressParallel.sh 2 '$files'" cleanup diff --git a/test/cypress/integration/client/clientAddress.spec.js b/test/cypress/integration/customer/clientAddress.spec.js similarity index 100% rename from test/cypress/integration/client/clientAddress.spec.js rename to test/cypress/integration/customer/clientAddress.spec.js diff --git a/test/cypress/integration/client/clientBalance.spec.js b/test/cypress/integration/customer/clientBalance.spec.js similarity index 100% rename from test/cypress/integration/client/clientBalance.spec.js rename to test/cypress/integration/customer/clientBalance.spec.js diff --git a/test/cypress/integration/client/clientBasicData.spec.js b/test/cypress/integration/customer/clientBasicData.spec.js similarity index 100% rename from test/cypress/integration/client/clientBasicData.spec.js rename to test/cypress/integration/customer/clientBasicData.spec.js diff --git a/test/cypress/integration/client/clientBillingData.spec.js b/test/cypress/integration/customer/clientBillingData.spec.js similarity index 100% rename from test/cypress/integration/client/clientBillingData.spec.js rename to test/cypress/integration/customer/clientBillingData.spec.js diff --git a/test/cypress/integration/client/clientCredits.spec.js b/test/cypress/integration/customer/clientCredits.spec.js similarity index 100% rename from test/cypress/integration/client/clientCredits.spec.js rename to test/cypress/integration/customer/clientCredits.spec.js diff --git a/test/cypress/integration/client/clientFiscalData.spec.js b/test/cypress/integration/customer/clientFiscalData.spec.js similarity index 100% rename from test/cypress/integration/client/clientFiscalData.spec.js rename to test/cypress/integration/customer/clientFiscalData.spec.js diff --git a/test/cypress/integration/client/clientGreuges.spec.js b/test/cypress/integration/customer/clientGreuges.spec.js similarity index 100% rename from test/cypress/integration/client/clientGreuges.spec.js rename to test/cypress/integration/customer/clientGreuges.spec.js diff --git a/test/cypress/integration/client/clientList.spec.js b/test/cypress/integration/customer/clientList.spec.js similarity index 100% rename from test/cypress/integration/client/clientList.spec.js rename to test/cypress/integration/customer/clientList.spec.js diff --git a/test/cypress/integration/client/clientNotes.spec.js b/test/cypress/integration/customer/clientNotes.spec.js similarity index 100% rename from test/cypress/integration/client/clientNotes.spec.js rename to test/cypress/integration/customer/clientNotes.spec.js diff --git a/test/cypress/integration/client/clientRecoveries.spec.js b/test/cypress/integration/customer/clientRecoveries.spec.js similarity index 100% rename from test/cypress/integration/client/clientRecoveries.spec.js rename to test/cypress/integration/customer/clientRecoveries.spec.js diff --git a/test/cypress/integration/client/clientSms.spec.js b/test/cypress/integration/customer/clientSms.spec.js similarity index 100% rename from test/cypress/integration/client/clientSms.spec.js rename to test/cypress/integration/customer/clientSms.spec.js diff --git a/test/cypress/integration/client/clientWebAccess.spec.js b/test/cypress/integration/customer/clientWebAccess.spec.js similarity index 100% rename from test/cypress/integration/client/clientWebAccess.spec.js rename to test/cypress/integration/customer/clientWebAccess.spec.js diff --git a/test/cypress/integration/client/credit-management/clientCreditContracts.spec.js b/test/cypress/integration/customer/credit-management/clientCreditContracts.spec.js similarity index 100% rename from test/cypress/integration/client/credit-management/clientCreditContracts.spec.js rename to test/cypress/integration/customer/credit-management/clientCreditContracts.spec.js diff --git a/test/cypress/integration/client/credit-management/clientCreditOpinion.spec.js b/test/cypress/integration/customer/credit-management/clientCreditOpinion.spec.js similarity index 100% rename from test/cypress/integration/client/credit-management/clientCreditOpinion.spec.js rename to test/cypress/integration/customer/credit-management/clientCreditOpinion.spec.js diff --git a/test/cypress/integration/client/others/clientConsumption.spec.js b/test/cypress/integration/customer/others/clientConsumption.spec.js similarity index 100% rename from test/cypress/integration/client/others/clientConsumption.spec.js rename to test/cypress/integration/customer/others/clientConsumption.spec.js diff --git a/test/cypress/integration/client/others/clientContacts.spec.js b/test/cypress/integration/customer/others/clientContacts.spec.js similarity index 100% rename from test/cypress/integration/client/others/clientContacts.spec.js rename to test/cypress/integration/customer/others/clientContacts.spec.js diff --git a/test/cypress/integration/client/others/clientMandates.spec.js b/test/cypress/integration/customer/others/clientMandates.spec.js similarity index 100% rename from test/cypress/integration/client/others/clientMandates.spec.js rename to test/cypress/integration/customer/others/clientMandates.spec.js diff --git a/test/cypress/integration/client/others/clientSamples.spec.js b/test/cypress/integration/customer/others/clientSamples.spec.js similarity index 100% rename from test/cypress/integration/client/others/clientSamples.spec.js rename to test/cypress/integration/customer/others/clientSamples.spec.js diff --git a/test/cypress/integration/client/others/clientUnpaid.spec.js b/test/cypress/integration/customer/others/clientUnpaid.spec.js similarity index 100% rename from test/cypress/integration/client/others/clientUnpaid.spec.js rename to test/cypress/integration/customer/others/clientUnpaid.spec.js diff --git a/test/cypress/integration/client/others/clientWebPayments.spec.js b/test/cypress/integration/customer/others/clientWebPayments.spec.js similarity index 100% rename from test/cypress/integration/client/others/clientWebPayments.spec.js rename to test/cypress/integration/customer/others/clientWebPayments.spec.js