|
23 | 23 | "test:frontend:ui": "vitest --ui --config vitest.frontend.config.ts", |
24 | 24 | "test:frontend:coverage": "vitest run --coverage --config vitest.frontend.config.ts", |
25 | 25 | "test:e2e": "vitest run --config vitest.e2e.config.ts", |
| 26 | + "test:integration": "vitest run \"test/integration/**/*.test.ts\"", |
| 27 | + "test:performance": "vitest run \"test/performance/**/*.test.ts\"", |
26 | 28 | "test:e2e:watch": "vitest --config vitest.e2e.config.ts", |
27 | 29 | "test:e2e:ui": "vitest --ui --config vitest.e2e.config.ts", |
28 | 30 | "test:e2e:coverage": "vitest run --coverage --config vitest.e2e.config.ts", |
29 | | - "test:all": "pnpm test:backend && pnpm test:frontend && pnpm test:e2e && pnpm test:coverage", |
| 31 | + "test:all": "pnpm test:backend && pnpm test:frontend && pnpm test:integration && pnpm test:performance && pnpm test:e2e && pnpm test:coverage", |
30 | 32 | "test:generate": "ts-node scripts/test-generator.ts", |
31 | 33 | "test:orchestrate": "ts-node scripts/test-orchestrator.ts", |
32 | 34 | "test:ci": "pnpm test:all --reporter=verbose --reporter=json --outputFile=test-results.json", |
33 | 35 | "postinstall": "electron-builder install-app-deps", |
34 | | - "gen": "openapi --input http://127.0.0.1:3007/api-json --output ./src/frontend/generated --useOptions --name=Play" |
| 36 | + "gen": "openapi --input http://127.0.0.1:3007/api-json --output ./src/frontend/generated --useOptions --name=Play", |
| 37 | + "playwright:install": "npx playwright install --with-deps", |
| 38 | + "test:playwright": "playwright test", |
| 39 | + "test:playwright:report": "playwright show-report" |
35 | 40 | }, |
36 | 41 | "dependencies": { |
37 | 42 | "@doubleshot/nest-electron": "^0.2.5", |
|
69 | 74 | "devDependencies": { |
70 | 75 | "@lightwing/eslint-config": "^0.0.24", |
71 | 76 | "@nestjs/testing": "^10.2.8", |
| 77 | + "@playwright/test": "^1.48.0", |
72 | 78 | "@testing-library/user-event": "^14.5.1", |
73 | 79 | "@testing-library/vue": "^8.0.1", |
74 | 80 | "@types/echarts": "^4.9.21", |
|
103 | 109 | "vue-tsc": "1.8.19" |
104 | 110 | }, |
105 | 111 | "simple-git-hooks": { |
106 | | - "pre-commit": "npx lint-staged" |
| 112 | + "pre-commit": "npx lint-staged && pnpm -s test:playwright || true" |
107 | 113 | }, |
108 | 114 | "lint-staged": { |
109 | 115 | "*.{js,ts,tsx,vue}": [ |
110 | 116 | "eslint --fix", |
111 | 117 | "vitest related --run" |
112 | 118 | ], |
| 119 | + "tests/playwright/**/*.ts": [ |
| 120 | + "node -e \"console.log('Playwright specs staged, will run in hook')\"" |
| 121 | + ], |
113 | 122 | "*.{md,json,yml}": [ |
114 | 123 | "eslint --fix" |
115 | 124 | ] |
|
0 commit comments