- Added npm run commands to support inforitnl/front-end-build

- Fixed e2e test which targeted the wrong word.
- Updated minor/patch versions of npm packages
- Added junit output for test runners
This commit is contained in:
Rick van Lieshout 2022-07-19 10:40:02 +02:00
parent 0003df5fab
commit 2e49bd9f09
7 changed files with 4233 additions and 2790 deletions

1
.gitignore vendored
View File

@ -69,3 +69,4 @@ bundle.zip
cypress/videos cypress/videos
cypress/screenshots cypress/screenshots
dist-tests/**

View File

@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.3.1] - 2022-07-19
- Added npm run commands to support inforitnl/front-end-build
- Fixed e2e test which targeted the wrong word.
- Updated minor/patch versions of npm packages
- Added junit output for test runners
## [0.3.0] - 2022-07-07 ## [0.3.0] - 2022-07-07
- Added translations - Added translations

View File

@ -7,4 +7,10 @@ export default defineConfig({
}, },
}, },
video: false, video: false,
reporter: "mocha-junit-reporter",
reporterOptions: {
testsuitesTitle: true,
mochaFile: "dist-tests/test-results/cypress/[hash].xml",
outputs: true,
},
}); });

View File

@ -9,6 +9,6 @@ describe("Application navigation", () => {
it("Should navigate to about when clicking on About", () => { it("Should navigate to about when clicking on About", () => {
cy.get('[data-testid="nav.about"]').click(); cy.get('[data-testid="nav.about"]').click();
cy.contains("about"); cy.contains("About");
}); });
}); });

View File

@ -3,6 +3,18 @@
const config = { const config = {
roots: ["<rootDir>/src"], roots: ["<rootDir>/src"],
collectCoverageFrom: ["src/**/*.{js,jsx,ts,tsx}", "!src/**/*.d.ts"], collectCoverageFrom: ["src/**/*.{js,jsx,ts,tsx}", "!src/**/*.d.ts"],
reporters: [
[
"jest-junit",
{
outputDirectory: "dist-tests/test-results/jest",
outputName: "jest.xml",
includeShortConsoleOutput: true,
classNameTemplate: "{classname}-{title}",
titleTemplate: "{classname}-{title}",
},
],
],
setupFiles: ["react-app-polyfill/jsdom"], setupFiles: ["react-app-polyfill/jsdom"],
setupFilesAfterEnv: ["<rootDir>/src/setupTests.ts"], setupFilesAfterEnv: ["<rootDir>/src/setupTests.ts"],
testMatch: [ testMatch: [

6933
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -25,6 +25,7 @@
}, },
"scripts": { "scripts": {
"build": "node scripts/build.js", "build": "node scripts/build.js",
"build:prod": "npm run build",
"e2e": "cypress open -d --e2e", "e2e": "cypress open -d --e2e",
"e2e-ci": "cypress run", "e2e-ci": "cypress run",
"postinstall": "husky install", "postinstall": "husky install",
@ -34,15 +35,16 @@
"pretty-quick": "pretty-quick --staged", "pretty-quick": "pretty-quick --staged",
"start": "node scripts/start.js", "start": "node scripts/start.js",
"test": "node scripts/test.js", "test": "node scripts/test.js",
"test-ci": "node scripts/test.js --ci", "test-ci": "node scripts/test.js --ci --coverage",
"test-live-coverage": " concurrently --kill-others \"npm run test-with-coverage\" \"npx http-server -c-1 coverage/lcov-report\"", "test-live-coverage": " concurrently --kill-others \"npm run test-with-coverage\" \"npx http-server -c-1 coverage/lcov-report\"",
"test-with-coverage": "node scripts/test.js --coverage" "test-with-coverage": "node scripts/test.js --coverage",
"test:prod": "npm run test-ci && npm run e2e-ci"
}, },
"lint-staged": { "lint-staged": {
"*.{ts,js,jsx,tsx,css,scss,json,md}": "prettier --write" "*.{ts,js,jsx,tsx,css,scss,json,md}": "prettier --write"
}, },
"dependencies": { "dependencies": {
"@reduxjs/toolkit": "^1.8.2", "@reduxjs/toolkit": "^1.8.3",
"i18next-http-backend": "^1.4.1", "i18next-http-backend": "^1.4.1",
"luxon": "^2.4.0", "luxon": "^2.4.0",
"react": "^18.2.0", "react": "^18.2.0",
@ -51,33 +53,33 @@
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-redux": "^8.0.2", "react-redux": "^8.0.2",
"react-router-dom": "^6.3.0", "react-router-dom": "^6.3.0",
"tailwindcss": "^3.0.2" "tailwindcss": "^3.1.6"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.16.0", "@babel/core": "^7.18.6",
"@mastermindzh/prettier-config": "^1.0.0", "@mastermindzh/prettier-config": "^1.0.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
"@svgr/webpack": "^5.5.0", "@svgr/webpack": "^5.5.0",
"@testing-library/jest-dom": "^5.16.4", "@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0", "@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^14.2.1", "@testing-library/user-event": "^14.2.5",
"@types/jest": "^27.5.2", "@types/jest": "^28.1.6",
"@types/luxon": "^2.3.2", "@types/luxon": "^2.3.2",
"@types/node": "^17.0.45", "@types/node": "^18.0.6",
"@types/react": "^18.0.14", "@types/react": "^18.0.15",
"@types/react-dom": "^18.0.5", "@types/react-dom": "^18.0.6",
"babel-jest": "^27.4.2", "babel-jest": "^27.4.2",
"babel-loader": "^8.2.3", "babel-loader": "^8.2.5",
"babel-plugin-named-asset-import": "^0.3.8", "babel-plugin-named-asset-import": "^0.3.8",
"babel-preset-react-app": "^10.0.1", "babel-preset-react-app": "^10.0.1",
"bfj": "^7.0.2", "bfj": "^7.0.2",
"browserslist": "^4.18.1", "browserslist": "^4.21.2",
"camelcase": "^6.2.1", "camelcase": "^6.2.1",
"case-sensitive-paths-webpack-plugin": "^2.4.0", "case-sensitive-paths-webpack-plugin": "^2.4.0",
"concurrently": "^7.2.2", "concurrently": "^7.2.2",
"css-loader": "^6.5.1", "css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^3.2.0", "css-minimizer-webpack-plugin": "^3.2.0",
"cypress": "^10.2.0", "cypress": "^10.3.0",
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
"dotenv-expand": "^5.1.0", "dotenv-expand": "^5.1.0",
"eslint": "^8.3.0", "eslint": "^8.3.0",
@ -87,42 +89,44 @@
"eslint-plugin-import": "^2.26.0", "eslint-plugin-import": "^2.26.0",
"eslint-plugin-react": "^7.30.1", "eslint-plugin-react": "^7.30.1",
"eslint-watch": "^8.0.0", "eslint-watch": "^8.0.0",
"eslint-webpack-plugin": "^3.1.1", "eslint-webpack-plugin": "^3.2.0",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"fs-extra": "^10.0.0", "fs-extra": "^10.1.0",
"html-webpack-plugin": "^5.5.0", "html-webpack-plugin": "^5.5.0",
"husky": "^8.0.1", "husky": "^8.0.1",
"i18next": "^21.8.13", "i18next": "^21.8.14",
"i18next-browser-languagedetector": "^6.1.4", "i18next-browser-languagedetector": "^6.1.4",
"identity-obj-proxy": "^3.0.0", "identity-obj-proxy": "^3.0.0",
"immer": "^9.0.15", "immer": "^9.0.15",
"jest": "^27.4.3", "jest": "^27.4.3",
"jest-junit": "^14.0.0",
"jest-resolve": "^27.4.2", "jest-resolve": "^27.4.2",
"jest-watch-typeahead": "^1.0.0", "jest-watch-typeahead": "^1.0.0",
"lint-staged": "^13.0.3", "lint-staged": "^13.0.3",
"mini-css-extract-plugin": "^2.4.5", "mini-css-extract-plugin": "^2.6.1",
"postcss": "^8.4.4", "mocha-junit-reporter": "^2.0.2",
"postcss": "^8.4.14",
"postcss-flexbugs-fixes": "^5.0.2", "postcss-flexbugs-fixes": "^5.0.2",
"postcss-loader": "^6.2.1", "postcss-loader": "^6.2.1",
"postcss-normalize": "^10.0.1", "postcss-normalize": "^10.0.1",
"postcss-preset-env": "^7.0.1", "postcss-preset-env": "^7.7.2",
"prettier": "^2.7.1", "prettier": "^2.7.1",
"pretty-quick": "^3.1.3", "pretty-quick": "^3.1.3",
"prompts": "^2.4.2", "prompts": "^2.4.2",
"react-i18next": "^11.18.0", "react-i18next": "^11.18.1",
"react-refresh": "^0.11.0", "react-refresh": "^0.14.0",
"resolve": "^1.20.0", "resolve": "^1.22.1",
"resolve-url-loader": "^4.0.0", "resolve-url-loader": "^4.0.0",
"sass-loader": "^12.3.0", "sass-loader": "^12.3.0",
"semver": "^7.3.5", "semver": "^7.3.7",
"source-map-loader": "^3.0.0", "source-map-loader": "^3.0.0",
"style-loader": "^3.3.1", "style-loader": "^3.3.1",
"terser-webpack-plugin": "^5.2.5", "terser-webpack-plugin": "^5.3.3",
"typescript": "^4.7.4", "typescript": "^4.7.4",
"web-vitals": "^2.1.4", "web-vitals": "^2.1.4",
"webpack": "^5.64.4", "webpack": "^5.73.0",
"webpack-dev-server": "^4.6.0", "webpack-dev-server": "^4.9.3",
"webpack-manifest-plugin": "^4.0.2", "webpack-manifest-plugin": "^4.0.2",
"workbox-webpack-plugin": "^6.4.1" "workbox-webpack-plugin": "^6.5.3"
} }
} }