Add frontend tests (#22783)

* basic e2e frontend test framework

* improve mock data generation and add test cases

* more cases

* add e2e tests to PR template

* don't generate mock data in PR CI

* satisfy codeql check

* fix flaky system page tab tests by guarding against crashes from incomplete mock stats

* reduce local test runs to 4 workers to match CI
This commit is contained in:
Josh Hawkins
2026-04-06 17:33:28 -05:00
committed by GitHub
parent ed3bebc967
commit c750372586
34 changed files with 2790 additions and 0 deletions
+5
View File
@@ -13,6 +13,10 @@
"prettier:write": "prettier -u -w --ignore-path .gitignore \"*.{ts,tsx,js,jsx,css,html}\"",
"test": "vitest",
"coverage": "vitest run --coverage",
"e2e:build": "tsc && vite build --base=/",
"e2e": "playwright test --config e2e/playwright.config.ts",
"e2e:ui": "playwright test --config e2e/playwright.config.ts --ui",
"e2e:headed": "playwright test --config e2e/playwright.config.ts --headed",
"i18n:extract": "i18next-cli extract",
"i18n:extract:ci": "i18next-cli extract --ci",
"i18n:status": "i18next-cli status"
@@ -98,6 +102,7 @@
"zod": "^3.23.8"
},
"devDependencies": {
"@playwright/test": "^1.59.1",
"@tailwindcss/forms": "^0.5.9",
"@testing-library/jest-dom": "^6.6.2",
"@types/js-yaml": "^4.0.9",