adding-e2e-tests
БесплатноБез исполняемых скриптовНе проверенSet up Playwright end-to-end testing in a project, including test configuration, example tests, and CI integration.
от spencerpauly★ 905 звёзд на GitHubОб этом скилле
Add E2E Tests (Playwright)
Use this skill when the user asks to add end-to-end tests, browser tests, integration tests, or set up Playwright.
Steps
Install Playwright
npm init playwright@latestThis creates
playwright.config.ts, atests/directory, and installs browsers. If the project already has a test runner, install manually:npm install -D @playwright/test npx playwright installConfigure
playwright.config.tsSet
baseURLto the local dev server URL (e.g.http://localhost:3000).Configure
webServerto start the dev server automatically:webServer: { command: "npm run dev", url: "http://localhost:3000", reuseExistingServer: !process.env.CI, },Enable only chromium for local dev speed; enable all browsers in CI.
Create a smoke test — write a basic test that verifies the app loads:
import { test, expect } from "@playwright/test"; test("homepage loads", async ({ page }) => { await page.goto("/"); await expect(page).toHaveTitle(/.+/); });Add page object pattern (optional) — for larger apps, create a
tests/pages/directory with page objects that encapsulate selectors and actions.Add npm scripts
{ "test:e2e": "playwright test", "test:e2e:ui": "playwright test --ui" }Add to
.gitignoretest-results/ playwright-report/ blob-report/CI integration — add a GitHub Actions step that runs
npx playwright install --with-depsthennpm run test:e2e. Use the officialactions/upload-artifactto save the HTML report on failure.
Notes
- Use
data-testidattributes for selectors instead of CSS classes. - Use
test.describeto group related tests. - Run
npx playwright codegento record tests interactively.
Установить adding-e2e-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл adding-e2e-tests?
Set up Playwright end-to-end testing in a project, including test configuration, example tests, and CI integration.
Как установить скилл adding-e2e-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл adding-e2e-tests запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic