From koha-contributor
Run Koha Cypress end-to-end tests. Cypress runs from the HOST (not the KTD container) — KTD exposes the staff/OPAC interfaces on localhost and Cypress drives a real browser. Pass a spec path or directory under t/cypress/integration/.
How this skill is triggered — by the user, by Claude, or both
Slash command
/koha-contributor:koha-cypressThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run Cypress E2E tests against KTD.
Run Cypress E2E tests against KTD.
Arguments: $ARGUMENTS
KTD already exposes the web UI on localhost. Cypress on the host drives a
real browser against that. Running Cypress inside the container also works
but is slower and harder to debug — only fall back to it if Node/npx isn't
available on the host.
Verify KTD is up and the staff interface responds:
curl -sf -o /dev/null http://localhost:8081/ && echo OK || echo "KTD not responding on :8081"
If that fails, tell the user to start KTD (ktd up) and stop.
Normalise the spec path. Strip any leading absolute path so it's
repo-relative (e.g. t/cypress/integration/Biblio/bookingsModal_spec.ts).
Run Cypress headlessly from the host (Koha repo root):
npx cypress run --spec "<path>"
For a whole directory:
npx cypress run --spec "t/cypress/integration/Acquisitions/"
Container fallback (only if host Cypress fails):
ktd --name "${KTD_INSTANCE:-kohadev}" --shell --run 'yarn cypress run --spec <path>'
To run a single test within a spec, ask the user if they want .only added
to the source temporarily:
it.only("only run this one", () => { ... });
it("not this one", () => { ... });
Use it.skip(...) to skip. Remind the user to remove .only/.skip before
committing — they will fail QA / leave dead tests.
Cypress could not verify…has not exited cleanly — KTD is up but the
app errored on load. Hit the URL in a browser to see the actual error;
fix the underlying app issue, not the Cypress invocation.Failed to connect to localhost — KTD is down or on a different port.
Check docker ps for the actual port mapping (default 8081 staff, 8080 OPAC).ktd --restart or rebuild KTD.Report pass/fail counts and the failing spec(s). For failures, include the first error stack from the Cypress output — the user usually doesn't need the full screenshot path.
npx claudepluginhub mrenvoize/koha-contributor --plugin koha-contributorProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.