playwright-e2e-authoring
БесплатноБез исполняемых скриптовНе проверенScaffold and extend Playwright E2E tests for the gc.platform suite (tests/playwright), wiring every artifact to the real frontend (localhost:4200) + real .NET…
от fmflurry★ 173 звезды на GitHubОб этом скилле
Playwright E2E Authoring — gc.platform
This suite tests the live gc.platform stack end-to-end: the real Angular frontend (http://localhost:4200) plus the real GcPlatform.Api .NET backend, orchestrated by docker-compose at the repo root. Tests drive the full stack — there are no mocks, no stubs, no fake data.
Path convention: All paths in this document are relative to tests/playwright/ (the test suite root).
Your job when this skill is active: turn a request like "add E2E tests for the <feature> screen" into a correct POM + module fixture + spec, colocated under tests/<module>/, that compiles under strict TypeScript and follows the conventions the existing auth and invoices modules already demonstrate.
When to activate
- Adding E2E coverage for a new frontend feature module or screen.
- Writing a new
.spec.ts, a Page Object Model, or a module fixture. - Extending an existing module with another screen/POM.
- Any "test the X page/flow with Playwright" request, even when the conventions aren't named.
The four rules (non-negotiable — they are project law)
These come from tests/playwright/CLAUDE.md. Everything this skill generates must honour them.
| # | Rule | What it means in practice |
|---|---|---|
| 1 | No mocks | Real frontend + real backend + real DB. No page.route()/context.route(), no MSW/sinon/nock, no fixture stubs, no page.waitForTimeout() or arbitrary sleeps. Create/clean test data via real API or UI. |
| 2 | Page Object Model | Every screen is a POM class under tests/<module>/pages/ extending BasePage. Specs never call raw page.locator() — all DOM access flows through a POM. |
| 3 | Work by fixture | POMs are injected via Playwright fixtures (test.extend). Specs import test/expect from their module fixture, never from @playwright/test. Never new SomePage() inside a spec. |
| 4 | Per application module | One test folder per frontend feature: frontend/src/app/modules/<module> → tests/<module>/. POM, fixtures, and specs stay colocated. Cross-module helpers live in support/. |
Before you start
- Confirm the stack is meant to be live. Tests assume
docker-compose upis running (frontend + backend healthy). You don't have to start it to author files, but never compensate for a missing backend with a mock. - Find the frontend module under
frontend/src/app/modules/<module>so the test folder name mirrors it exactly (Rule 4). If unsure of the name, ask or inspect the frontend tree. - Understand test accounts: The default authenticated session uses
tenant-a-user(seeded identity for tenant TEN-A via env varsPLAYWRIGHT_KC_USERNAME/PLAYWRIGHT_KC_PASSWORD, defaults:Nova-Delta-17!). Avoid reusing this account in password-reset specs — provision a disposable account viasupport/identity-accounts.ts. Thedev-useridentity has notenant_idclaim, so tenant-scoped screens (dunning, notifications, payments) render empty; use it only for session/logout tests. - Decide public vs authenticated — this picks which base fixture you extend. This is the single most important choice; see the table below and
references/fixtures.md.
| Route kind | Example | Module fixture extends | POMs bound to | Extra step |
|---|---|---|---|---|
Authenticated (behind authSessionGuard) |
/invoices |
support/fixtures/auth.fixture |
authenticatedPage |
Add the route to the warm-up loop in support/auth.setup.ts |
| Public | /login, /activer |
support/fixtures/base.fixture |
page |
none |
Workflow
Create the folder structure, then the artifacts in dependency order (POM → fixture → spec). Read the matching reference file before writing each kind — they hold the exact templates and the reasoning behind each convention.
Scaffold the folders
tests/<module>/ ├─ pages/ # one <screen>.page.ts per screen ├─ fixtures/ # <module>.fixture.ts └─ <feature>.spec.tsWrite the POM(s) — one per screen. → read
references/pom.md- Extend
BasePage(import { BasePage } from '../../../support/pages/base.page';). - Declare
private readonlyLocators, assign them in the constructor. - Prefer
getByRole()/getByLabel()/getByTestId()over CSS/XPath. - Expose actions (
goto, clicks, fills) and high-level assertions (expectLoaded,expect…).
- Extend
Write the module fixture —
fixtures/<module>.fixture.ts. → readreferences/fixtures.md- Extend
base(public) orauth(authenticated) per the table above. - Provide every POM as a fixture key.
- Re-export
expect.
- Extend
Write the spec(s) —
<feature>.spec.ts. → readreferences/spec.mdimport { test, expect } from './fixtures/<module>.fixture';- Group with
test.describe, share setup withtest.beforeEach. - Use web-first assertions only; no
Установить playwright-e2e-authoring в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл playwright-e2e-authoring?
Scaffold and extend Playwright E2E tests for the gc.platform suite (tests/playwright), wiring every artifact to the real frontend (localhost:4200) + real .NET backend — never mocks. Use whenever the user wants to add or write E2E / end-to-end tests, cover a new frontend feature module or screen, create a `.spec.ts`, add a Page Object Model (POM) or a Playwright fixture, or says things like "test the invoices page", "add an e2e test for <flow>", or "write Playwright tests for <feature>" — even when they do not mention the POM / fixture / no-mocks conventions. Produces a POM + module fixture + spec that follow the suite's four hard rules.
Как установить скилл playwright-e2e-authoring?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл playwright-e2e-authoring запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic