Skip to content
Snippets Groups Projects
Commit dff1a2d1 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-3934 Use new Cypress configuration parameter (2)

parent 61521ee3
No related branches found
No related tags found
No related merge requests found
...@@ -615,11 +615,12 @@ Void publishE2ETestResult(String reportFolder, String reportName) { ...@@ -615,11 +615,12 @@ Void publishE2ETestResult(String reportFolder, String reportName) {
String runTests(String bezeichner, String reportFolder, Integer dbPort, String stageName) { String runTests(String bezeichner, String reportFolder, Integer dbPort, String stageName) {
def config = generateCypressConfig(bezeichner, reportFolder, dbPort) def config = generateCypressConfig(bezeichner, reportFolder, dbPort)
def specFolder = "apps/goofy-e2e/src/e2e/${reportFolder}"
try { try {
dir("goofy-client") { dir("goofy-client") {
sh "npm run cypress:version" sh "npm run cypress:version"
sh "npm run cypress:ci-run --CONFIG='${config}' --REPORT_FOLDER=${reportFolder}" sh "npm run cypress:ci-run --CONFIG='${config}' --REPORT_FOLDER=${reportFolder} --SPEC=${specFolder}"
} }
} catch (Exception e) { } catch (Exception e) {
printNpmDebugLog() printNpmDebugLog()
...@@ -669,7 +670,7 @@ String generateCypressConfig(String bezeichner, String testFolder, Integer dbPor ...@@ -669,7 +670,7 @@ String generateCypressConfig(String bezeichner, String testFolder, Integer dbPor
config.env.keycloakRealm = namespace as String config.env.keycloakRealm = namespace as String
config.env.keycloakClient = "alfa" as String config.env.keycloakClient = "alfa" as String
config.env.sabineUuid = getKeycloakUuid(namespace, "sabine") as String config.env.sabineUuid = getKeycloakUuid(namespace, "sabine") as String
config.integrationFolder = "./src/integration/${testFolder}" as String config.integrationFolder = "./src/e2e/${testFolder}" as String
config.videosFolder = "./reports/${testFolder}/videos" as String config.videosFolder = "./reports/${testFolder}/videos" as String
config.screenshotsFolder = "./reports/${testFolder}/screenshots" as String config.screenshotsFolder = "./reports/${testFolder}/screenshots" as String
config.reporterOptions.reportDir = "./reports/${testFolder}/mochawesome-report" as String config.reporterOptions.reportDir = "./reports/${testFolder}/mochawesome-report" as String
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
"cypress:version": "npx cypress version", "cypress:version": "npx cypress version",
"cypress:install": "npx cypress install", "cypress:install": "npx cypress install",
"cypress:open": "npx cypress open --project apps/goofy-e2e", "cypress:open": "npx cypress open --project apps/goofy-e2e",
"cypress:ci-run": "npm run cypress:delete-old-reports --REPORT_FOLDER=${npm_config_report_folder} ; NO_COLOR=1 npm run cypress:run -- --config=${npm_config_config} ; test=$(echo \"$?\") ; npm run cypress:pre-merge --REPORT_FOLDER=${npm_config_report_folder} ; npm run cypress:generate-report --REPORT_FOLDER=${npm_config_report_folder} ; exit $test", "cypress:ci-run": "npm run cypress:delete-old-reports --REPORT_FOLDER=${npm_config_report_folder} ; NO_COLOR=1 npm run cypress:run -- --spec ${npm_config_spec} --config=${npm_config_config} ; test=$(echo \"$?\") ; npm run cypress:pre-merge --REPORT_FOLDER=${npm_config_report_folder} ; npm run cypress:generate-report --REPORT_FOLDER=${npm_config_report_folder} ; exit $test",
"cypress:delete-old-reports": "REPORT_FOLDER=${npm_config_report_folder} node apps/goofy-e2e/src/support/delete-old-reports.ts", "cypress:delete-old-reports": "REPORT_FOLDER=${npm_config_report_folder} node apps/goofy-e2e/src/support/delete-old-reports.ts",
"cypress:pre-merge": "REPORT_FOLDER=${npm_config_report_folder} node apps/goofy-e2e/src/support/pre-merge.ts", "cypress:pre-merge": "REPORT_FOLDER=${npm_config_report_folder} node apps/goofy-e2e/src/support/pre-merge.ts",
"cypress:generate-report": "npm run cypress:merge-report --REPORT_FOLDER=${npm_config_report_folder} ; npm run cypress:generate-html --REPORT_FOLDER=${npm_config_report_folder}", "cypress:generate-report": "npm run cypress:merge-report --REPORT_FOLDER=${npm_config_report_folder} ; npm run cypress:generate-html --REPORT_FOLDER=${npm_config_report_folder}",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment