Adds `paths:` YAML frontmatter so each rule only loads into Claude Code context when the agent is working on relevant files, keeping context lean in a large monorepo. - architecture-page-level-auth: fires on page.tsx and layout.tsx - data-prisma-migrations: fires on packages/prisma/** - testing-playwright: fires on playwright dirs, *.e2e.ts, and api e2e dirs - api-thin-controllers: fires on *.controller.ts files only Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
1.1 KiB
Markdown
38 lines
1.1 KiB
Markdown
---
|
|
paths:
|
|
- "apps/web/playwright/**"
|
|
- "packages/embeds/**/playwright/**"
|
|
- "apps/**/*.e2e.ts"
|
|
- "apps/api/**/e2e/**"
|
|
title: Playwright E2E Testing
|
|
impact: HIGH
|
|
impactDescription: E2E tests catch integration issues before production
|
|
tags: testing, playwright, e2e
|
|
---
|
|
|
|
# Playwright E2E Testing
|
|
|
|
## Running Tests
|
|
|
|
Use the command format:
|
|
|
|
```bash
|
|
PLAYWRIGHT_HEADLESS=1 yarn e2e [test-file.e2e.ts]
|
|
```
|
|
|
|
This format includes the proper timezone setting, virtual display server, and uses the repository's e2e runner.
|
|
|
|
**Do not use** the standard `yarn playwright test` command.
|
|
|
|
## Local Testing First
|
|
|
|
Always ensure Playwright tests pass locally before pushing code. The user requires fast local e2e feedback loops instead of relying on CI, which is too slow for development iteration.
|
|
|
|
**Never push test code until those tests are passing locally first.**
|
|
|
|
## CI Behavior
|
|
|
|
- E2E tests will only run if PR has "ready-for-e2e" label
|
|
- When E2E tests are skipped, the "required" check intentionally fails to prevent merging without E2E
|
|
- Do not try to fix anything related to skipped E2E tests - this is expected behavior
|