From 337b1e65040fa82b21dd5ea3274f3cd4e5d049b3 Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Tue, 21 Dec 2021 13:03:27 +0100
Subject: [PATCH] OZG-1772 fix ea report; reorder npm scripts

---
 Jenkinsfile                                   |  2 +-
 .../apps/goofy-e2e/src/support/pre-merge.ts   |  3 ---
 goofy-client/package.json                     | 20 +++++++++----------
 3 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 513720539b..805d328ebe 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -179,7 +179,7 @@ pipeline {
                     alwaysLinkToLastBuild: false,
                     keepAll: true,
                     reportDir: 'goofy-client/apps/goofy-e2e/reports_einheitlicher-ansprechpartner',
-                    reportFiles: 'report_einheitlicher-ansprechpartner.html',
+                    reportFiles: 'report.html',
                     reportName: "Goofy E2E-Tests(EA)"
                     ])
                 }
diff --git a/goofy-client/apps/goofy-e2e/src/support/pre-merge.ts b/goofy-client/apps/goofy-e2e/src/support/pre-merge.ts
index da7f33f699..fa931ebfd7 100644
--- a/goofy-client/apps/goofy-e2e/src/support/pre-merge.ts
+++ b/goofy-client/apps/goofy-e2e/src/support/pre-merge.ts
@@ -2,7 +2,4 @@ const fs = require('fs')
 
 if (fs.existsSync('apps/goofy-e2e/reports/mochawesome-report/.jsons')) {
 	fs.rename('apps/goofy-e2e/reports/mochawesome-report/.jsons', 'apps/goofy-e2e/reports/mochawesome-report/jsons', () => { })
-}
-if (fs.existsSync('apps/goofy-e2e/reports_einheitlicher-ansprechpartner/mochawesome-report/.jsons')) {
-	fs.rename('apps/goofy-e2e/reports_einheitlicher-ansprechpartner/mochawesome-report/.jsons', 'apps/goofy-e2e/reports_einheitlicher-ansprechpartner/mochawesome-report/jsons', () => { })
 }
\ No newline at end of file
diff --git a/goofy-client/package.json b/goofy-client/package.json
index 9139f418b0..f265c6e1b3 100644
--- a/goofy-client/package.json
+++ b/goofy-client/package.json
@@ -33,22 +33,22 @@
     "dep-graph": "nx dep-graph",
     "help": "nx help",
     "favicon": "real-favicon generate favicon/faviconDescription.json favicon/faviconData.json src/favicon",
-    "cypress:open": "export CYPRESS_BASE_URL=http://localhost:4300 ; npx cypress open --project apps/goofy-e2e",
-    "cypress:open-ea": "export CYPRESS_BASE_URL=http://localhost:4300 ; npx cypress open --project apps/goofy-e2e --config-file ./ea-config.json",
     "cypress:run": "npx cypress run --project apps/goofy-e2e",
     "cypress:version": "npx cypress version",
-    "cypress:merge-report": "mochawesome-merge apps/goofy-e2e/reports/mochawesome-report/**/*.json > apps/goofy-e2e/reports/report.json",
-	"cypress:merge-ea-report": "mochawesome-merge apps/goofy-e2e/reports_einheitlicher-ansprechpartner/mochawesome-report/**/*.json > apps/goofy-e2e/reports_einheitlicher-ansprechpartner/report.json",
-    "cypress:generate-html": "marge apps/goofy-e2e/reports/report.json -f report -o apps/goofy-e2e/reports/",
-	"cypress:generate-ea-html": "marge apps/goofy-e2e/reports_einheitlicher-ansprechpartner/report.json -f report -o apps/goofy-e2e/reports_einheitlicher-ansprechpartner/",
+    "cypress:open": "export CYPRESS_BASE_URL=http://localhost:4300 ; npx cypress open --project apps/goofy-e2e",
+	"cypress:ci-run": "export CYPRESS_BASE_URL=https://e2e.dev.ozg-sh.de ; npm run cypress:delete-old-reports ; npm run cypress:run -- --config-file ./cypress-ci.json ; test=$(echo \"$?\") ; npm run cypress:pre-merge ; npm run cypress:generate-report ; exit $test",
     "cypress:delete-old-reports": "node apps/goofy-e2e/src/support/delete-old-reports.ts",
-	"cypress:delete-ea-reports": "node apps/goofy-e2e/src/support/delete-ea-reports.ts",
     "cypress:pre-merge": "node apps/goofy-e2e/src/support/pre-merge.ts",
-	"cypress:pre-merge-ea": "node apps/goofy-e2e/src/support/pre-ea-report-merge.ts",
     "cypress:generate-report": "npm run cypress:merge-report ; npm run cypress:generate-html",
-	"cypress:generate-report-ea": "npm run cypress:merge-ea-report ; npm run cypress:generate-ea-html",
-    "cypress:ci-run": "export CYPRESS_BASE_URL=https://e2e.dev.ozg-sh.de ; npm run cypress:delete-old-reports ; npm run cypress:run -- --config-file ./cypress-ci.json ; test=$(echo \"$?\") ; npm run cypress:pre-merge ; npm run cypress:generate-report ; exit $test",
+    "cypress:merge-report": "mochawesome-merge apps/goofy-e2e/reports/mochawesome-report/**/*.json > apps/goofy-e2e/reports/report.json",
+    "cypress:generate-html": "marge apps/goofy-e2e/reports/report.json -f report -o apps/goofy-e2e/reports/",
+    "cypress:open-ea": "export CYPRESS_BASE_URL=http://localhost:4300 ; npx cypress open --project apps/goofy-e2e --config-file ./ea-config.json",
     "cypress:ci-ea-run": "export CYPRESS_BASE_URL=$npm_config_BASE_URL ; npm run cypress:delete-ea-reports ; npm run cypress:run -- --config-file ./ea-ci-config.json ; test=$(echo \"$?\") ; npm run cypress:pre-merge-ea ; npm run cypress:generate-ea-report ; exit $test",
+    "cypress:delete-ea-reports": "node apps/goofy-e2e/src/support/delete-ea-reports.ts",
+    "cypress:pre-merge-ea": "node apps/goofy-e2e/src/support/pre-ea-report-merge.ts",
+    "cypress:generate-ea-report": "npm run cypress:merge-ea-report ; npm run cypress:generate-ea-html",
+    "cypress:merge-ea-report": "mochawesome-merge apps/goofy-e2e/reports_einheitlicher-ansprechpartner/mochawesome-report/**/*.json > apps/goofy-e2e/reports_einheitlicher-ansprechpartner/report.json",
+    "cypress:generate-ea-html": "marge apps/goofy-e2e/reports_einheitlicher-ansprechpartner/report.json -f report -o apps/goofy-e2e/reports_einheitlicher-ansprechpartner/",
     "workspace-generator": "nx workspace-generator",
     "sonar-scanner": "npm test -- --testResultsProcessor='jest-sonar-reporter' && sonar-scanner -Dsonar.host.url=https://sonarqube.ozg-sh.de/ -Dsonar.login=364c6e09430714838730a83f55d3369a7ffda0e9"
   },
-- 
GitLab