Playwright Testing
chongdashu/vibejam-starter-pack
Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.
Write, run, and debug Playwright E2E / integration / live tests.
$ npx skills add ansible/ansible-ui --skill frontend-playwright-e2e -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ansible/ansible-ui frontend-playwright-e2e --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ansible/ansible-ui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/frontend-playwright-e2e .claude/skills/frontend-playwright-e2e && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "frontend-playwright-e2e" agent skill from https://github.com/ansible/ansible-ui/tree/devel/.claude/skills/frontend-playwright-e2e into .claude/skills/frontend-playwright-e2e/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "frontend-playwright-e2e", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ansible/ansible-ui/tree/devel/.claude/skills/frontend-playwright-e2eType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ansible/ansible-ui --skill frontend-playwright-e2e -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ansible/ansible-ui frontend-playwright-e2e --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ansible/ansible-ui.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/frontend-playwright-e2e .agents/skills/frontend-playwright-e2e && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "frontend-playwright-e2e" agent skill from https://github.com/ansible/ansible-ui/tree/devel/.claude/skills/frontend-playwright-e2e into .agents/skills/frontend-playwright-e2e/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "frontend-playwright-e2e", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ansible/ansible-ui --skill frontend-playwright-e2e -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ansible/ansible-ui frontend-playwright-e2e --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ansible/ansible-ui.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/frontend-playwright-e2e .cursor/skills/frontend-playwright-e2e && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "frontend-playwright-e2e" agent skill from https://github.com/ansible/ansible-ui/tree/devel/.claude/skills/frontend-playwright-e2e into .cursor/skills/frontend-playwright-e2e/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "frontend-playwright-e2e", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ansible/ansible-ui.git --path .claude/skills/frontend-playwright-e2e--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ansible/ansible-ui --skill frontend-playwright-e2e -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ansible/ansible-ui frontend-playwright-e2e --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ansible/ansible-ui.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/frontend-playwright-e2e .gemini/skills/frontend-playwright-e2e && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "frontend-playwright-e2e" agent skill from https://github.com/ansible/ansible-ui/tree/devel/.claude/skills/frontend-playwright-e2e into .gemini/skills/frontend-playwright-e2e/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "frontend-playwright-e2e", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ansible/ansible-ui frontend-playwright-e2eInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ansible/ansible-ui --skill frontend-playwright-e2e -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ansible/ansible-ui.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/frontend-playwright-e2e .github/skills/frontend-playwright-e2e && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "frontend-playwright-e2e" agent skill from https://github.com/ansible/ansible-ui/tree/devel/.claude/skills/frontend-playwright-e2e into .github/skills/frontend-playwright-e2e/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "frontend-playwright-e2e", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ansible/ansible-ui --skill frontend-playwright-e2e -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ansible/ansible-ui frontend-playwright-e2e --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ansible/ansible-ui.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/frontend-playwright-e2e .opencode/skills/frontend-playwright-e2e && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "frontend-playwright-e2e" agent skill from https://github.com/ansible/ansible-ui/tree/devel/.claude/skills/frontend-playwright-e2e into .opencode/skills/frontend-playwright-e2e/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "frontend-playwright-e2e", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
frontend-playwright-e2eWrite, run, and debug Playwright E2E / integration / live tests.
Frontend Playwright E2E is an agent skill from ansible/ansible-ui. Write, run, and debug Playwright E2E / integration / live tests. Use when writing or reviewing a .spec.ts under playwright/, or when the user asks to run, execute, or debug E2E tests, or which env vars are required. Never print secrets. For Vitest unit/component tests, read testingguidelines.md instead.
Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Browser testing, End-to-end testing and Unit testing. It works with Playwright, Ansible, Vitest and Model Context Protocol. The repository describes itself as: The UIs for Ansible Projects such as AWX, EDA, and HUB. The licence is Apache-2.0.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 266aaaf. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npxnpmrggitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npx, npm and git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
PLATFORM_PASSWORDFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Frontend Playwright E2E loads about 2.5k tokens when it runs. Until then it costs about 83 tokens; SKILL.md has 888 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
Create `playwright/.env` (never commit secrets; never print values in chat):` / `PLATFORM_PASSWORD` from `playwright/.env`.- `playwright/.env` credentials present (do not print them)Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ansible/ansible-ui at commit 266aaaf, republished under its Apache-2.0 licence (© ansible). 888 words, ~2,538 tokens.
.claude/skills/frontend-playwright-e2e/SKILL.md (or your agent's skills folder).Default to Vitest for unit/component work (see
.claude/skills/testing_guidelines.md). Use Playwright for integration, e2e,
and live testing. For ports, env file, and stack commands, read
.claude/skills/frontend-overlay/SKILL.md.
Use the configured Playwright MCP to manually inspect the relevant UI workflow before writing or changing an E2E test. Use accessible snapshots and locators, and reuse the existing commands and utilities afterward. When a browser failure is not explained by the Playwright trace, use Chrome DevTools MCP to inspect console messages, network requests, layout, or performance. Record the MCP validation performed in the handoff; never print credentials or secret values.
Begin Playwright test names with "should". Prefer editing existing specs and
reusing playwright/commands/ over new helpers. Create a generic command when a
pattern repeats.
Create playwright/.env (never commit secrets; never print values in chat):
PLATFORM_UI=http://localhost:4100
PLATFORM_USERNAME=your_username
PLATFORM_PASSWORD=your_passwordAlso used (overlay / shell):
export PLATFORM_SERVER='https://localhost:443'
# Standalone services if needed
export AWX_SERVER='https://localhost:8043'
export EDA_SERVER='http://localhost:8000'
export HUB_SERVER='http://localhost:5001'Prerequisites: Node.js 20+ (engines in package.json). Live UI is typically https://localhost:4100.
Always use at least one top-level describe block:
import { test, expect } from '@playwright/test';
import { setupBefore, setupAfter } from '../../commands/setup';
test.beforeEach(setupBefore({ path: '/your/path' }));
test.afterEach(setupAfter);
test.describe('Feature Name - Description', () => {
test('should do the user-visible thing', { tag: ['@not_mock'] }, async ({ page }) => {
// test body
});
});| Type | Meaning |
|---|---|
| Unit | Pure logic/functions, no DOM, mock dependencies, milliseconds (Vitest) |
| Component | Units together, mocked APIs, Vitest, UI/form behavior; don't mock unless necessary |
| Integration | Live API, no mocking; API interaction (RBAC, job execution, DB) |
| User acceptance | Full user flows spanning resources (create template → run job → verify output) |
data-testid (NOT data-cy)// BEST
await page.getByTestId('content-type').click();
// AVOID
await page.locator('[data-cy="content-type"]').click();await page.getByRole('textbox', { name: 'Name', exact: true }).fill('value');
await expect(page.locator('dialog').getByText('Success')).toBeVisible();
await page.getByRole('button', { name: 'Submit' }).click();exact: true when similar text exists (e.g. "Name" and "Name @ timestamp")playwright/commands/ for utilities before writing custom logicrg "pattern" playwright/tests/Always use utilities in playwright/commands/ when available. Tests may run where
data is paginated off screen. clickTableRow() / getTableRow filter so rows
are not flaky.
import { getTableRow } from '../../../commands/getTableRow';
await clickTableRow({ filterLabel: 'Name', text: credentialTypeName }, page);
// NEVER — fails due to pagination
const roleRow = page.getByRole('row').filter({ hasText: roleName });Capture API-generated values instead of guessing patterns:
const copyResponsePromise = page.waitForResponse(
(response) => response.url().includes('/copy/') && response.status() === 201
);
await page.getByRole('menuitem', { name: 'Duplicate template' }).click();
const copyResponse = await copyResponsePromise;
const copiedResource = (await copyResponse.json()) as ResourceType;
const copiedName = copiedResource.name;Always run the spec after creating/updating it:
cd playwright && npx playwright test tests/path/to/test.spec.ts --project 'live chromium' --max-failures=1 --retries=0
cd playwright && npx playwright test tests/path/to/test.spec.ts --project 'live chromium' --debugNever conclude test work until all tests pass and lint/TypeScript issues are resolved.
Do not start a second UI if port 4100 is already bound. To launch a run without dumping secrets, use the Running tests wizard below.
expect(locator) assertions auto-retry until they pass or time out, and
locator actions auto-wait for the element to be actionable. Rely on that — never
add manual sleeps.
// GOOD — retries until the element appears / has the text
await expect(page.getByRole('heading', { name: 'Details' })).toBeVisible();
await expect(page.getByTestId('status')).toHaveText('Successful');
// AVOID — arbitrary sleep, flaky and slow
await page.waitForTimeout(3000);
expect(await page.getByTestId('status').textContent()).toBe('Successful');Prefer waitForResponse (see rule #4) over waitForTimeout when you need to
wait for data.
waitForTimeout() to "let things settle". Use a web-first
assertion or waitForResponse instead.expect(locator) already
does. Assert on the locator.expect(await locator.textContent()) does not
retry. Use await expect(locator).toHaveText(...).Validate workflows manually with browser automation (Playwright MCP) before writing tests:
This avoids write → run → fix selector loops.
Browser setup:
https://localhost:4100 (HTTPS)thisisunsafe on the warning page, or Advanced → ProceedPLATFORM_USERNAME / PLATFORM_PASSWORD from playwright/.env.
Never print those values (including any default in the env file).Playwright MCP hits the same SSL warning on https://localhost:4100. Bypass it
with thisisunsafe before interacting with the UI.
playwright/commands/)setupBefore() / setupAfter() — setup and teardownnavigateTo() — navigate to pagesgetTableRow() — find table rows (handles pagination) — use for all table interactionsclickTableRow() — interact with table rowsclickPageAction() — page action buttonslogin() — authenticationcreateE2EName() — unique test namesconfirmAndAssertDeletion() — deletion confirmationsbulkDeleteResources() — bulk delete from listdeleteResourceFromDetailsPage() / deleteResourceFromList() — generic deletesplaywright/utils/)Resource.api / Resource.ui action pattern:
import { Organization } from '@ansible/playwright/utils';
const org = await Organization.api.create(page, { name: 'Test Org' });
await Organization.api.delete(page, org.id);
await Organization.ui.create(page, { organizationName: 'Test Org' });@not_mock — do not run against mocked data@visual — visual regression (live-only; not a PR merge gate)Visual specs live under playwright/tests/visual/. Do not block PRs on full-page
screenshots (on-demand + weekly, live-only).
When the user asks to run/execute/debug E2E, gather config with sensible defaults. Confirm or override — do not make the user start from a blank form.
If the suite needs a password or token:
cat / head / print the secret filetest -f$(grep …) / env var names — never the valuegit rev-parse --show-toplevel)npm run live, npx playwright test …)Do not start a second copy of the UI if overlay says a server is already bound to those ports.
npx playwright test --debug
npx playwright show-trace trace.zip
npm run coverageplaywright/.env credentials present (do not print them)exact: true for selector specificity--debuggetTableRow() for tablesnpx playwright show-trace trace.zip© ansible, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/frontend-playwright-e2e of ansible/ansible-ui.
Open the folder on GitHubat commit 266aaaf
Frontend Playwright E2E next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Frontend Playwright E2E this skillansible/ansible-ui | 113 | — | ~2.5k | Automated safety check: Notes | Apache-2.0 | |
| Playwright Testingchongdashu/vibejam-starter-pack | 149 | — | ~2.2k | Automated safety check: Pass | None | |
| Svelte Testingspences10/sveltest | 113 | — | ~579 | Automated safety check: Pass | MIT | |
| Playwright Testingchongdashu/vibejam-starter-pack | 149 | — | ~2.1k | Automated safety check: Pass | None | |
| Ha Frontend Testinghome-assistant/frontend | 5.7k | — | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| Hydra Devstreamband/hydra-srt | 146 | — | ~995 | Automated safety check: Pass | Apache-2.0 |
chongdashu/vibejam-starter-pack
Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.
spences10/sveltest
Fix and create Svelte 5 tests with vitest-browser-svelte and Playwright.
chongdashu/vibejam-starter-pack
Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.
home-assistant/frontend
Home Assistant frontend testing and validation workflow. An agent skill from home-assistant/frontend.
streamband/hydra-srt
Run HydraSRT development workflows: mix q quality gate, Elixir unit/E2E tests, native Rust tests, web Vitest/Playwright, and make dev.
mastra-ai/mastra
REQUIRED and PRIMARY testing approach for packages/playground and packages/playground-ui.
ansible/ansible-ui
Product-specific frontend wrappers, API clients, and paths for ansible-ui.
Categories
Write, run, and debug Playwright E2E / integration / live tests. Frontend Playwright E2E is an agent skill from ansible/ansible-ui. Write, run, and debug Playwright E2E / integration / live tests.
Frontend Playwright E2E fits situations like: reviewing a .spec.ts under playwright/; the user asks to run; debug E2E tests; which env vars are required.
Run `npx skills add ansible/ansible-ui --skill frontend-playwright-e2e -a claude-code`. Or copy the skill folder (.claude/skills/frontend-playwright-e2e in ansible/ansible-ui) into .claude/skills/frontend-playwright-e2e in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ansible/ansible-ui --skill frontend-playwright-e2e -a codex`. Or copy the skill folder (.claude/skills/frontend-playwright-e2e in ansible/ansible-ui) into .agents/skills/frontend-playwright-e2e in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ansible/ansible-ui --skill frontend-playwright-e2e -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/frontend-playwright-e2e, .gemini/skills/frontend-playwright-e2e, .github/skills/frontend-playwright-e2e and .opencode/skills/frontend-playwright-e2e in your project.
Going by SKILL.md and its folder, Frontend Playwright E2E needs the command-line tools its instructions call (npx, npm, rg and git) and credentials named PLATFORM_PASSWORD. Our summary lists: Node.js.
SKILL.md contains no URLs. Its commands use npx, npm and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Frontend Playwright E2E is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Frontend Playwright E2E: Playwright Testing (chongdashu/vibejam-starter-pack, 149 stars), Svelte Testing (spences10/sveltest, 113 stars), Playwright Testing (chongdashu/vibejam-starter-pack, 149 stars) and Ha Frontend Testing (home-assistant/frontend, 5.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ansible (a GitHub organization) maintains it in ansible/ansible-ui, which has 113 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 6, 2026.
Source: ansible/ansible-ui on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.