Agent skill

Frontend Playwright E2E

by ansible in ansible/ansible-ui

Write, run, and debug Playwright E2E / integration / live tests.

Apache-2.0Auto-check: notesTesting & QA

Install Frontend Playwright E2E

skills CLI
$ npx skills add ansible/ansible-ui --skill frontend-playwright-e2e -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ansible/ansible-ui frontend-playwright-e2e --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ 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-src

Use ~/.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/

Facts

Skill name
frontend-playwright-e2e
GitHub stars
113
Token cost
~2.5k tokens
SKILL.md length
888 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
Apache-2.0

At a glance

Write, run, and debug Playwright E2E / integration / live tests.

  • Works in 6 steps: Use data-testid (NOT data-cy) → Selector best practices → Table row selection — critical → …
  • Reviewing a .spec.ts under playwright/
  • SKILL.md covers MCP workflow, Writing tests and Running tests
  • Calls npx, npm and rg; needs PLATFORM_PASSWORD

What it does

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.

When your agent uses it

  • Reviewing a .spec.ts under playwright/
  • The user asks to run
  • Debug E2E tests
  • Which env vars are required

Example prompts

  • “/frontend-playwright-e2e”

Requirements

  • Node.js

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Use data-testid (NOT data-cy)
  2. Selector best practices
  3. Table row selection — critical
  4. API response interception for dynamic values
  5. Validate after writing — critical
  6. Web-first assertions & auto-waiting

What it can do on your machine

Read from SKILL.md and the folder at commit 266aaaf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • npm
    • rg
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    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.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • PLATFORM_PASSWORD

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

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.

Always · name and description, kept in context so the agent knows when to use it
~83
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

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.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:37
    Create `playwright/.env` (never commit secrets; never print values in chat):
  • NoteMentions a .env fileSKILL.md:205
    ` / `PLATFORM_PASSWORD` from `playwright/.env`.
  • NoteMentions a .env fileSKILL.md:287
    - `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.

SKILL.md

The full file from ansible/ansible-ui at commit 266aaaf, republished under its Apache-2.0 licence (© ansible). 888 words, ~2,538 tokens.

Download SKILL.mdSave it as .claude/skills/frontend-playwright-e2e/SKILL.md (or your agent's skills folder).
name
frontend-playwright-e2e
description
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 testing_guidelines.md instead.
user-invocable
true

Playwright E2E

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.

MCP workflow

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.


Writing tests

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.

Environment

Create playwright/.env (never commit secrets; never print values in chat):

bash
PLATFORM_UI=http://localhost:4100
PLATFORM_USERNAME=your_username
PLATFORM_PASSWORD=your_password

Also used (overlay / shell):

bash
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.

Test structure

Always use at least one top-level describe block:

typescript
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
  });
});
Test type guidelines
TypeMeaning
UnitPure logic/functions, no DOM, mock dependencies, milliseconds (Vitest)
ComponentUnits together, mocked APIs, Vitest, UI/form behavior; don't mock unless necessary
IntegrationLive API, no mocking; API interaction (RBAC, job execution, DB)
User acceptanceFull user flows spanning resources (create template → run job → verify output)
Critical Playwright rules
1. Use data-testid (NOT data-cy)
typescript
// BEST
await page.getByTestId('content-type').click();

// AVOID
await page.locator('[data-cy="content-type"]').click();
2. Selector best practices
typescript
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")
  • Scope to containers (dialog, main, nav) when elements appear more than once
  • Check playwright/commands/ for utilities before writing custom logic
  • Search existing tests: rg "pattern" playwright/tests/
3. Table row selection — critical

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.

typescript
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 });
4. API response interception for dynamic values

Capture API-generated values instead of guessing patterns:

typescript
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;
5. Validate after writing — critical

Always run the spec after creating/updating it:

bash
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' --debug

Never 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.

6. Web-first assertions & auto-waiting

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.

typescript
// 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.

Common anti-patterns
  • Hard sleeps — waitForTimeout() to "let things settle". Use a web-first assertion or waitForResponse instead.
  • Manual retry/poll loops — re-implementing what expect(locator) already does. Assert on the locator.
  • Reading then asserting — expect(await locator.textContent()) does not retry. Use await expect(locator).toHaveText(...).
  • Asserting on detached elements — after a navigation or re-render, re-query the locator; do not hold a stale handle.
  • Acting after navigation with no wait — follow a navigation with a web-first assertion on the new page before interacting.
Test development methodology

Validate workflows manually with browser automation (Playwright MCP) before writing tests:

  1. Navigate the full user workflow
  2. Identify selectors from snapshots
  3. Test each interaction
  4. Verify page state after actions
  5. Identify dynamic values that need API interception
  6. Write tests from verified selectors
  7. Run tests as final validation

This avoids write → run → fix selector loops.

Browser setup:

  1. Navigate to https://localhost:4100 (HTTPS)
  2. SSL warning: type thisisunsafe on the warning page, or Advanced → Proceed
  3. Log in with PLATFORM_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.

Show full SKILL.md (297 more words)Show less
Common test utilities
Generic commands (playwright/commands/)
  • setupBefore() / setupAfter() — setup and teardown
  • navigateTo() — navigate to pages
  • getTableRow() — find table rows (handles pagination) — use for all table interactions
  • clickTableRow() — interact with table rows
  • clickPageAction() — page action buttons
  • login() — authentication
  • createE2EName() — unique test names
  • confirmAndAssertDeletion() — deletion confirmations
  • bulkDeleteResources() — bulk delete from list
  • deleteResourceFromDetailsPage() / deleteResourceFromList() — generic deletes
Resource-specific utilities (playwright/utils/)

Resource.api / Resource.ui action pattern:

typescript
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' });
Test tags
  • @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).


Running tests

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.

Secrets

If the suite needs a password or token:

  1. Never cat / head / print the secret file
  2. Check existence with test -f
  3. Pass via shell expansion only inside the command the user runs, not in chat
  4. When previewing the command, show $(grep …) / env var names — never the value
  5. If you accidentally read a secret, do not repeat it
Wizard
  1. Resolve repo root (git rev-parse --show-toplevel)
  2. Overlay defaults: mock vs live, UI URL, grep / file path, headed?
  3. Confirm with the user
  4. Preflight: node, Playwright browsers, overlay "is the stack up?" checks
  5. Run one command from overlay (npm run live, npx playwright test …)
  6. Summarize: passed / failed / skipped. Do not dump full traces unless asked

Do not start a second copy of the UI if overlay says a server is already bound to those ports.

Debugging
bash
npx playwright test --debug
npx playwright show-trace trace.zip
npm run coverage
Failures (troubleshooting)
  • UI server on port 4100
  • playwright/.env credentials present (do not print them)
  • exact: true for selector specificity
  • --debug
  • getTableRow() for tables
  • MCP snapshot of the live UI
  • Traces: npx 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

Files

Just SKILL.md in .claude/skills/frontend-playwright-e2e of ansible/ansible-ui.

Open the folder on GitHubat commit 266aaaf

Compare with similar skills

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.

Frontend Playwright E2E compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Frontend Playwright E2E this skillansible/ansible-ui113—~2.5kAutomated safety check: NotesApache-2.0
Playwright Testingchongdashu/vibejam-starter-pack149—~2.2kAutomated safety check: PassNone
Svelte Testingspences10/sveltest113—~579Automated safety check: PassMIT
Playwright Testingchongdashu/vibejam-starter-pack149—~2.1kAutomated safety check: PassNone
Ha Frontend Testinghome-assistant/frontend5.7k—~1.7kAutomated safety check: PassApache-2.0
Hydra Devstreamband/hydra-srt146—~995Automated safety check: PassApache-2.0

Similar skills

  • Playwright Testing

    chongdashu/vibejam-starter-pack

    Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.

    149 GitHub stars~2.2k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Svelte Testing

    spences10/sveltest

    Fix and create Svelte 5 tests with vitest-browser-svelte and Playwright.

    113 GitHub stars~579 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Playwright Testing

    chongdashu/vibejam-starter-pack

    Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.

    149 GitHub stars~2.1k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Ha Frontend Testing

    home-assistant/frontend

    Home Assistant frontend testing and validation workflow. An agent skill from home-assistant/frontend.

    5.7k GitHub stars~1.7k tokensUpdated today
    Testing & QAAuto-check passed
  • Hydra Dev

    streamband/hydra-srt

    Run HydraSRT development workflows: mix q quality gate, Elixir unit/E2E tests, native Rust tests, web Vitest/Playwright, and make dev.

    146 GitHub stars~995 tokensUpdated 21 days ago
    Testing & QAAuto-check passed
  • Playground Msw Tests

    mastra-ai/mastra

    REQUIRED and PRIMARY testing approach for packages/playground and packages/playground-ui.

    29k GitHub stars~2.6k tokensUpdated today
    Testing & QAAuto-check passed

More from ansible/ansible-ui

  • Frontend Overlay

    ansible/ansible-ui

    Product-specific frontend wrappers, API clients, and paths for ansible-ui.

    113 GitHub stars~2.5k tokensUpdated today
    Auto-check: notes

Categories

Questions about Frontend Playwright E2E

What does Frontend Playwright E2E do?

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.

When should I use Frontend Playwright E2E?

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.

How do I install Frontend Playwright E2E in Claude Code?

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.

How do I install Frontend Playwright E2E in Codex?

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.

Can I use Frontend Playwright E2E in Cursor, Gemini CLI or GitHub Copilot?

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.

What does Frontend Playwright E2E need to run?

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.

Does Frontend Playwright E2E access the network?

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.

Is Frontend Playwright E2E safe to install?

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.

What licence does Frontend Playwright E2E use?

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.

How many tokens does Frontend Playwright E2E use?

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.

What are the alternatives to Frontend Playwright E2E?

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.

Who maintains Frontend Playwright E2E?

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.