stand-ui-test

Write and review Playwright browser tests against a deployed Insight stand with real Keycloak sign-in.

10|9|Updated May 22, 2026
One-click install
npx skills add https://github.com/constructorfabric/insight --skill stand-ui-test-constructorfabric
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stand-ui-test
Source: https://github.com/constructorfabric/insight/tree/main/.claude/skills/stand-ui-test
Command: npx skills add https://github.com/constructorfabric/insight --skill stand-ui-test-constructorfabric

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Browser end-to-end tests are slow and flaky, so teams need strict discipline about which claims genuinely require a real browser versus an HTTP API test. This Skill enforces that discipline when writing, fixing, or reviewing the committed Playwright (Python, sync API) journeys in tests/stand/ui/ against a deployed Insight stand with a real Keycloak OIDC login. ## Core Features & Use Cases - UI-vs-API justification rule: Every new browser test must include a written, measurement-backed paragraph explaining why it cannot be an API test, preventing suite bloat. - Accessibility-first locators and page objects: Enforces role/name-based locators, a strict pages/flows/tests split, and manifest-derived expectations instead of hardcoded values. - URL state and download journeys: Covers deep-link validation, cold-load router behavior, and cross-format (CSV/XLSX) export parsing with semantic cell comparison. - Use Case: When asked to "add a Playwright test for the team view", the Skill guides you to first attempt an API test, measure what only a browser can prove, build locators against a running stand, derive expectations from the seed manifest, and audit assertion fidelity before committing. ## Quick Start Ask the AI to write a Playwright browser journey in tests/stand/ui/ for a specific Insight page, following the UI-vs-API justification rule and manifest-derived expectations.

Frequently Asked Questions about stand-ui-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a Playwright test for a deployed web app with Keycloak login?

Use the sign_in flow helper with a manifest persona: sign_in(page, base_url, session_for("dev_lead")). It drives the real authorization-code-plus-PKCE chain through Keycloak's actual form with no token shortcuts, and each journey signs in fresh rather than sharing an authenticated page fixture.

When should I write a browser test instead of an API test?

Only when you can name a measurement proving the claim needs a browser, such as a cookie only a real browser sets, a client-side route change no HTTP call performs, or a rendering step the API response passes through. If you cannot cite the measurement, write an API test instead.

What locators should Playwright tests use without data-testid attributes?

Use accessibility-first locators: get_by_role with accessible names, filtered by text where needed. Structural data-slot attributes and index chains inside role-anchored containers are permitted exceptions, but hashed CSS classes and Tailwind utility selectors are forbidden.

How do I test file downloads in Playwright beyond checking the file exists?

Use expect_download() only as the transport assertion, then save and parse the file. Compare headers, all rows, and representative values across every format offered (CSV and XLSX), assert the filename separately, and check record counts against the grid's aria-rowcount.

Why should Playwright tests avoid hardcoded expected values?

Hardcoded expectations break when seed data is reshuffled. Derive expectations from the stand manifest at runtime or from the response the page just received, and guard against empty derivations so a vacuous expectation cannot make assertions pass trivially.

Why does a UI-only test run show no coverage in the ledger?

Coverage recording happens in ApiClient.request, not at client construction. A UI journey's PersonaSession carries a client but never issues requests through it, so a ui-only run writes nothing to the coverage ledger or operation catalogue.