Files
termi-blog/playwright-smoke/README.md
limitcool ee0bec4a78
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
test: add full playwright ui regression coverage
2026-04-02 00:55:34 +08:00

34 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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` channelCI 仍使用 `playwright install chromium`
- 当前已覆盖:
- 前台首页过滤、文章详情、评论、搜索、AI 问答、友链申请、订阅确认/管理/退订
- 后台:登录、导航、评论审核、友链审核
- 后台深度回归:分类 CRUD、标签 CRUD、订阅 CRUD / 测试发送 / weekly & monthly digest、文章创建/保存/版本恢复/删除、媒体上传/元数据/替换/删除、站点设置保存/AI 重建索引/Provider 连通性/存储连通性、评测 CRUD / AI 润色、评论画像与黑名单管理