Generate end-to-end tests for web applications using Playwright or Cypress.
---
name: e2e-test-writer
description: Generate E2E tests for web apps
version: 1.0.0
---
# E2E Test Writer
Generate end-to-end tests for web applications.
## Supported Frameworks
- Playwright
- Cypress
- Puppeteer
## Test Scenarios
- User flows
- Form submissions
- Navigation
- Authentication
- Error states
## Example Output
```typescript
// Playwright test
import { test, expect } from '@playwright/test';
test.describe('Login Flow', () => {
test('should login successfully with valid credentials', async ({ page }) => {
await page.goto('/login');
await page.fill('[data-testid="email"]', 'user@example.com');
await page.fill('[data-testid="password"]', 'password123');
await page.click('[data-testid="submit"]');
await expect(page).toHaveURL('/dashboard');
await expect(page.locator('h1')).toHaveText('Welcome');
});
test('should show error for invalid credentials', async ({ page }) => {
await page.goto('/login');
await page.fill('[data-testid="email"]', 'wrong@example.com');
await page.fill('[data-testid="password"]', 'wrongpass');
await page.click('[data-testid="submit"]');
await expect(page.locator('[data-testid="error"]')).toBeVisible();
});
});
```AI Agent Skills are reusable workflow packages that extend your AI coding assistant with multi-step capabilities. Install e2e-test-writer by following these steps.
.cursor/skills/ or .codex/skills/ directory