Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5e04e48
Feature #18173: Improve Version API, through paginatio, get x latest …
harshach Mar 6, 2026
e9bd2cc
Feature #18173: Version API Improvements, Last x versions order by de…
harshach Mar 7, 2026
ae8dba4
Update generated TypeScript types
github-actions[bot] Mar 7, 2026
87a1843
Merge from main
harshach Mar 7, 2026
3bfff44
Merge remote-tracking branch 'origin/18173' into 18173
harshach Mar 7, 2026
64cb18b
address comments
harshach Mar 7, 2026
3216f72
fix py check
harshach Mar 7, 2026
cbc8c18
Merge branch 'main' into 18173
harshach Mar 7, 2026
c5162d2
Address comments
harshach Mar 7, 2026
a44431e
Address comments
harshach Mar 7, 2026
21f59df
Fix tests
harshach Mar 7, 2026
4de5e68
Fix tests
harshach Mar 8, 2026
53777e1
Merge branch 'main' into 18173
harshach Mar 8, 2026
6a12855
Fix tests
harshach Mar 8, 2026
3cc85ab
Merge remote-tracking branch 'origin/18173' into 18173
harshach Mar 8, 2026
ee726a4
Better way to lookup versions
harshach Mar 8, 2026
9782d33
Fix pytests
harshach Mar 8, 2026
8fd7b07
Fix tests
harshach Mar 8, 2026
f612c34
Merge branch 'main' into 18173
harshach Mar 10, 2026
d1ac8f7
Address comments
harshach Mar 10, 2026
c73f28c
Merge remote-tracking branch 'origin/18173' into 18173
harshach Mar 10, 2026
5e0ce84
Merge origin/main into 18173
sonika-shah Apr 8, 2026
aa3c338
Merge remote-tracking branch 'origin/main' into pr-26307
mohityadav766 Apr 20, 2026
31d5e9c
chore(migrations): move version API schema additions from 1.13.0 to 1…
mohityadav766 Apr 20, 2026
f78e43a
Merge origin/main into 18173
sonika-shah Apr 22, 2026
6ad5e2c
Merge branch 'main' into 18173
mohityadav766 Apr 23, 2026
e878b29
fix(versions): address CI failures and review feedback
mohityadav766 Apr 23, 2026
eac500a
Merge remote-tracking branch 'origin/18173' into 18173
mohityadav766 Apr 23, 2026
3ba6e5b
Merge branch 'main' into 18173
mohityadav766 Apr 23, 2026
357359c
fix(checkstyle): format Java, ESLint/Prettier on UI, relax datamodel_…
mohityadav766 Apr 23, 2026
97ca244
Merge remote-tracking branch 'origin/18173' into 18173
mohityadav766 Apr 23, 2026
bc5054f
fix(ui-checkstyle): prettier+eslint on EntityVersionTimeline.test.tsx
mohityadav766 Apr 23, 2026
57b6b60
test(playwright): address @aniketkatkar97 review on PaginatedVersionH…
mohityadav766 Apr 23, 2026
041f62f
Merge branch 'main' into 18173
mohityadav766 Apr 23, 2026
c4d8f6e
fix: address Copilot review — one-shot observer + local SQL splitter
mohityadav766 Apr 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 175 additions & 0 deletions .agents/skills/playwright-validation/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
---
name: playwright-validation
description: Use when validating UI changes in a branch require Playwright E2E testing. Reviews branch changes, validates UI with Playwright MCP, and adds missing test cases.
---

# Playwright Validation Skill

This skill guides you through validating UI changes and ensuring comprehensive Playwright E2E test coverage.

## When to Use

- After completing UI feature development
- Before creating a PR for UI changes
- When reviewing UI-related branches
- To verify existing Playwright tests cover all scenarios

## Workflow

### Phase 1: Review Branch Changes

1. **Identify changed files vs main:**
```bash
git diff main --stat
git diff main --name-only | grep -E "\.(tsx?|less|css|scss)$"
```

2. **Focus on UI component changes:**
```bash
git diff main -- "openmetadata-ui/src/main/resources/ui/src/components/**" --stat
```

3. **Check for existing Playwright tests:**
```bash
git diff main --name-only | grep -E "playwright.*\.spec\.ts$"
```

4. **Read the changed component files** to understand the UI modifications

### Phase 2: Review Existing Playwright Tests

1. **Locate relevant test files:**
- Check `playwright/e2e/Pages/` for page-level tests
- Check `playwright/e2e/Features/` for feature-specific tests
- Use Glob/Grep to find tests related to the feature

2. **Analyze test coverage:**
- Read the existing test file(s)
- Identify the test scenarios already covered
- Note any gaps in coverage based on the UI changes

3. **Review test utilities:**
- Check `playwright/utils/` for helper functions
- Check `playwright/support/` for entity classes and fixtures

### Phase 3: Validate with Playwright MCP

1. **Start the browser and navigate:**
```
mcp__playwright__browser_navigate to http://localhost:8585
```

2. **Authenticate if needed:**
- Use `mcp__playwright__browser_fill_form` for login
- Default admin: `admin@open-metadata.org` / `admin`

3. **Navigate to the feature area:**
- Use `mcp__playwright__browser_click` for navigation
- Use `mcp__playwright__browser_snapshot` to inspect page state

4. **Validate UI behavior:**
- Test the main user flows
- Verify visual elements (icons, badges, labels)
- Check interactive elements (buttons, dropdowns, forms)
- Verify state changes and API calls

5. **Document findings:**
- Note what works correctly
- Identify any issues or missing functionality
- List scenarios not covered by existing tests

### Phase 4: Add Missing Test Cases

1. **Create a TodoWrite checklist** of missing test scenarios

2. **For each missing test case:**

a. **Add necessary test fixtures** in `beforeAll`:
- Create new entity instances (TableClass, DataProduct, etc.)
- Set up required relationships (domains, assets)

b. **Add cleanup** in `afterAll`:
- Delete created entities in reverse order

c. **Write the test** following the pattern:
```typescript
test('Descriptive Test Name - What it validates', async ({ page }) => {
test.setTimeout(300000);

await test.step('Step description', async () => {
// Test actions and assertions
});

await test.step('Next step', async () => {
// More actions and assertions
});
});
```

3. **Test patterns to cover:**
- Happy path (expected behavior)
- Edge cases (empty states, max values)
- Error handling (invalid inputs, failed requests)
- State transitions (before/after actions)
- UI feedback (loading states, success/error messages)
- Permissions (disabled buttons, restricted actions)

4. **Run lint check:**
```bash
yarn eslint playwright/e2e/Pages/YourTest.spec.ts
```

## Common Test Utilities

### Navigation
```typescript
import { sidebarClick } from '../../utils/sidebar';
import { redirectToHomePage } from '../../utils/common';
import { selectDataProduct, selectDomain } from '../../utils/domain';
```

### Waiting
```typescript
import { waitForAllLoadersToDisappear } from '../../utils/entity';
await page.waitForLoadState('networkidle');
await page.waitForSelector('[data-testid="loader"]', { state: 'detached' });
```

### API Responses
```typescript
const response = page.waitForResponse('/api/v1/endpoint*');
await someAction();
await response;
expect((await response).status()).toBe(200);
```

### Assertions
```typescript
await expect(page.getByTestId('element')).toBeVisible();
await expect(page.getByTestId('element')).toContainText('text');
await expect(page.locator('.class')).not.toBeVisible();
```

## Checklist Before Completion

- [ ] All UI changes have corresponding test coverage
- [ ] Tests cover both positive and negative scenarios
- [ ] Tests verify visual indicators (icons, badges, states)
- [ ] Tests validate API interactions
- [ ] Lint check passes with no errors
- [ ] Test fixtures are properly created and cleaned up
- [ ] Test timeouts are appropriate (300000ms for complex tests)

## Example: Data Contract Inheritance Tests

For reference, see the comprehensive test coverage in:
`playwright/e2e/Pages/DataContractInheritance.spec.ts`

This file demonstrates:
- Multiple entity setup in beforeAll
- Domain assignment patches
- Contract creation and validation
- Inheritance icon verification
- Action button state verification (disabled/enabled)
- API response validation (POST vs PATCH)
- Fallback behavior testing
123 changes: 123 additions & 0 deletions .agents/skills/playwright/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
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: 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.**
10 changes: 10 additions & 0 deletions .agents/skills/writing-playwright-tests/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: writing-playwright-tests
description: Use when writing new Playwright E2E tests or adding test cases. Provides testing philosophy, patterns, and best practices from the Playwright Developer Handbook.
---

# Writing Playwright Tests Skill

This skill guides you through writing Playwright E2E tests following OpenMetadata standards.

**Reference**: @openmetadata-ui/src/main/resources/ui/playwright/PLAYWRIGHT_DEVELOPER_HANDBOOK.md
Loading
Loading