From fc6c85131fec213bc6ea6b75f74f1e813d59c112 Mon Sep 17 00:00:00 2001 From: FahadDarw Date: Thu, 12 Dec 2024 17:36:46 +0000 Subject: [PATCH 1/3] Fixed Slack notification issues, added contributors, and deleted comments --- .../CypressTests/cypress.config.ts | 2 +- .../CypressTests/package.json | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Dfe.Academies.External.Web/CypressTests/cypress.config.ts b/Dfe.Academies.External.Web/CypressTests/cypress.config.ts index d5f841adb..3eb10d98b 100644 --- a/Dfe.Academies.External.Web/CypressTests/cypress.config.ts +++ b/Dfe.Academies.External.Web/CypressTests/cypress.config.ts @@ -7,7 +7,7 @@ export default defineConfig({ reporterEnabled: 'mochawesome', mochawesomeReporterOptions: { reportDir: 'cypress/reports/mocha', // added this for slack messaging plugin - quiet: true, // Fixed typo + quiet: true, overwrite: false, html: false, json: true, diff --git a/Dfe.Academies.External.Web/CypressTests/package.json b/Dfe.Academies.External.Web/CypressTests/package.json index d667787ee..769e0de78 100644 --- a/Dfe.Academies.External.Web/CypressTests/package.json +++ b/Dfe.Academies.External.Web/CypressTests/package.json @@ -5,9 +5,10 @@ "main": "index.js", "scripts": { "cy:open": "cypress open --browser electron", - "cy:run": "cypress run --browser electron" , - "cy:notify": "cypress-slack-reporter", - "lint": "eslint ." + "cy:run": "cypress run --browser electron", + "cy:notify": "node ./sendSlackNotification.js", + "lint": "eslint .", + "generate:html:report": "mochawesome-merge ./cypress/reports/*.json > mochareports/report.json && mochawesome-report-generator mochareports/report.json" }, "keywords": [ "regression", @@ -20,7 +21,9 @@ }, "contributors": [ "Dan Good", - "Chris Sherlock" + "Chris Sherlock", + "Fahad Darwish", + "Richika Dogra" ], "license": "ISC", "bugs": { @@ -43,6 +46,7 @@ "cypress-axe": "^1.4.0", "eslint": "^9.6.0", "eslint-plugin-cypress": "^3.0.0", - "zaproxy": "^2.0.0-rc.1" + "zaproxy": "^2.0.0-rc.1", + "cypress-multi-reporters": "^1.6.1" } } From decdcc1f3e33b0cf9bbd1c963854ce75a445f529 Mon Sep 17 00:00:00 2001 From: FahadDarw Date: Thu, 12 Dec 2024 17:45:23 +0000 Subject: [PATCH 2/3] "added_Slack_Notification" --- Dfe.Academies.External.Web/CypressTests/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dfe.Academies.External.Web/CypressTests/package.json b/Dfe.Academies.External.Web/CypressTests/package.json index 769e0de78..028d92bd7 100644 --- a/Dfe.Academies.External.Web/CypressTests/package.json +++ b/Dfe.Academies.External.Web/CypressTests/package.json @@ -6,7 +6,7 @@ "scripts": { "cy:open": "cypress open --browser electron", "cy:run": "cypress run --browser electron", - "cy:notify": "node ./sendSlackNotification.js", + "cy:notify": "cypress-slack-reporter", "lint": "eslint .", "generate:html:report": "mochawesome-merge ./cypress/reports/*.json > mochareports/report.json && mochawesome-report-generator mochareports/report.json" }, From b6d6bf19720bfccf6de9a0616d2dc1e66f17bd6a Mon Sep 17 00:00:00 2001 From: FahadDarw Date: Thu, 12 Dec 2024 17:47:47 +0000 Subject: [PATCH 3/3] Update package.json --- Dfe.Academies.External.Web/CypressTests/package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dfe.Academies.External.Web/CypressTests/package.json b/Dfe.Academies.External.Web/CypressTests/package.json index 028d92bd7..ad81ddf19 100644 --- a/Dfe.Academies.External.Web/CypressTests/package.json +++ b/Dfe.Academies.External.Web/CypressTests/package.json @@ -7,6 +7,10 @@ "cy:open": "cypress open --browser electron", "cy:run": "cypress run --browser electron", "cy:notify": "cypress-slack-reporter", + "clean:reports": "rm -rf cypress/reports/mocha/*.json", + "combine:reports": "mochawesome-merge cypress/reports/mocha/*.json> mochareports/report.json", + "create:html:report": "marge mochareports/report.json -f report -o mochareports", + "generate:html:report": "npm run combine:reports && npm run create:html:report", "lint": "eslint .", "generate:html:report": "mochawesome-merge ./cypress/reports/*.json > mochareports/report.json && mochawesome-report-generator mochareports/report.json" },