Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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

  1. Confirm the stack is meant to be live. Tests assume docker-compose up is running (frontend + backend healthy). You don't have to start it to author files, but never compensate for a missing backend with a mock.
  2. 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.
  3. Understand test accounts: The default authenticated session uses tenant-a-user (seeded identity for tenant TEN-A via env vars PLAYWRIGHT_KC_USERNAME/PLAYWRIGHT_KC_PASSWORD, defaults: Nova-Delta-17!). Avoid reusing this account in password-reset specs — provision a disposable account via support/identity-accounts.ts. The dev-user identity has no tenant_id claim, so tenant-scoped screens (dunning, notifications, payments) render empty; use it only for session/logout tests.
  4. 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.

  1. Scaffold the folders

    tests/<module>/
    ├─ pages/        # one <screen>.page.ts per screen
    ├─ fixtures/     # <module>.fixture.ts
    └─ <feature>.spec.ts
    
  2. Write the POM(s) — one per screen. → read references/pom.md

    • Extend BasePage (import { BasePage } from '../../../support/pages/base.page';).
    • Declare private readonly Locators, assign them in the constructor.
    • Prefer getByRole() / getByLabel() / getByTestId() over CSS/XPath.
    • Expose actions (goto, clicks, fills) and high-level assertions (expectLoaded, expect…).
  3. Write the module fixture — fixtures/<module>.fixture.ts. → read references/fixtures.md

    • Extend base (public) or auth (authenticated) per the table above.
    • Provide every POM as a fixture key.
    • Re-export expect.
  4. Write the spec(s) — <feature>.spec.ts. → read references/spec.md

    • import { test, expect } from './fixtures/<module>.fixture';
    • Group with test.describe, share setup with test.beforeEach.
    • Use web-first assertions only; no
Полный SKILL.md на GitHub

Установить playwright-e2e-authoring в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/data-setup.mdreferences/fixtures.mdreferences/pom.mdreferences/spec.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить playwright-e2e-authoring с