Agent Skillsopen-metadata/OpenMetadata › playwright-test

playwright-test

GitHub

基于OpenMetadata规范生成零不稳定性的Playwright E2E测试,涵盖权限、API验证及生命周期管理,并执行ESLint检查以确保代码质量。

skills/playwright/SKILL.md open-metadata/OpenMetadata

Trigger Scenarios

需要生成或审查Playwright端到端测试用例 请求按照特定业务场景和角色权限创建UI自动化测试脚本

Install

npx skills add open-metadata/OpenMetadata --skill playwright-test -g -y
More Options

Use without installing

npx skills use open-metadata/OpenMetadata@playwright-test

指定 Agent (Claude Code)

npx skills add open-metadata/OpenMetadata --skill playwright-test -a claude-code -g -y

安装 repo 全部 skill

npx skills add open-metadata/OpenMetadata --all -g -y

预览 repo 内 skill

npx skills add open-metadata/OpenMetadata --list

SKILL.md

Frontmatter
{
    "name": "playwright-test",
    "description": "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.",
    "user-invocable": true
}

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: Run ESLint Check

Before returning the generated test, run the Playwright linter to catch anti-patterns automatically:

cd openmetadata-ui/src/main/resources/ui
yarn lint:playwright

Error-level rules (no-networkidle, no-page-pause, no-focused-test) will block CI. Fix any errors before finalizing. See the handbook's ESLint Enforcement section for the full rule reference.

Step 5: 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)
  • ✅ ESLint (yarn lint:playwright passes with zero errors)
  • ✅ 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. ESLint Enforcement (run yarn lint:playwright — errors block CI)
  5. 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.

Version History

  • 5ab32e5 Current 2026-08-19 21:28

Same Skill Collection

.agents/skills/java-checkstyle/SKILL.md
.agents/skills/ui-checkstyle/SKILL.md
.claude/skills/java-checkstyle/SKILL.md
.claude/skills/playwright-validation/SKILL.md
.claude/skills/playwright/SKILL.md
.claude/skills/writing-playwright-tests/SKILL.md
skills/code-review/SKILL.md
skills/connector-audit/SKILL.md
skills/connector-building/SKILL.md
skills/connector-review/SKILL.md
skills/connector-standards/SKILL.md
skills/dev-setup/SKILL.md
skills/java-checkstyle/SKILL.md
skills/openmetadata-workflow/SKILL.md
skills/planning/SKILL.md
skills/playwright-validation/SKILL.md
skills/pr-checklist/SKILL.md
skills/systematic-debugging/SKILL.md
skills/tdd/SKILL.md
skills/test-enforcement/SKILL.md
skills/test-locally/SKILL.md
skills/ui-checkstyle/SKILL.md
skills/verification/SKILL.md
skills/writing-playwright-tests/SKILL.md
.claude/skills/ui-checkstyle/SKILL.md
.claude/skills/ui-core-components/SKILL.md
skills/ui-core-components/SKILL.md

Metadata

Files
0
Version
5ab32e5
Hash
5feca04f
Indexed
2026-08-19 21:28

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 03:39
浙ICP备14020137号-1 $방문자$