qa-playwright-add-fixture

Add or extend Playwright fixtures in fixtures/index.ts for test automation.

12|6|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/whitebeardit/.cursor --skill qa-playwright-add-fixture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: qa-playwright-add-fixture
Source: https://github.com/whitebeardit/.cursor/tree/main/skills/qa/skill-qa-playwright-add-fixture
Command: npx skills add https://github.com/whitebeardit/.cursor --skill qa-playwright-add-fixture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of adding or extending Playwright fixtures, ensuring consistent test data loading and authenticated API contexts for your end-to-end tests.

Core Features & Use Cases

  • Fixture Creation: Easily declare new fixtures using base.extend({...}) in fixtures/index.ts.
  • Test Data Loading: Load test data from JSON files based on spec paths.
  • Authenticated Requests: Set up authenticated API request contexts for secure testing.
  • Use Case: When a new feature requires specific user credentials or mock data for testing, use this Skill to add a dedicated fixture that provides this data to your tests.

Quick Start

Add a new fixture named 'adminUser' to the Playwright test suite.

Frequently Asked Questions about qa-playwright-add-fixture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add custom Playwright fixtures for loading test data in end-to-end tests?

Declare new fixtures using `base.extend({...})` within the `fixtures/index.ts` file to inject specific test data or mock data directly into your end-to-end test automation flows.

How do I set up authenticated API request contexts in Playwright?

Establish authenticated API request contexts by extending Playwright fixtures within the `fixtures/index.ts` file. This configuration provides secure, authenticated request environments specifically for your API testing scenarios.

Can I modify default Playwright fixtures when extending them?

You cannot modify default Playwright fixtures when extending them. You must adhere to exporting `test` and `expect` from your custom fixtures file and avoid altering the default framework behaviors entirely.

What is the best way to load JSON test data based on spec paths in Playwright?

The best way to load JSON test data based on spec paths is by creating a dedicated fixture using `base.extend({...})`. This fixture injects the required scenario data per flow for your automated tests.

Do I need to export test and expect from my custom Playwright fixtures file?

Yes, you need to export `test` and `expect` from your custom Playwright fixtures file. This requirement ensures your extended fixtures integrate correctly without modifying default Playwright fixtures.