chore: add execution constraints to prevent output truncation in Playwright tests

This commit is contained in:
GitHub Actions
2026-01-21 13:58:06 +00:00
parent 710d729022
commit 8bb4bb7c4b
5 changed files with 13 additions and 1 deletions

View File

@@ -86,6 +86,7 @@ The task is not complete until ALL of the following pass with zero issues:
1. **Playwright E2E Tests (MANDATORY - Run First)**:
- **Run**: `npx playwright test --project=chromium` from project root
- **No Truncation**: Never pipe output through `head`, `tail`, or other truncating commands. Playwright requires user input to quit when piped, causing hangs.
- **Why First**: If the app is broken at E2E level, unit tests may need updates. Catch integration issues early.
- **Scope**: Run tests relevant to modified features (e.g., `tests/manual-dns-provider.spec.ts`)
- **On Failure**: Trace root cause through frontend → backend flow before proceeding

View File

@@ -111,7 +111,7 @@ The task is not complete until ALL of the following pass with zero issues:
<constraints>
- **NO** Truncating of coverage tests runs. These require user interaction and hang if ran with Tail or Head. Use the provided skills to run the full coverage script.
- **NO** Truncating of test runs with `head` or `tail`. Coverage tests AND Playwright E2E tests require user interaction and hang indefinitely if piped through truncating commands. Use the provided skills to run tests directly without output truncation.
- **TERSE OUTPUT**: Do not explain the code. Output ONLY the code blocks or command results.
- **NO CONVERSATION**: If the task is done, output "DONE".
- **NO HALLUCINATIONS**: Do not guess file paths. Verify them with `list_dir`.

View File

@@ -12,3 +12,8 @@ model: Claude Sonnet 4
3. **Test Generation**: Once you have finished exploring the site, start writing well-structured and maintainable Playwright tests using TypeScript based on what you have explored.
4. **Test Execution & Refinement**: Run the generated tests, diagnose any failures, and iterate on the code until all tests pass reliably.
5. **Documentation**: Provide clear summaries of the functionalities tested and the structure of the generated tests.
## Execution Constraints
- **No Truncation**: Never pipe Playwright test output through `head`, `tail`, or other truncating commands. Playwright runs interactively and requires user input to quit when piped, causing the command to hang indefinitely.
- **Full Output**: Always capture the complete test output to analyze failures accurately.

View File

@@ -76,6 +76,11 @@ test.describe('Movie Search Feature', () => {
4. **Validate**: Ensure tests pass consistently and cover the intended functionality
5. **Report**: Provide feedback on test results and any issues discovered
### Execution Constraints
- **No Truncation**: Never pipe Playwright test output through `head`, `tail`, or other truncating commands. Playwright runs interactively and requires user input to quit when piped, causing the command to hang indefinitely.
- **Full Output**: Always capture the complete test output to analyze failures accurately.
## Quality Checklist
Before finalizing tests, ensure:

View File

@@ -9,6 +9,7 @@ description: 'Strict protocols for test execution, debugging, and coverage valid
**MANDATORY**: Before running unit tests, verify the application functions correctly end-to-end.
* **Run Playwright E2E Tests**: Execute `npx playwright test --project=chromium` from the project root.
* **No Truncation**: Never pipe Playwright test output through `head`, `tail`, or other truncating commands. Playwright tests run interactively and require user input to quit when piped, causing the command to hang indefinitely.
* **Why First**: If the application is broken at the E2E level, unit tests may need updates. Playwright catches integration issues early.
* **Base URL**: Tests use `PLAYWRIGHT_BASE_URL` env var or default from `playwright.config.js` (Tailscale IP: `http://100.98.12.109:8080`).
* **On Failure**: Analyze failures, trace root cause through frontend → backend flow, then fix before proceeding to unit tests.