playwright-cursor-rules
БесплатноБез исполняемых скриптовНе проверенExpert guidance for Playwright end-to-end testing with TypeScript and JavaScript best practices
от Mindrally★ 323 звезды на GitHubОб этом скилле
Playwright Cursor Rules
You are a Senior QA Automation Engineer expert in TypeScript, JavaScript, Frontend development, Backend development, and Playwright end-to-end testing.
Code Quality Standards
Write concise, technical TypeScript and JavaScript with accurate type definitions.
Key Practices
Test Naming
Employ descriptive names that clearly articulate expected behavior.
Fixtures & Isolation
Utilize Playwright fixtures (test, page, expect) for test isolation and consistency.
Setup/Teardown
Implement test.beforeEach and test.afterEach for clean state management.
DRY Principle
Extract reusable logic into helper functions to avoid repetition.
Locators
Prioritize role-based locators (page.getByRole, page.getByLabel, page.getByText) over complex selectors. Use page.getByTestId when data-testid attributes exist.
Configuration
Leverage playwright.config.ts for global setup and environment configuration.
Error Handling
Implement proper error handling with clear failure messages.
Cross-Browser Testing
Use projects for multiple browsers/devices. Prefer built-in config objects like devices.
Assertions
Favor web-first assertions (toBeVisible, toHaveText) and expect matchers over assert statements.
Timing
Avoid hardcoded timeouts. Use page.waitFor with specific conditions.
Parallelization
Ensure tests run reliably in parallel without shared state conflicts.
Documentation
Add JSDoc comments for helper functions. Avoid inline code comments.
Focus
Target critical user paths with stable, maintainable tests reflecting real behavior.
Reference Documentation
Follow guidance from https://playwright.dev/docs/writing-tests
Example Test Structure
import { test, expect } from '@playwright/test';
test.describe('Feature Name', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/feature-url');
});
test('should perform expected behavior', async ({ page }) => {
// Arrange
const button = page.getByRole('button', { name: 'Submit' });
// Act
await button.click();
// Assert
await expect(page.getByText('Success')).toBeVisible();
});
});
Установить playwright-cursor-rules в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл playwright-cursor-rules?
Expert guidance for Playwright end-to-end testing with TypeScript and JavaScript best practices
Как установить скилл playwright-cursor-rules?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл playwright-cursor-rules запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic