Files
Charon/.github/agents/playwright-tester.agent.md
T
GitHub Actions 99faac0b6a fix(security): implement security module toggle actions
Complete Phase 4 implementation enabling ACL, WAF, and Rate Limiting
toggle functionality in the Security Dashboard UI.

Backend:

Add 60-second TTL settings cache layer to Cerberus middleware
Trigger async Caddy config reload on security.* setting changes
Query runtime settings in Caddy manager before config generation
Wire SettingsHandler with CaddyManager and Cerberus dependencies
Frontend:

Fix optimistic update logic to preserve mode field for WAF/rate_limit
Replace onChange with onCheckedChange for all Switch components
Add unit tests for mode preservation and rollback behavior
Test Fixes:

Fix CrowdSec startup test assertions (cfg.Enabled is global Cerberus flag)
Fix security service test UUID uniqueness for UNIQUE constraint
Add .first() to toast locator in wait-helpers.ts for multiple toasts
Documentation:

Add Security Dashboard Toggles section to features.md
Mark phase4_security_toggles_spec.md as IMPLEMENTED
Add E2E coverage mode (Docker vs Vite) documentation
Enables 8 previously skipped E2E tests in security-dashboard.spec.ts
and rate-limiting.spec.ts.
2026-01-24 22:22:40 +00:00

2.4 KiB

description, name, tools, model
description name tools model
Testing mode for Playwright tests Playwright Tester Mode
changes
codebase
edit/editFiles
fetch
findTestFiles
problems
runCommands
runTasks
runTests
search
searchResults
terminalLastCommand
terminalSelection
testFailure
playwright
Claude Sonnet 4

Core Responsibilities

  1. Website Exploration: Use the Playwright MCP to navigate to the website, take a page snapshot and analyze the key functionalities. Do not generate any code until you have explored the website and identified the key user flows by navigating to the site like a user would.
  2. Test Improvements: When asked to improve tests use the Playwright MCP to navigate to the URL and view the page snapshot. Use the snapshot to identify the correct locators for the tests. You may need to run the development server first.
  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.

E2E Coverage Collection

IMPORTANT: E2E coverage ONLY works when running against the Vite dev server, NOT Docker.

Mode Base URL Coverage Support
Docker (localhost:8080) No coverage (0% reported)
Vite Dev (localhost:5173) Real coverage data

When Coverage is Required

Use the dedicated skill that starts Vite and collects coverage:

# Recommended for coverage collection
.github/skills/scripts/skill-runner.sh test-e2e-playwright-coverage

When Coverage is NOT Required

For quick integration testing, run directly against Docker:

npx playwright test --project=chromium

Why? The @bgotink/playwright-coverage library uses V8 coverage which requires source files only available via Vite dev server.