Skip to content

fix(ui): make the Asset Health widget E2E spec seed its own tables - #30671

Closed
siddhant1 wants to merge 1 commit into
mainfrom
asset-health-widget-cta-failures
Closed

siddhant1 wants to merge 1 commit into
mainfrom
asset-health-widget-cta-failures

Conversation

@siddhant1

@siddhant1 siddhant1 commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes three Asset Health widget specs failing on main (run 30482475429):

✘ shows setup CTAs for unconfigured categories
✘ Add tests CTA navigates to the Profiler tab
✘ Enable observability CTA navigates to the Profiler tab

Why

The spec used sample_data.ecommerce_db.shopify.fact_sale as its "no test suite, no contract" fixture. 6e5bc803a8 (#30367) added fact_sale.testSuite to ingestion/examples/sample_data/tests/testSuites.json, and both failing rows are gated on the table's test suite:

row CTA renders only when
asset-health-cta-dataQuality !hasTests || summary.total === 0
asset-health-cta-dataObservability !hasTests

AssetHealthRowItem renders either the CTA <button> or a <Badge>, never both — so the testids stopped existing. Deterministic, not flaky.

What changed

  • The spec creates its own tables in beforeAll and deletes them in afterAll, so sample-data drift can't break it again. Re-pointing the constant at another sample table would only reset the timer — that commit took three tables out of eligibility at once.
  • Dropped the local visitTable helper for the existing TableClass.visitEntityPage(page), which adds encodeURIComponent and a waitForResponse on the table's own fetch, and stays off the search-box path (which would time out on a freshly created, unindexed table).
  • Added the missing assertion on the data quality row's badge state — the branch that actually broke. It needs a test case result, not just a test case, since the execution summary only counts cases that have one.

Verification

Ran against a local stack built from this branch (system/version revision matched git rev-parse HEAD):

9 passed (38.0s)     # first run, incl. setup + entity-data-setup
12 passed (17.7s)    # --repeat-each=2

Temporarily giving the "empty" table a test case reproduced the CI failure on the same testids, confirming the assertions discriminate. eslint, prettier, organize-imports and tsc clean; no services left behind after the run.

Test-only change — no UI recording applies.

🤖 Generated with Claude Code

Greptile Summary

This PR makes the Asset Health widget E2E suite independent of mutable sample data.

  • Creates dedicated empty and test-suite-backed table fixtures.
  • Adds a test-case result to exercise configured health badges.
  • Uses the shared entity-page navigation helper.
  • Deletes the generated fixtures after the suite.

Confidence Score: 4/5

The PR should not merge until teardown guarantees that every generated fixture is removed even when an earlier deletion fails.

The first rejected fixture deletion still prevents the second deletion and final cleanup from running, which can leave generated backend state that interferes with later E2E execution.

Files Needing Attention: openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/AssetHealthWidget.spec.ts

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/AssetHealthWidget.spec.ts Seeds deterministic Asset Health fixtures and expands badge assertions, but the previously reported teardown short-circuit remains outstanding.

Reviews (2): Last reviewed commit: "fix(ui): make the Asset Health widget E2..." | Re-trigger Greptile

Copilot AI review requested due to automatic review settings July 30, 2026 06:18
@siddhant1
siddhant1 requested a review from a team as a code owner July 30, 2026 06:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added the UI UI specific issues label Jul 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@siddhant1 siddhant1 added safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Jul 30, 2026
The spec used sample_data.ecommerce_db.shopify.fact_sale as its
"unconfigured" fixture. 6e5bc80 (#30367) added a native test suite for
that table, so the data quality and observability rows now render status
badges instead of setup CTAs and their testids no longer exist.

Create both fixtures over the API in beforeAll instead, reuse
TableClass.visitEntityPage in place of the hand-rolled page.goto helper,
and assert the badge branch of the data quality row, which nothing covered
before.

Co-Authored-By: Claude <noreply@anthropic.com>
@siddhant1
siddhant1 force-pushed the asset-health-widget-cta-failures branch from a1ec943 to 86f274f Compare July 30, 2026 06:20
Copilot AI review requested due to automatic review settings July 30, 2026 06:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@siddhant1
siddhant1 enabled auto-merge July 30, 2026 06:22
@siddhant1
siddhant1 added this pull request to the merge queue Jul 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 86f274fcf5273a20dce7a4c4596c385496ad3c69 in Playwright run 30519281884, attempt 1.

✅ 52 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 3 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 40m 38s

⏱️ Max setup 1m 31s · max shard execution 6m 4s · max shard-job elapsed before upload 9m 41s · reporting 3s

🌐 137.08 requests/attempt · 1.37 app boots/UI scenario · 0.00% common-shard skew

Optimization targets still in progress:

  • Application boot ratio was 1.37 per UI scenario (74 boots / 54 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 52 0 0 3 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@siddhant1
siddhant1 removed this pull request from the merge queue due to a manual request Jul 30, 2026
@siddhant1
siddhant1 added this pull request to the merge queue Jul 30, 2026
@siddhant1 siddhant1 closed this Jul 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a manual request Jul 30, 2026
@gitar-bot

gitar-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Asset Health widget E2E spec now seeds its own test and empty tables rather than relying on shared sample data, preventing breakage from upstream test suite additions. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants