You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
npmrun
71ce463e4d
feat: add E2E testing framework with Playwright
- Install @playwright/test@1.49.1, @nuxt/test-utils@3.15.4, dotenv-cli@7.4.4
- Add .env.test for test environment configuration
- Add E2E_TEST_MODE and E2E_FIXED_CAPTCHA env variables to schema
- Inject fixed captcha in challenge.ts when E2E_TEST_MODE is enabled
- Create e2e/ directory structure: specs/, helpers/, fixtures/
- Implement global-setup.ts: build → migrate → seed → spawn server
- Implement global-teardown.ts: stop server via PID
- Write 27 test cases across 4 spec files:
- smoke.spec.ts (5 tests): homepage, login/register pages, captcha API, config API
- auth-login.spec.ts (7 tests): UI login, toast, wrong password/captcha, redirect
- auth-register.spec.ts (6 tests): validation, success, duplicate, login after register
- auth-guard.spec.ts (9 tests): public/protected paths, authenticated access, API guard
- Add test:e2e, test:e2e:ui, test:e2e:headed scripts to package.json
- Update .gitignore for test artifacts (db.test.sqlite, test-results/, playwright-report/)
- Update CLAUDE.md with E2E testing architecture and guidelines
Test server: build + preview mode with isolated SQLite database
Captcha injection: business code branch gated by E2E_TEST_MODE env
All 27 tests passing.
Co-authored-by: CodeFree <codefree@chinatelcom.cn>
|
2 months ago |
| .. |
|
index.ts
|
feat: 引入 env 包以集中管理环境变量,更新相关代码以使用新的 env 结构
|
3 months ago |
|
package.json
|
feat: 引入 env 包以集中管理环境变量,更新相关代码以使用新的 env 结构
|
3 months ago |
|
schema.ts
|
feat: add E2E testing framework with Playwright
|
2 months ago |