From 4c5b633ecdb7a55f90b921e4e05ffeedfae5688d Mon Sep 17 00:00:00 2001 From: karenmillermoj Date: Mon, 5 Dec 2022 09:50:37 +0000 Subject: [PATCH 1/9] HAAR-1031 rename files --- integration_tests/integration/{health.spec.ts => health.cy.ts} | 0 integration_tests/integration/{login.spec.ts => login.cy.ts} | 0 package.json | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename integration_tests/integration/{health.spec.ts => health.cy.ts} (100%) rename integration_tests/integration/{login.spec.ts => login.cy.ts} (100%) diff --git a/integration_tests/integration/health.spec.ts b/integration_tests/integration/health.cy.ts similarity index 100% rename from integration_tests/integration/health.spec.ts rename to integration_tests/integration/health.cy.ts diff --git a/integration_tests/integration/login.spec.ts b/integration_tests/integration/login.cy.ts similarity index 100% rename from integration_tests/integration/login.spec.ts rename to integration_tests/integration/login.cy.ts diff --git a/package.json b/package.json index 38aa936..ec9b465 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "server/**/*.{ts,js,jsx,mjs}" ], "testMatch": [ - "/(server|job)/**/?(*.)(spec|test).{ts,js,jsx,mjs}" + "/(server|job)/**/?(*.)(cy|test).{ts,js,jsx,mjs}" ], "testEnvironment": "node", "reporters": [ From 8c3d1b665a25d9c0a9f1fbd435b3bf0016a6ded1 Mon Sep 17 00:00:00 2001 From: karenmillermoj Date: Mon, 5 Dec 2022 10:06:05 +0000 Subject: [PATCH 2/9] HAAR-1031 pick up renamed files --- cypress.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress.json b/cypress.json index 154a3d9..a4a214a 100644 --- a/cypress.json +++ b/cypress.json @@ -1,7 +1,7 @@ { "chromeWebSecurity": false, "baseUrl": "http://localhost:3007", - "ignoreTestFiles": "**/!(*.spec).ts", + "ignoreTestFiles": "**/!(*.cy).ts", "fixturesFolder": "integration_tests/fixtures", "integrationFolder": "integration_tests/integration", "pluginsFile": "integration_tests/plugins/index.ts", From 5e14dfc6ad1f8709604ea45e1cfe65d75aa29558 Mon Sep 17 00:00:00 2001 From: karenmillermoj Date: Mon, 5 Dec 2022 10:33:59 +0000 Subject: [PATCH 3/9] HAAR-1031 minor package updates --- package-lock.json | 112 +++++++++++++++++++++++----------------------- package.json | 4 +- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4e1a173..a991ac8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ "passport-oauth2": "^1.6.1", "prom-client": "^14.0.1", "redis": "^4.5.1", - "superagent": "^8.0.4", + "superagent": "^8.0.5", "url-value-parser": "^2.2.0" }, "devDependencies": { @@ -82,7 +82,7 @@ "nodemon": "^2.0.19", "prettier": "^2.8.0", "sass": "^1.56.1", - "supertest": "^6.3.1", + "supertest": "^6.3.2", "ts-jest": "^29.0.3", "typescript": "^4.9.3" }, @@ -3040,9 +3040,9 @@ } }, "node_modules/@types/jest": { - "version": "29.2.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.2.3.tgz", - "integrity": "sha512-6XwoEbmatfyoCjWRX7z0fKMmgYKe9+/HrviJ5k0X/tjJWHGAezZOfYaxqQKuzG/TvQyr+ktjm4jgbk0s4/oF2w==", + "version": "29.2.4", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.2.4.tgz", + "integrity": "sha512-PipFB04k2qTRPePduVLTRiPzQfvMeLwUN3Z21hsAKaB/W9IIzgB2pizCL466ftJlcyZqnHoC9ZHpxLGl3fS86A==", "dev": true, "dependencies": { "expect": "^29.0.0", @@ -4267,9 +4267,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001435", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001435.tgz", - "integrity": "sha512-kdCkUTjR+v4YAJelyiDTqiu82BDr4W4CP5sgTA0ZBmqn30XfS2ZghPLMowik9TPhS+psWJiUNxsqLyurDbmutA==", + "version": "1.0.30001436", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001436.tgz", + "integrity": "sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg==", "dev": true, "funding": [ { @@ -5486,9 +5486,9 @@ } }, "node_modules/eslint": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", - "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", + "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.3", @@ -5956,9 +5956,9 @@ } }, "node_modules/eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "node_modules/execa": { @@ -6286,9 +6286,9 @@ "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz", + "integrity": "sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -8419,9 +8419,9 @@ "dev": true }, "node_modules/lint-staged": { - "version": "13.0.4", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.4.tgz", - "integrity": "sha512-HxlHCXoYRsq9QCby5wFozmZW00hMs/9e3l+/dz6Qr8Kle4UH0kJTdABAbqhzG+3pcG6QjL9kz7NgGBfph+a5dw==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.1.0.tgz", + "integrity": "sha512-pn/sR8IrcF/T0vpWLilih8jmVouMlxqXxKuAojmbiGX5n/gDnz+abdPptlj0vYnbfE0SQNl3CY/HwtM0+yfOVQ==", "dev": true, "dependencies": { "cli-truncate": "^3.1.0", @@ -10538,9 +10538,9 @@ } }, "node_modules/rxjs": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", - "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.6.0.tgz", + "integrity": "sha512-DDa7d8TFNUalGC9VqXvQ1euWNN7sc63TrUCuM9J998+ViviahMIjKSOU7rfcgFOF+FCD71BhDRv4hrFz+ImDLQ==", "dev": true, "dependencies": { "tslib": "^2.1.0" @@ -11071,9 +11071,9 @@ } }, "node_modules/superagent": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.0.4.tgz", - "integrity": "sha512-yaQB7YqAHhutt8yU7XIRKXGXtkxKidVuiDJ8FJPBG7JPd7Ckv4X9cOdxVGH5DFsPXodsCrOSzdUi2xL+o9z1qw==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.0.5.tgz", + "integrity": "sha512-lQVE0Praz7nHiSaJLKBM/cZyi7J0E4io8tWnGSBdBrqAzhzrjQ/F5iGP9Zr29CJC8N5zYdhG2kKaNcB6dKxp7g==", "dependencies": { "component-emitter": "^1.3.0", "cookiejar": "^2.1.3", @@ -11102,9 +11102,9 @@ } }, "node_modules/supertest": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.3.1.tgz", - "integrity": "sha512-hRohNeIfk/cA48Cxpa/w48hktP6ZaRqXb0QV5rLvW0C7paRsBU3Q5zydzYrslOJtj/gd48qx540jKtcs6vG1fQ==", + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.3.2.tgz", + "integrity": "sha512-mSmbW/sPpBU6K8w8189ZiHdc62zMe7dCHpC2ktS9tc0/d2DN0FaxNbDJJNFknZD4jCrGJpxkiFoVyemvKgOdwA==", "dev": true, "dependencies": { "methods": "^1.1.2", @@ -14215,9 +14215,9 @@ } }, "@types/jest": { - "version": "29.2.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.2.3.tgz", - "integrity": "sha512-6XwoEbmatfyoCjWRX7z0fKMmgYKe9+/HrviJ5k0X/tjJWHGAezZOfYaxqQKuzG/TvQyr+ktjm4jgbk0s4/oF2w==", + "version": "29.2.4", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.2.4.tgz", + "integrity": "sha512-PipFB04k2qTRPePduVLTRiPzQfvMeLwUN3Z21hsAKaB/W9IIzgB2pizCL466ftJlcyZqnHoC9ZHpxLGl3fS86A==", "dev": true, "requires": { "expect": "^29.0.0", @@ -15130,9 +15130,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001435", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001435.tgz", - "integrity": "sha512-kdCkUTjR+v4YAJelyiDTqiu82BDr4W4CP5sgTA0ZBmqn30XfS2ZghPLMowik9TPhS+psWJiUNxsqLyurDbmutA==", + "version": "1.0.30001436", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001436.tgz", + "integrity": "sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg==", "dev": true }, "caseless": { @@ -16041,9 +16041,9 @@ "dev": true }, "eslint": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", - "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", + "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.3", @@ -16389,9 +16389,9 @@ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" }, "eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "execa": { @@ -16645,9 +16645,9 @@ "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz", + "integrity": "sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -18224,9 +18224,9 @@ "dev": true }, "lint-staged": { - "version": "13.0.4", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.4.tgz", - "integrity": "sha512-HxlHCXoYRsq9QCby5wFozmZW00hMs/9e3l+/dz6Qr8Kle4UH0kJTdABAbqhzG+3pcG6QjL9kz7NgGBfph+a5dw==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.1.0.tgz", + "integrity": "sha512-pn/sR8IrcF/T0vpWLilih8jmVouMlxqXxKuAojmbiGX5n/gDnz+abdPptlj0vYnbfE0SQNl3CY/HwtM0+yfOVQ==", "dev": true, "requires": { "cli-truncate": "^3.1.0", @@ -19770,9 +19770,9 @@ } }, "rxjs": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", - "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.6.0.tgz", + "integrity": "sha512-DDa7d8TFNUalGC9VqXvQ1euWNN7sc63TrUCuM9J998+ViviahMIjKSOU7rfcgFOF+FCD71BhDRv4hrFz+ImDLQ==", "dev": true, "requires": { "tslib": "^2.1.0" @@ -20194,9 +20194,9 @@ "dev": true }, "superagent": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.0.4.tgz", - "integrity": "sha512-yaQB7YqAHhutt8yU7XIRKXGXtkxKidVuiDJ8FJPBG7JPd7Ckv4X9cOdxVGH5DFsPXodsCrOSzdUi2xL+o9z1qw==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.0.5.tgz", + "integrity": "sha512-lQVE0Praz7nHiSaJLKBM/cZyi7J0E4io8tWnGSBdBrqAzhzrjQ/F5iGP9Zr29CJC8N5zYdhG2kKaNcB6dKxp7g==", "requires": { "component-emitter": "^1.3.0", "cookiejar": "^2.1.3", @@ -20218,9 +20218,9 @@ } }, "supertest": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.3.1.tgz", - "integrity": "sha512-hRohNeIfk/cA48Cxpa/w48hktP6ZaRqXb0QV5rLvW0C7paRsBU3Q5zydzYrslOJtj/gd48qx540jKtcs6vG1fQ==", + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.3.2.tgz", + "integrity": "sha512-mSmbW/sPpBU6K8w8189ZiHdc62zMe7dCHpC2ktS9tc0/d2DN0FaxNbDJJNFknZD4jCrGJpxkiFoVyemvKgOdwA==", "dev": true, "requires": { "methods": "^1.1.2", diff --git a/package.json b/package.json index ec9b465..84d6969 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "passport-oauth2": "^1.6.1", "prom-client": "^14.0.1", "redis": "^4.5.1", - "superagent": "^8.0.4", + "superagent": "^8.0.5", "url-value-parser": "^2.2.0" }, "devDependencies": { @@ -157,7 +157,7 @@ "nodemon": "^2.0.19", "prettier": "^2.8.0", "sass": "^1.56.1", - "supertest": "^6.3.1", + "supertest": "^6.3.2", "ts-jest": "^29.0.3", "typescript": "^4.9.3" } From b7859a58748c70914f23b29e7ae60de1b2c35c96 Mon Sep 17 00:00:00 2001 From: karenmillermoj Date: Mon, 5 Dec 2022 10:44:32 +0000 Subject: [PATCH 4/9] HAAR-1031 Major dependency updates --- package-lock.json | 46 +++++++++++++++++++++++----------------------- package.json | 6 +++--- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index a991ac8..543a258 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,12 +21,12 @@ "cookie-session": "^2.0.0", "csurf": "^1.11.0", "dotenv": "^16.0.3", - "eslint-plugin-no-only-tests": "^2.6.0", + "eslint-plugin-no-only-tests": "^3.1.0", "express": "^4.18.2", "express-request-id": "^1.4.1", "express-session": "^1.17.3", "govuk-frontend": "^4.4.0", - "helmet": "^5.1.1", + "helmet": "^6.0.1", "http-errors": "^2.0.0", "jquery": "^3.6.1", "jwt-decode": "^3.1.2", @@ -49,7 +49,7 @@ "@types/csurf": "^1.11.2", "@types/express-request-id": "^1.4.3", "@types/express-session": "^1.17.5", - "@types/http-errors": "^1.8.2", + "@types/http-errors": "^2.0.1", "@types/jest": "^29.2.3", "@types/jsonwebtoken": "^8.5.9", "@types/node": "^18.11.10", @@ -3001,9 +3001,9 @@ } }, "node_modules/@types/http-errors": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-1.8.2.tgz", - "integrity": "sha512-EqX+YQxINb+MeXaIqYDASb6U6FCHbWjkj4a1CKDBks3d/QiB2+PqBLyO72vLDgAO1wUI4O+9gweRcQK11bTL/w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==", "dev": true }, "node_modules/@types/ioredis": { @@ -5758,11 +5758,11 @@ "dev": true }, "node_modules/eslint-plugin-no-only-tests": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.6.0.tgz", - "integrity": "sha512-T9SmE/g6UV1uZo1oHAqOvL86XWl7Pl2EpRpnLI8g/bkJu+h7XBCB+1LnubRZ2CUQXj805vh4/CYZdnqtVaEo2Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.1.0.tgz", + "integrity": "sha512-Lf4YW/bL6Un1R6A76pRZyE1dl1vr31G/ev8UzIc/geCgFWyrKil8hVjYqWVKGB/UIGmb6Slzs9T0wNezdSVegw==", "engines": { - "node": ">=4.0.0" + "node": ">=5.0.0" } }, "node_modules/eslint-plugin-prettier": { @@ -6852,11 +6852,11 @@ } }, "node_modules/helmet": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.1.tgz", - "integrity": "sha512-/yX0oVZBggA9cLJh8aw3PPCfedBnbd7J2aowjzsaWwZh7/UFY0nccn/aHAggIgWUFfnykX8GKd3a1pSbrmlcVQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-6.0.1.tgz", + "integrity": "sha512-8wo+VdQhTMVBMCITYZaGTbE4lvlthelPYSvoyNvk4RECTmrVjMerp9RfUOQXZWLvCcAn1pKj7ZRxK4lI9Alrcw==", "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" } }, "node_modules/hexoid": { @@ -14176,9 +14176,9 @@ } }, "@types/http-errors": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-1.8.2.tgz", - "integrity": "sha512-EqX+YQxINb+MeXaIqYDASb6U6FCHbWjkj4a1CKDBks3d/QiB2+PqBLyO72vLDgAO1wUI4O+9gweRcQK11bTL/w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==", "dev": true }, "@types/ioredis": { @@ -16274,9 +16274,9 @@ } }, "eslint-plugin-no-only-tests": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.6.0.tgz", - "integrity": "sha512-T9SmE/g6UV1uZo1oHAqOvL86XWl7Pl2EpRpnLI8g/bkJu+h7XBCB+1LnubRZ2CUQXj805vh4/CYZdnqtVaEo2Q==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.1.0.tgz", + "integrity": "sha512-Lf4YW/bL6Un1R6A76pRZyE1dl1vr31G/ev8UzIc/geCgFWyrKil8hVjYqWVKGB/UIGmb6Slzs9T0wNezdSVegw==" }, "eslint-plugin-prettier": { "version": "4.2.1", @@ -17064,9 +17064,9 @@ "peer": true }, "helmet": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.1.tgz", - "integrity": "sha512-/yX0oVZBggA9cLJh8aw3PPCfedBnbd7J2aowjzsaWwZh7/UFY0nccn/aHAggIgWUFfnykX8GKd3a1pSbrmlcVQ==" + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-6.0.1.tgz", + "integrity": "sha512-8wo+VdQhTMVBMCITYZaGTbE4lvlthelPYSvoyNvk4RECTmrVjMerp9RfUOQXZWLvCcAn1pKj7ZRxK4lI9Alrcw==" }, "hexoid": { "version": "1.0.0", diff --git a/package.json b/package.json index 84d6969..0a5003c 100644 --- a/package.json +++ b/package.json @@ -96,12 +96,12 @@ "cookie-session": "^2.0.0", "csurf": "^1.11.0", "dotenv": "^16.0.3", - "eslint-plugin-no-only-tests": "^2.6.0", + "eslint-plugin-no-only-tests": "^3.1.0", "express": "^4.18.2", "express-request-id": "^1.4.1", "express-session": "^1.17.3", "govuk-frontend": "^4.4.0", - "helmet": "^5.1.1", + "helmet": "^6.0.1", "http-errors": "^2.0.0", "jquery": "^3.6.1", "jwt-decode": "^3.1.2", @@ -124,7 +124,7 @@ "@types/csurf": "^1.11.2", "@types/express-request-id": "^1.4.3", "@types/express-session": "^1.17.5", - "@types/http-errors": "^1.8.2", + "@types/http-errors": "^2.0.1", "@types/jest": "^29.2.3", "@types/jsonwebtoken": "^8.5.9", "@types/node": "^18.11.10", From 4a7c408648f7711806610a62779c1e9c5abf247b Mon Sep 17 00:00:00 2001 From: karenmillermoj Date: Mon, 5 Dec 2022 11:11:57 +0000 Subject: [PATCH 5/9] HAAR-1031 Update cypress --- cypress.config.ts | 24 ++++++++++++++++++++++++ cypress.json | 17 ----------------- package-lock.json | 18 +++++++++--------- package.json | 2 +- tsconfig.json | 2 +- 5 files changed, 35 insertions(+), 28 deletions(-) create mode 100644 cypress.config.ts delete mode 100644 cypress.json diff --git a/cypress.config.ts b/cypress.config.ts new file mode 100644 index 0000000..37de93d --- /dev/null +++ b/cypress.config.ts @@ -0,0 +1,24 @@ +import { defineConfig } from 'cypress' +import setupNodeEvents from './integration_tests/plugins/index' + +export default defineConfig({ + chromeWebSecurity: false, + fixturesFolder: 'integration_tests/fixtures', + screenshotsFolder: 'integration_tests/screenshots', + videosFolder: 'integration_tests/videos', + reporter: 'cypress-multi-reporters', + reporterOptions: { + configFile: 'reporter-config.json', + }, + videoUploadOnPasses: false, + taskTimeout: 60000, + e2e: { + // We've imported your old cypress plugins here. + // You may want to clean this up later by importing these. + setupNodeEvents, + baseUrl: 'http://localhost:3007', + excludeSpecPattern: '**/!(*.cy).ts', + specPattern: 'integration_tests/integration/**/*.cy.{js,jsx,ts,tsx}', + supportFile: 'integration_tests/support/index.ts', + }, +}) diff --git a/cypress.json b/cypress.json deleted file mode 100644 index a4a214a..0000000 --- a/cypress.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "chromeWebSecurity": false, - "baseUrl": "http://localhost:3007", - "ignoreTestFiles": "**/!(*.cy).ts", - "fixturesFolder": "integration_tests/fixtures", - "integrationFolder": "integration_tests/integration", - "pluginsFile": "integration_tests/plugins/index.ts", - "screenshotsFolder": "integration_tests/screenshots", - "supportFile": "integration_tests/support/index.ts", - "videosFolder": "integration_tests/videos", - "reporter": "cypress-multi-reporters", - "reporterOptions": { - "configFile": "reporter-config.json" - }, - "videoUploadOnPasses": false, - "taskTimeout": 60000 -} diff --git a/package-lock.json b/package-lock.json index 543a258..dad51d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -62,7 +62,7 @@ "@typescript-eslint/eslint-plugin": "^5.45.0", "@typescript-eslint/parser": "^5.45.0", "concurrently": "^7.6.0", - "cypress": "^9.7.0", + "cypress": "^11.2.0", "cypress-multi-reporters": "^1.5.0", "eslint": "^8.20.0", "eslint-config-airbnb-base": "^15.0.0", @@ -4958,9 +4958,9 @@ } }, "node_modules/cypress": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.7.0.tgz", - "integrity": "sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-11.2.0.tgz", + "integrity": "sha512-u61UGwtu7lpsNWLUma/FKNOsrjcI6wleNmda/TyKHe0dOBcVjbCPlp1N6uwFZ0doXev7f/91YDpU9bqDCFeBLA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -4983,7 +4983,7 @@ "dayjs": "^1.10.4", "debug": "^4.3.2", "enquirer": "^2.3.6", - "eventemitter2": "^6.4.3", + "eventemitter2": "6.4.7", "execa": "4.1.0", "executable": "^4.1.1", "extract-zip": "2.0.1", @@ -15634,9 +15634,9 @@ } }, "cypress": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.7.0.tgz", - "integrity": "sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-11.2.0.tgz", + "integrity": "sha512-u61UGwtu7lpsNWLUma/FKNOsrjcI6wleNmda/TyKHe0dOBcVjbCPlp1N6uwFZ0doXev7f/91YDpU9bqDCFeBLA==", "dev": true, "requires": { "@cypress/request": "^2.88.10", @@ -15658,7 +15658,7 @@ "dayjs": "^1.10.4", "debug": "^4.3.2", "enquirer": "^2.3.6", - "eventemitter2": "^6.4.3", + "eventemitter2": "6.4.7", "execa": "4.1.0", "executable": "^4.1.1", "extract-zip": "2.0.1", diff --git a/package.json b/package.json index 0a5003c..8f98ea8 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "@typescript-eslint/eslint-plugin": "^5.45.0", "@typescript-eslint/parser": "^5.45.0", "concurrently": "^7.6.0", - "cypress": "^9.7.0", + "cypress": "^11.2.0", "cypress-multi-reporters": "^1.5.0", "eslint": "^8.20.0", "eslint-config-airbnb-base": "^15.0.0", diff --git a/tsconfig.json b/tsconfig.json index 5baf425..80620fe 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,6 +18,6 @@ "experimentalDecorators": true, "typeRoots": ["./server/@types", "./node_modules/@types"] }, - "exclude": ["node_modules", "assets/**/*.js", "integration_tests", "dist"], + "exclude": ["node_modules", "assets/**/*.js", "integration_tests", "dist", "cypress.config.ts"], "include": ["**/*.js", "**/*.ts"] } From e789c835cb58e3baf054af4806c429afd9d8e7bb Mon Sep 17 00:00:00 2001 From: karenmillermoj Date: Mon, 5 Dec 2022 11:20:41 +0000 Subject: [PATCH 6/9] HAAR-1031 Allow cypress in devDependencies --- integration_tests/.eslintrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/integration_tests/.eslintrc b/integration_tests/.eslintrc index 63948c5..1651aec 100644 --- a/integration_tests/.eslintrc +++ b/integration_tests/.eslintrc @@ -1,10 +1,11 @@ { - "plugins": ["cypress"], + "plugins": ["cypress", "no-only-tests"], "env": { "cypress/globals": true }, "extends": ["plugin:cypress/recommended"], "rules": { - "import/no-extraneous-dependencies": ["error", {"devDependencies": true}] + "import/no-extraneous-dependencies": ["error", {"devDependencies": true}], + "no-only-tests/no-only-tests": "error" } } From fc6acdeebd4d4a105dab8ac24922ebd30a30121d Mon Sep 17 00:00:00 2001 From: karenmillermoj Date: Mon, 5 Dec 2022 11:33:01 +0000 Subject: [PATCH 7/9] HAAR-1031 ensure correct port set --- Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 65676e1..8e1cd81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ ENV TZ=Europe/London RUN ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && echo "$TZ" > /etc/timezone RUN addgroup --gid 2000 --system appgroup && \ - adduser --uid 2000 --system appuser --gid 2000 + adduser --uid 2000 --system appuser --gid 2000 WORKDIR /app @@ -18,9 +18,9 @@ WORKDIR /app ENV BUILD_NUMBER ${BUILD_NUMBER:-1_0_0} RUN apt-get update && \ - apt-get upgrade -y && \ - apt-get autoremove -y && \ - rm -rf /var/lib/apt/lists/* + apt-get upgrade -y && \ + apt-get autoremove -y && \ + rm -rf /var/lib/apt/lists/* # Stage: build assets FROM base as build @@ -29,7 +29,7 @@ ARG BUILD_NUMBER=1_0_0 ARG GIT_REF=not-available RUN apt-get update && \ - apt-get install -y make python g++ + apt-get install -y make python g++ COPY package*.json ./ RUN CYPRESS_INSTALL_BINARY=0 npm ci --no-audit @@ -38,8 +38,8 @@ COPY . . RUN npm run build RUN export BUILD_NUMBER=${BUILD_NUMBER} && \ - export GIT_REF=${GIT_REF} && \ - npm run record-build-info + export GIT_REF=${GIT_REF} && \ + npm run record-build-info RUN npm prune --no-audit --production @@ -63,7 +63,7 @@ COPY --from=build --chown=appuser:appgroup \ COPY --from=build --chown=appuser:appgroup \ /app/node_modules ./node_modules -EXPOSE 3000 3001 +EXPOSE 3000 ENV NODE_ENV='production' USER 2000 From 5184aa2952fdeb8c67e8725aa8018fd0dea29870 Mon Sep 17 00:00:00 2001 From: karenmillermoj Date: Mon, 5 Dec 2022 11:51:41 +0000 Subject: [PATCH 8/9] HAAR-1031 ensure correct port set --- .eslintrc.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 0a7dfb4..bc17171 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -36,7 +36,6 @@ "@typescript-eslint/no-use-before-define": 0, "class-methods-use-this": 0, "no-useless-constructor": 0, - "no-promise-executor-return": 0, "@typescript-eslint/no-unused-vars": [ 1, { @@ -94,7 +93,10 @@ "functions": "never" } ], - "import/no-extraneous-dependencies": ["error", { "devDependencies": ["**/*.test.js", "**/*.test.ts"] }], + "import/no-extraneous-dependencies": [ + "error", + { "devDependencies": ["**/*.test.js", "**/*.test.ts", "cypress.config.ts"] } + ], "prettier/prettier": [ "error", { From cb252173269e20fce4a33705592e630c7f8cd5dd Mon Sep 17 00:00:00 2001 From: karenmillermoj Date: Mon, 5 Dec 2022 11:55:16 +0000 Subject: [PATCH 9/9] HAAR-1031 update config --- .eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.json b/.eslintrc.json index bc17171..6fd4914 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -36,6 +36,7 @@ "@typescript-eslint/no-use-before-define": 0, "class-methods-use-this": 0, "no-useless-constructor": 0, + "no-promise-executor-return": 0, "@typescript-eslint/no-unused-vars": [ 1, {