fix: 修正Playwright测试方案架构问题(诸葛亮审查反馈)

- 新增fixtures/auth.ts 登录认证夹具
- 新增pages/LoginPage.ts 页面对象模型
- 新增specs/login.spec.ts 登录测试用例(成功/失败/空用户名)
- 新增specs/bug-regression.spec.ts Bug回归测试(#437/#427)
- 新增.env.test 测试环境变量模板
- package.json添加test:e2e/test:e2e:ui/test:e2e:report脚本
- 移除test-data.ts中密码硬编码,改用环境变量
- .gitignore添加.env.test.local/playwright-report/test-results

感谢诸葛亮架构审查!
This commit is contained in:
2026-04-25 21:07:40 +08:00
parent 25ce12cebf
commit e0e6693897
8 changed files with 130 additions and 16 deletions

View File

@@ -17,7 +17,10 @@
"test:run": "vitest run",
"test:coverage": "vitest run --coverage",
"test:ui": "vitest --ui",
"lint": "eslint . --ext .js,.vue src/"
"lint": "eslint . --ext .js,.vue src/",
"test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui",
"test:e2e:report": "playwright show-report"
},
"repository": {
"type": "git",
@@ -87,4 +90,4 @@
"vitest": "^4.0.18",
"vue-tsc": "^3.1.8"
}
}
}