| name | e2e-testing |
| description | Playwright end-to-end testing for ScreenGraph using .env-driven configuration. Use when validating full user flows, running regression suites, or inspecting UI behavior with Cursor browser tools. |
ScreenGraph E2E Testing Skill
Mission
Provide consistent, deterministic coverage of the ScreenGraph UI by coupling Playwright automation with the shared .env configuration. This skill summarizes the workflow and defers deep scripts, policies, and RCA playbooks to references/.
When to Use
- Validating the run flow from landing page ➜ run timeline ➜ screenshot gallery
- Reproducing UI regressions before releasing backend/front-end changes
- Maintaining smoke tests enforced by the pre-push hook
- Capturing artifacts (screenshots, console logs) for tickets and handoffs
Automation Loop
- Prepare environment – Ensure backend, frontend, Appium/device, and
.envvalues are ready (seereferences/automated-tests.md). - Execute Playwright suites – Run headed/headless/CI modes using the prescribed commands. Respect the 60s timeout budget.
- Investigate failures – Use helpers in
lib/playwright-helpers.ts, console/network logs, and backend logs to locate the root cause. - Escalate diagnostics – Fall back to Cursor Browser tools (
references/browser-tools.md) or the regression playbook for complex incidents. - Document – Attach screenshots, logs, and RCA notes in Graphiti or the relevant ticket.
Quick Command Set
# Headed for visual debugging
bun run test:e2e:headed
# Headless CI-parity run
bun run test:e2e:ci
# Playwright UI mode
bun run test:e2e:ui
Quality Gates
.envvalues (package name, Appium URL, APK path) sourced before running tests- Total Playwright test time per spec ≤ 60 seconds (budget defined in references)
- Failures include screenshot + console output attachments
- Regressions traced back to backend/frontend root cause with notes in Graphiti
- Run-flow assertions confirm both timeline events and visible screenshot gallery output
Reference Library
references/automated-tests.md– Quick start commands, configuration, timeout policy, and pre-push integrationreferences/manual-workflow.md– Running ad-hoc Playwright scripts from scratch directories and capturing artifactsreferences/browser-tools.md– Automating interactive debugging with Cursor’s @Browser toolreferences/regression-playbook.md– BUG-010 case study and systematic RCA stepsreferences/troubleshooting.md– Fast-fail signals, Appium/device checks, cleanup routines
Related Skills
frontend-development_skill– Source of truth for Svelte/Skeleton patterns the tests exercisebackend-development_skill– Ensures backend flows are stable before they enter E2E coveragefrontend-debugging_skill– Use after tests fail to diagnose rune or SSR issues in the UI