Skip to content

feat(skills): add /test-runner-ui-e2e for Playwright e2e suite (#556) - #582

Merged
vybe merged 1 commit into
devfrom
feature/test-runner-ui-e2e-skill
Apr 29, 2026
Merged

feat(skills): add /test-runner-ui-e2e for Playwright e2e suite (#556)#582
vybe merged 1 commit into
devfrom
feature/test-runner-ui-e2e-skill

Conversation

@oleksandr-korin

Copy link
Copy Markdown
Contributor

Summary

Frontend equivalent of `/test-runner` (which only knows about pytest). Nothing in the skills inventory covered the Playwright e2e suite added by PR #571 / #579 — this fills that gap.

What the skill encodes

Today's session debugged six distinct e2e failure modes the hard way. They're now classified and have concrete recovery commands:

Code Symptom Recovery
A `net::ERR_CONNECTION_REFUSED` on http://localhost Restart killed containers; if port-zombie, restart Docker Desktop
B Page snapshot shows /setup wizard (`bg-indigo-600` button) `docker exec trinity-backend python3 -c "from database import db; db.set_setting('setup_completed','true')"`
C "Invalid username or password" panel Backend env drift — `docker compose restart backend`
D Submit button found but disabled Selector / precondition bug in the spec
E Auth ✓ but smoke specs land on /login storageState empty (36 bytes) — auth.setup needs the localStorage poll
F Visual regression diff Intentional → `--update-snapshots`; unintentional → fix the code

Capabilities

  • Pre-flight stack health check (backend + frontend + admin password sanity)
  • `npm run test:e2e` orchestration with `--update-snapshots` / `--headed` / `--ui` / `--grep ` variants
  • Failure-mode classification (reads `error-context.md` page snapshots)
  • Reminder to add the `ui` PR label so `frontend-e2e` CI runs

Files

`.claude/skills/test-runner-ui-e2e/SKILL.md` — 300 lines, follows the same shape as `/test-runner`.

Test plan

  • CI build passes (no actual code touched, doc-only PR)
  • After merge, Claude Code can invoke `/test-runner-ui-e2e` and it follows the documented flow
  • Future UI PRs use this skill instead of ad-hoc `npm run test:e2e` invocations

Out of scope

Refs #556

🤖 Generated with Claude Code

Frontend equivalent of /test-runner. Existing /test-runner only knows
about pytest; nothing covered the Playwright suite added in #571 / #579.

The skill encodes:
  - Pre-flight checks (backend + frontend health, admin password sanity)
  - npm run test:e2e orchestration with --update-snapshots / --headed /
    --ui / --grep variants
  - Failure classification with concrete recovery commands for the six
    patterns we hit while building the harness:
      A. Stack down (port-zombie diagnostics + Docker Desktop restart)
      B. Stuck on /setup wizard (fresh-DB CI scenario, fix via
         db.set_setting('setup_completed','true'))
      C. Invalid username/password (env drift between shell and container)
      D. Submit button disabled (form precondition issue, not stack)
      E. Auth setup passes but smoke specs land on /login (storageState
         saved before localStorage.token write — known issue fixed in #579)
      F. Visual regression baseline mismatch (intentional vs unintentional
         decision tree)
  - Reminder to add the `ui` PR label so frontend-e2e CI runs

Refs #556

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — useful skill doc, clean encoding of the 6 failure modes from the harness build.

@vybe
vybe merged commit f55f4b5 into dev Apr 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants