Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ jobs:
run: npx playwright install --with-deps chromium

- name: Run E2E tests
run: npm run test:e2e -- --project=chromium --reporter=list
run: npm run test:e2e -- --project=chromium

- name: Upload test results
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: playwright-report
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ tests/e2e/**/*.mp4
# Playwright 浏览器缓存
.cache/ms-playwright/
specs
.cursor/
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx --no-install lint-staged --quiet
npx --no-install lint-staged --config package.json --quiet
12 changes: 0 additions & 12 deletions .lintstagedrc

This file was deleted.

18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"dev": "max dev",
"format": "prettier --cache --write .",
"postinstall": "max setup",
"lint": "max lint",
"prepare": "husky",
"setup": "max setup",
"start": "npm run dev",
Expand All @@ -17,6 +18,23 @@
"test:e2e:ui": "playwright test --ui",
"test:watch": "jest --watch"
},
"lint-staged": {
"*.{md,json}": [
"prettier --cache --write"
],
"*.{js,jsx}": [
"max lint --fix --eslint-only",
"prettier --cache --write"
],
"*.{css,less}": [
"max lint --fix --stylelint-only",
"prettier --cache --write"
],
"*.{ts,tsx}": [
"max lint --fix --eslint-only",
"prettier --cache --write"
]
},
"dependencies": {
"@ant-design/icons": "^5.0.1",
"@ant-design/pro-components": "^2.4.4",
Expand Down
3 changes: 2 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ export default defineConfig({
/* CI 环境禁用并行 */
workers: process.env.CI ? 1 : undefined,

/* 测试报告配置 */
/* 测试报告配置:CI 下加 list 便于日志,同时保留 html 以生成 playwright-report 供上传 */
reporter: [
...(process.env.CI ? [['list']] : []),
['html', { outputFolder: 'playwright-report' }],
['json', { outputFile: 'test-results/results.json' }],
['junit', { outputFile: 'test-results/junit.xml' }],
Expand Down
Loading