test: add full playwright ui regression coverage
Some checks failed
docker-images / build-and-push (admin, admin, termi-astro-admin, admin/Dockerfile) (push) Successful in 52s
docker-images / build-and-push (backend, backend, termi-astro-backend, backend/Dockerfile) (push) Failing after 13s
docker-images / build-and-push (frontend, frontend, termi-astro-frontend, frontend/Dockerfile) (push) Successful in 32s
ui-regression / playwright-regression (push) Failing after 14m24s
Some checks failed
docker-images / build-and-push (admin, admin, termi-astro-admin, admin/Dockerfile) (push) Successful in 52s
docker-images / build-and-push (backend, backend, termi-astro-backend, backend/Dockerfile) (push) Failing after 13s
docker-images / build-and-push (frontend, frontend, termi-astro-frontend, frontend/Dockerfile) (push) Successful in 32s
ui-regression / playwright-regression (push) Failing after 14m24s
This commit is contained in:
33
playwright-smoke/README.md
Normal file
33
playwright-smoke/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Playwright 回归测试
|
||||
|
||||
## 本地运行
|
||||
|
||||
```powershell
|
||||
cd playwright-smoke
|
||||
pnpm install
|
||||
pnpm test
|
||||
```
|
||||
|
||||
或在仓库根目录直接执行:
|
||||
|
||||
```powershell
|
||||
pnpm test:ui
|
||||
```
|
||||
|
||||
## 可用脚本
|
||||
|
||||
- `pnpm test`:跑前台 + 后台全量回归
|
||||
- `pnpm test:frontend`:只跑前台
|
||||
- `pnpm test:admin`:只跑后台
|
||||
- `pnpm test:headed`:有界面调试
|
||||
|
||||
## 设计说明
|
||||
|
||||
- 使用独立 `mock-server.mjs` 提供前台 SSR、前端交互、后台 CRUD 所需的稳定假数据。
|
||||
- CI 不依赖真实数据库 / Rust 后端,适合做前后台 UI 回归。
|
||||
- 每条用例开始前都会调用 mock reset,避免数据串扰。
|
||||
- 本地默认优先走已安装的 `msedge` channel,CI 仍使用 `playwright install chromium`。
|
||||
- 当前已覆盖:
|
||||
- 前台:首页过滤、文章详情、评论、搜索、AI 问答、友链申请、订阅确认/管理/退订
|
||||
- 后台:登录、导航、评论审核、友链审核
|
||||
- 后台深度回归:分类 CRUD、标签 CRUD、订阅 CRUD / 测试发送 / weekly & monthly digest、文章创建/保存/版本恢复/删除、媒体上传/元数据/替换/删除、站点设置保存/AI 重建索引/Provider 连通性/存储连通性、评测 CRUD / AI 润色、评论画像与黑名单管理
|
||||
Reference in New Issue
Block a user