playwright-test

Generate robust, zero-flakiness Playwright E2E tests following OpenMetadata patterns. Creates comprehensive test files with proper waits, API validation, multi-role permissions, and complete entity lifecycle management.

16 stars

Best use case

playwright-test is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate robust, zero-flakiness Playwright E2E tests following OpenMetadata patterns. Creates comprehensive test files with proper waits, API validation, multi-role permissions, and complete entity lifecycle management.

Teams using playwright-test should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/playwright-test/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/testing-security/playwright-test/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/playwright-test/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How playwright-test Compares

Feature / Agentplaywright-testStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate robust, zero-flakiness Playwright E2E tests following OpenMetadata patterns. Creates comprehensive test files with proper waits, API validation, multi-role permissions, and complete entity lifecycle management.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Playwright Test Generator - OpenMetadata

Generate production-ready, zero-flakiness Playwright tests following OpenMetadata conventions.

## Usage

```
/playwright-test
Feature: <feature name>
Category: <Features|Pages|Flow|VersionPages>
Entity: <Table|Dashboard|Pipeline|Topic|Database|User|Team|Glossary|Other>
Domain: <Governance|Discovery|Platform|Observability|Integration>
Scenarios:
  - <scenario 1 description>
  - <scenario 2 description>
  - <scenario 3 description>
Roles: <admin|dataConsumer|dataSteward|owner> (optional, defaults to admin)
```

## Quick Example

```
/playwright-test
Feature: Data Quality Rules
Category: Features
Entity: Table
Domain: Observability
Scenarios:
  - Admin can create and configure data quality rules
  - Data consumer can view test results but not edit rules
  - Test results are persisted after page reload
Roles: admin, dataConsumer
```

---

## Instructions

### Step 1: Read the Handbook FIRST

**CRITICAL**: Before generating any tests, read and apply ALL patterns from:

```
openmetadata-ui/src/main/resources/ui/playwright/PLAYWRIGHT_DEVELOPER_HANDBOOK.md
```

The handbook contains:
- Testing philosophy (user-centric, behavior-focused)
- Anti-flakiness patterns (the :visible selector chain pattern, etc.)
- Test timeout strategies (test.slow() vs test.setTimeout())
- Common test patterns (form submission, dropdowns, multi-role testing)
- Locator priority guidelines
- Support classes reference
- Domain tags
- Validation checklist

**Apply ALL handbook principles before proceeding.**

---

### Step 2: Generate Test Using Handbook Template

Use the **Test File Structure Template** from the handbook. It includes:
- Proper imports (performAdminLogin, entity classes, utilities)
- test.describe with domain tags
- beforeAll/afterAll for entity lifecycle via API
- test.slow() for timeout handling
- test.step() for clear organization
- API response validation pattern

---

### Step 3: Apply Common Test Patterns from Handbook

Reference the **Common Test Patterns** section for:
- Form submission with API validation
- Dropdown selection (with :visible chain pattern)
- Multi-role permission testing
- Data persistence verification
- Navigation patterns
- Search and filter patterns

---

### Step 4: Validate Against Handbook Checklist

Before returning the generated test, verify ALL items from the handbook's **Validation Checklist**:

- ✅ Structure & Organization (test.step, domain tags, imports, beforeAll/afterAll)
- ✅ Anti-Flakiness (no waitForTimeout, no networkidle, no force: true, no positional selectors, no stored :visible locators)
- ✅ API & Network (waitForResponse before actions, status code validation)
- ✅ Waits & Assertions (waitForAllLoadersToDisappear, semantic locators, proper assertions)
- ✅ Coverage & Roles (multi-role tests, data persistence, error handling)

---

## Key Reminders

**All patterns, rules, and best practices are in the handbook.**

Read and apply the handbook sections in order:
1. **Anti-Flakiness Patterns** (CRITICAL - #1 cause of flaky tests)
2. **Test File Structure Template** (for proper test structure)
3. **Common Test Patterns** (for specific scenarios)
4. **Validation Checklist** (before returning generated test)

---

## Final Notes

- Generate **production-ready** tests that pass 10/10 times
- Follow ALL patterns from the handbook exactly
- No comments for obvious code (e.g., `// Create entity` before `entity.create()`)
- Test independence - each test runs in any order
- Reference examples: `playwright/e2e/Pages/DataContractInheritance.spec.ts`, `playwright/e2e/Features/Table.spec.ts`

**Generate tests that are production-ready, maintainable, and zero-flakiness by following the handbook patterns exactly.**

Related Skills

qa-testing

16
from diegosouzapw/awesome-omni-skill

Ensure data integrity, stability, and basic security for a personal productivity app. Focus on preventing data loss, memory leaks, and sync failures during daily 8-hour usage sessions. Skip enterprise-grade testing. Use when testing, verifying, validating, checking features, running tests, or before claiming anything is "done" or "fixed".

qa-testing-strategy

16
from diegosouzapw/awesome-omni-skill

Risk-based quality engineering test strategy across unit, integration, contract, E2E, performance, and security testing with shift-left gates, flake control, CI economics, and observability-first debugging.

qa-testing-playwright

16
from diegosouzapw/awesome-omni-skill

End-to-end web application testing with Playwright: scope control, stable selectors, parallelization/sharding, flake control, network mocking vs real services, visual testing tradeoffs, and CI/CD integration.

qa-testing-ios

16
from diegosouzapw/awesome-omni-skill

iOS testing with XCTest/XCUITest on simulators and devices: layered strategy, determinism/flake control, device matrix selection, CI ergonomics, and repeatable simulator automation.

qa-tester

16
from diegosouzapw/awesome-omni-skill

QA Tester Agent. 테스트 작성, 실행, 검증을 담당합니다. 테스트, 검증, 단위테스트, 통합테스트, E2E 관련 요청 시 사용됩니다.

pytest-runner

16
from diegosouzapw/awesome-omni-skill

Execute Python tests with pytest, supporting fixtures, markers, coverage, and parallel execution. Use for Python test automation.

Property Testing

16
from diegosouzapw/awesome-omni-skill

Property-based testing with fast-check for business logic validation

playwright

16
from diegosouzapw/awesome-omni-skill

Playwright E2E testing, page objects, fixtures, visual regression, accessibility testing, and CI integration patterns.

playwright-visual-regression

16
from diegosouzapw/awesome-omni-skill

Playwright browser automation patterns for E2E testing, visual regression, screenshot capture, and accessibility validation. Use when implementing or debugging browser-based tests.

playwright-reviewing

16
from diegosouzapw/awesome-omni-skill

Review Playwright E2E tests for best practices violations. Detects mocked app data, explicit timeouts, CSS selectors, skipped tests, and assertion anti-patterns. Use when reviewing Playwright PRs or auditing test quality.

Playwright E2E Testing

16
from diegosouzapw/awesome-omni-skill

Comprehensive Playwright end-to-end testing patterns with Page Object Model, fixtures, and best practices

playwright-e2e-tester

16
from diegosouzapw/awesome-omni-skill

Expert in end-to-end testing with Playwright, the modern cross-browser testing framework. Specializes in test generation, page object patterns, visual regression testing, and CI/CD integration. Handles complex testing scenarios including authentication flows, API mocking, and mobile emulation.