Repository navigation
Conversation
- ContextCenterFilePreview: the markdown preview now uses the themed `prose` class (#35357), so assert the heading inside `.prose` - Add openKpiTab helper that clicks the KPIs entry as a link (OpenMetadata) or a menuitem (Collate's overridden Data Insight left panel); use it in CustomizeWidgets and DataInsight specs
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
|
||
| await expect( | ||
| modal.getByRole('heading', { name: MARKDOWN_HEADING }) | ||
| modal.locator('.prose').getByRole('heading', { name: MARKDOWN_HEADING }) |
There was a problem hiding this comment.
We are not encouraging locator can we prefer dataTestId instead
| .getByRole('link', { name: 'KPIs', exact: true }) | ||
| .or(panel.getByRole('menuitem', { name: 'KPIs', exact: true })) |
There was a problem hiding this comment.
Why we need or here?
…role Add data-insight-tab-<key> to the Data Insight left panel and replace the link-or-menuitem locator with openDataInsightTab(page, tab), also used for the App Analytics tab. Collate adds the same test id to its overridden panel (openmetadata-collate#7559).
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
|
| Count | Rule |
|---|---|
| 1 | openmetadata-imports/no-circular-imports |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/pages/DataInsightPage/DataInsightLeftPanel/DataInsightLeftPanel.tsx:21:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed…Insight helper lint:playwright only allows src/generated and src/enums imports, so openDataInsightTab takes the tab key as a string-literal type.
… Rohit0301/markdown-kpi-fix # Conflicts: # .github/playwright/impact-map.generated.json
Code Review ✅ Approved🟢 Low risk · Adding test IDs and updating Playwright locators is limited to test targeting, with no meaningful change to application behavior or interfaces. Replaces brittle Playwright locators for the markdown preview and Data Insight KPI/App Analytics tabs with stable VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|



Describe your changes:
Fixes the failing
ContextCenterFilePreview › markdown file renders as formatted markdown in the preview modalandCustomizeWidgets › KPI WidgetPlaywright tests on Collate.MarkdownRendererfromtw:proseto the themedproseclass, so the[class*="tw:prose"]locator found nothing. Addeddata-testid="markdown-preview"to the markdown container and the test now asserts the heading inside it, instead of relying on a class name.getByRole('link', { name: 'KPIs' }), but Collate overrides that panel (DataInsightClassCollate.getLeftPanel()) withrole="menuitem"buttons, so the click timed out. Both panels now carrydata-testid="data-insight-tab-<key>"(Collate: open-metadata/openmetadata-collate#7559), and a newopenDataInsightTab(page, tab)helper inplaywright/utils/dataInsight.tsclicks it and waits for/data-insights/<tab>. Used inCustomizeWidgets.spec.tsandDataInsight.spec.ts(4 KPI steps plus the App Analytics tab, which had the same link-only locator).Merge order: open-metadata/openmetadata-collate#7559 first, or Collate CI won't find the test id.
Type of change:
High-level design:
N/A — small test-only change.
Tests:
Use cases covered
prosecontainerUnit tests
Not applicable — Playwright-only change.
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
src/components/common/FilePreviewer/MarkdownRenderer.tsx(test id),src/pages/DataInsightPage/DataInsightLeftPanel/DataInsightLeftPanel.tsx(test id),playwright/e2e/nightly/ContextCenterFilePreview.spec.ts,playwright/e2e/Flow/CustomizeWidgets.spec.ts,playwright/e2e/Pages/DataInsight.spec.ts,playwright/utils/dataInsight.ts:8585), each test individually, 10 sequential runs with--workers=3(entity-data-setup seeded once beforehand, not part of the runs):CustomizeWidgets.spec.ts › KPI Widget— 10/10 passed (17.8s–19.9s)ContextCenterFilePreview.spec.ts › markdown file renders as formatted markdown in the preview modal— 10/10 passed (3.8s–4.3s)KPI Widget10/10 (run on its own, 10 sequential runs,--workers=3),DataInsight.spec.ts10/10KPI Widget10/10,DataInsight.spec.ts10/10ContextCenterFilePreview › markdown file renders…with themarkdown-previewtest id: 10/10 on the OpenMetadata UIManual testing performed
<ul role="menu">with<button role="menuitem">KPIs</button>; the markdown preview renders<div class="prose tw:max-w-none tw:p-4">.UI screen recording:
Not applicable — test-only fix, no product UI change.
Checklist:
Fixes <issue-number>: <short explanation>— test fix, no issue (labelledskip-pr-checks)Fixes #<issue-number>above. — test fix, no issue🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge with the documented Collate merge order.Summary
Replaces brittle Playwright locators with stable test IDs.
No actionable issues found. Tests were not run during this review.
Reviews (4) · Last reviewed commit: "Merge remote-tracking branch 'origin/Roh..." · Reviewed by Greptile