chore(test): fix test:e2e npm script to use explicit playwright command

- Replace `cd e2e && npm test` with `npx playwright test --config=playwright.config.ts`
- Avoids fragile npm parent package.json lookup
- Default config keeps full multi-browser coverage
This commit is contained in:
张翔
2026-07-08 17:48:59 +08:00
parent cdeb34d60c
commit d2a4e702da
+1 -1
View File
@@ -18,7 +18,7 @@
"test:coverage": "jest --coverage", "test:coverage": "jest --coverage",
"test:coverage:check": "jest --coverage --ci", "test:coverage:check": "jest --coverage --ci",
"coverage:report": "open coverage/lcov-report/index.html", "coverage:report": "open coverage/lcov-report/index.html",
"test:e2e": "cd e2e && npm test", "test:e2e": "cd e2e && npx playwright test --config=playwright.config.ts",
"test:smoke": "cd e2e && npx playwright test --grep @smoke", "test:smoke": "cd e2e && npx playwright test --grep @smoke",
"test:visual": "cd e2e && npx playwright test visual-regression.spec.ts --project=visual-chromium-desktop", "test:visual": "cd e2e && npx playwright test visual-regression.spec.ts --project=visual-chromium-desktop",
"test:visual:all": "cd e2e && npx playwright test visual-regression.spec.ts", "test:visual:all": "cd e2e && npx playwright test visual-regression.spec.ts",