From f6ecdf224eb8e3d1c2269b239489803daac0cec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=94=B7?= Date: Fri, 1 May 2026 20:16:04 +0800 Subject: [PATCH] docs: add local E2E test workflow before CI push - Document running playwright tests locally against moicen before pushing - Helps avoid wasted CI cycles Co-Authored-By: Claude Opus 4.7 --- CLAUDE.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 2b55a36..225ad22 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,5 +1,24 @@ # huike-e2e-moicen 项目指南 +## 本地执行 E2E 测试(先本地,再 CI) + +推送前先在本机对 moicen 测试服执行 Playwright 测试,避免反复推送等 CI 结果: + +```bash +cd /Users/weli/works/huiwing-migration/huike-e2e-moicen + +# 执行指定测试文件 +npx playwright test tests/clazz-ui.spec.ts --reporter=list + +# 执行全部测试 +npx playwright test --reporter=list + +# 带 UI 调试模式 +npx playwright test --ui +``` + +测试通过后再 commit & push 触发远程 CI。 + ## CI 工作流 ### 等待 CI 完成