fixtures

Fixtures provide setup/teardown for each test. They replace `beforeEach`/`afterEach` for shared state and are composable, type-safe, and lazy (only run when used).

Content Preview
# Fixtures Reference

## What Are Fixtures

Fixtures provide setup/teardown for each test. They replace `beforeEach`/`afterEach` for shared state and are composable, type-safe, and lazy (only run when used).

## Creating Custom Fixtures

```typescript
// fixtures.ts
import { test as base, expect } from '@playwright/test';

// Define fixture types
type MyFixtures = {
  authenticatedPage: Page;
  testUser: { email: string; password: string };
  apiClient: APIRequestContext;
};

export const test =
How to Use

Recommended: Install to project (local)

mkdir -p .claude/skills
curl -o .claude/skills/fixtures.md \
  https://raw.githubusercontent.com/alirezarezvani/claude-skills/main/engineering-team/playwright-pro/reference/fixtures.md

Skill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.

Alternative: Clone full repo

git clone https://github.com/alirezarezvani/claude-skills

Then reference at engineering-team/playwright-pro/reference/fixtures.md

Related Skills