Repository navigation
E2e coverage - #195
E2e coverage#195
Conversation
- Add Playwright tests for API proxying, authentication failures, logout, and role-based route access - Configure isolated SQLite database setup with migrations and demo account bootstrapping - Start the real Actix backend and Vite development server for end-to-end tests - Add Playwright scripts, configuration, Chromium installation, and dependency lockfile entries - Run frontend unit tests and browser tests in GitHub Actions - Upload Playwright reports and failure diagnostics from CI - Document browser coverage, local execution, and excluded generated test data - Support configurable Vite API proxy targets and restrict Vitest discovery to source tests
- cover case workspace visibility, clue review, and volunteer task applications - verify intake confirmation, learning governance, and profile persistence - add shared API fixtures and SSE helpers for isolated Playwright scenarios - enable reviewer admin capabilities for E2E demo bootstrap - update E2E coverage documentation to mark implemented workflows
|
Warning Review limit reached
Next review available in: 9 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough新增 Playwright 浏览器端到端测试体系。测试使用隔离 SQLite 数据库、真实 Actix API 和 Vite 服务,覆盖认证、角色访问、案件协作、intake、学习治理、资料和志愿者任务,并接入 CI。 Changes浏览器端到端测试
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Playwright
participant Vite
participant AnguiDebugServer
participant SQLite
Playwright->>AnguiDebugServer: 启动并检查后端服务
AnguiDebugServer->>SQLite: 使用隔离 E2E 数据库
Playwright->>Vite: 启动前端服务
Vite->>AnguiDebugServer: 代理浏览器 API 请求
Playwright->>Vite: 执行业务流程断言
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 135-140: Update the README’s browser end-to-end test setup
instructions to run corepack enable before the existing Yarn Playwright
installation and npm test commands, ensuring Yarn is available as documented.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ec253c47-0224-4497-9a01-82fb1f94397d
⛔ Files ignored due to path filters (1)
frontend/yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (19)
.github/workflows/ci.yml.gitignoreREADME.mdfrontend/e2e/COVERAGE.mdfrontend/e2e/authentication-and-access.spec.tsfrontend/e2e/case-collaboration.spec.tsfrontend/e2e/case-workspace.spec.tsfrontend/e2e/intake-flow.spec.tsfrontend/e2e/learning-governance.spec.tsfrontend/e2e/playwright.config.tsfrontend/e2e/profile.spec.tsfrontend/e2e/start-backend.mjsfrontend/e2e/support.tsfrontend/e2e/volunteer-tasks.spec.tsfrontend/package.jsonfrontend/vite.config.tspackage.jsonsrc/application/services/auth_service.rssrc/bin/angui-admin.rs
| Browser end-to-end tests create an isolated SQLite database, explicitly run migrations, and bootstrap only `.invalid` demo accounts. Playwright then starts the real Actix API and Vite server to verify API proxying, login failure, session logout, and role-based route access. Install Chromium once before running the suite locally: | ||
|
|
||
| ```powershell | ||
| yarn --cwd frontend playwright install chromium | ||
| npm run test:e2e | ||
| ``` |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
先启用 Corepack。
README 只要求 Node.js 和 npm,但此处直接调用 yarn。未安装 Yarn 的开发者会在安装 Chromium 前失败。
在这些命令前添加 corepack enable。CI 已在 .github/workflows/ci.yml 的第 245-246 行执行此步骤。
建议修改
+corepack enable
yarn --cwd frontend playwright install chromium
npm run test:e2e📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Browser end-to-end tests create an isolated SQLite database, explicitly run migrations, and bootstrap only `.invalid` demo accounts. Playwright then starts the real Actix API and Vite server to verify API proxying, login failure, session logout, and role-based route access. Install Chromium once before running the suite locally: | |
| ```powershell | |
| yarn --cwd frontend playwright install chromium | |
| npm run test:e2e | |
| ``` | |
| Browser end-to-end tests create an isolated SQLite database, explicitly run migrations, and bootstrap only `.invalid` demo accounts. Playwright then starts the real Actix API and Vite server to verify API proxying, login failure, session logout, and role-based route access. Install Chromium once before running the suite locally: | |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` around lines 135 - 140, Update the README’s browser end-to-end
test setup instructions to run corepack enable before the existing Yarn
Playwright installation and npm test commands, ensuring Yarn is available as
documented.
- install Linux dependencies alongside Chromium in CI - ensure browser end-to-end tests run with required packages
- rely on self-hosted runner image for Chromium Linux dependencies - install only the Chromium browser without Playwright's `--with-deps` flag
- allow async workspace heading rendering up to five seconds - reduce test flakiness during slower test runs
- derive unique run IDs from GitHub workflow metadata or local process state - assign per-run database files, attachment directories, and port offsets - clean up the configured database and SQLite sidecar files before startup - add unique test suffixes using test IDs and retry counts - apply isolated suffixes to case, task, intake, profile, and learning fixtures
Preview readyThe preview for this build is available at https://pr-195-892665fa7f64.angui.cg8.site. Temporary demo accounts (all use the password
|
Summary by CodeRabbit
新功能
文档
测试