Repository navigation
Fixes #34679: test case details page fixes from post-merge validation - #34655
Conversation
The banner's RESULT / EXPECTED block paired the run's result with the test parameter of the same name. Ingestion never names them alike: a row count test reports `rowCount` against the parameter `value`, so the block never showed for real runs. The unit and e2e fixtures used shapes ingestion never produces, which hid it. The banner now reads Found and Expected through the run details card's helpers (getFoundValue, getRunExpectation, formatExpectation), so the two always agree. It takes the test case instead of its parameters, and both pages' memos depend on the test case.
…ison A range test with large numbers (1,500,000 / 1,000,000 – 2,000,000) is wider than the banner's 320 px right side, and the comparison, which does not wrap, spilled over the run's reason. The right side is now at least 320 px rather than exactly 320 px, so it widens and the reason truncates before it. Normal values keep the 320 px right side aligned with the rail.
ECharts draws no reference line outside the y axis range, and the axis covered only the runs. A failing run far from its expectation, such as 110 rows against an expected 10,000, therefore lost the expectation line and its label. The y axis extent now takes in the expectation before it is padded.
The allowed-range band took the first two parameters as min and max, only when a test had exactly two, and parsed them with parseInt: - decimal bounds were truncated, so 0.5-1.5 drew a 0-1 band with every passing run above it; - a third parameter, such as a range's threshold, removed the band; - two parameters that are not a range, such as an expected value and a threshold, drew a band between them (5 to 10,000). The band now reads min and max through getParameterBounds, by name and as numbers, like the expectation line and the caption. The bounds helpers move above prepareChartData, unchanged.
An aborted or queued run has no value. The chart placed one for it (the lowest plotted value, or the expectation line) on the series itself, so the line ran through it: an aborted run read as a measured drop, and a queued run pulled the line to the expectation. The TCD-7 acceptance criteria and the mock keep both off the line. Placed values now go under a key of their own, drawn as a dot-only series after the lines, so no line's colour shifts, and named like its line, so the legend lists it once. The line connects across the gaps and joins measured runs only. The screen-reader run list still lists placed runs, and keyboard and click selection still reach them.
The result history fetch wrote whatever response arrived, so a slow response for an earlier range overwrote a newer one. Picking Today, then Last month while Today was still loading, left the picker on Sep 1 - Sep 30 while the chart, tiles and run card showed Today's runs. The effect now marks its fetch stale when a newer range, dimension or run replaces it, and a stale fetch sets no results, shows no error and leaves the loaders to the fetch that replaced it.
…on card's rows
The version page drew its parameter diff in an older layout: a fixed
200 px column for every name, inside a card about 236 px wide at
1440 px, so the values fell off the card's edge. Where they fitted, a
character diff glued the old and new numbers together ("1000012000").
The diff now comes as the card's own parameter rows, so values wrap like
on the normal page, and each change reads whole, "10000 → 12000", with
the old value struck through and the new one in the success colour. The
assertion SQL keeps its diff block, now below the rows. The styles only
the old layout used are removed.
…ver them - TestCaseVersionPage.spec.ts selected the old diff's per-parameter test ids (`minValue`, `maxValue`). The card rows that replaced it are `configuration-parameter-<name>`, so the step could not find them. It now selects the rows, and checks each change reads whole (`12 → 20`). - TestCaseResultTab: the version page builds its rows from the version diff. - getParameterValueDiffRows: an added parameter shows only its new value, and a removed one only its old value, struck through. - TestSummary: fetchTestResults' options are required, since its one caller always passes both, and its imports are formatted.
… load - getSummary: deleted or restored; the added, updated and deleted field names; a bulk import's result, as a JSON string or an object, falling back to the field name when it cannot be read. - getOwnerVersionLabel: an added owner on the version page, the current owners elsewhere, and the placeholder only for a user who cannot add an owner. - TestCaseLastRunBanner: no comparison until the test case loads. EntityVersionUtils.tsx goes from 53% to 93% line coverage.
🔄 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 |
|---|---|
| 5 | openmetadata-imports/no-lower-layer-page-imports |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/DataQuality/IncidentManager/TestCaseResultTab/TestCaseResultTab.component.tsx:22:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/TestCaseDetail/TestCaseDetail.tsx:33:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/TestCaseDetail/TestCaseDetail.tsx:34:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/TestCaseDetail/TestCaseDetail.tsx:35:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/TestCaseDetail/TestCaseDetail.tsx:40:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed…ne pass Each filter-then-map chain the earlier fixes added is a single reduce: - TestSummaryGraph: the dot-only placed series, with each series' placed key computed once instead of three times. - TestSummaryRunList: a run's screen-reader entries. - applyStatusPlacements: a run's placed keys, built directly instead of filtering the missing series and mapping them to keys. - getParameterValueDiffRows: the version page's parameter rows.
Code Review ✅ Approved🟡 Medium risk · Updates test-result banners, chart rendering, fetch races, and version-page diffs. Fixes six data quality test case details page issues from post-merge validation: last-run banner now shows result/expected for real runs by reading through run details helpers; result history chart's expectation line stays visible when all runs are far from it; allowed-range band reads bounds by name and handles decimal values and extra parameters; aborted and queued runs no longer pull the trend line; stale responses for replaced ranges don't overwrite newer results; and version page parameter changes now fit the card and read as whole values. All tests pass with comprehensive coverage of the fixed scenarios. OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
✅ Playwright Results — workflow succeededValidated commit ✅ 3427 passed · ❌ 0 failed · 🟡 2 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky PerformanceBlocking 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) 57m 1s ⏱️ Max setup 4m 44s · max shard execution 21m 2s · max shard-job elapsed before upload 24m 40s · reporting 12s 🌐 213.43 requests/attempt · 2.02 app boots/UI scenario · 43.03% common-shard skew Optimization targets still in progress:
🟡 2 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Describe your changes:
Fixes #34679
Part of open-metadata/openmetadata-collate#6074, from the post-merge validation of the test case details page (V-01 to V-07 in open-metadata/openmetadata-collate#7096).
Fixes from the post-merge validation of the test case details page, added one point at a time.
1. Last-run banner: RESULT / EXPECTED never showed for real runs
The last-run banner's RESULT / EXPECTED block (TCD-5) never appeared for real test runs. It paired the run's result with the test parameter of the same name, but ingestion never names them alike:
tableRowCountToEqualreportsrowCountagainst the parametervalue, so the lookup always missed. The unit and e2e fixtures used shapes ingestion never produces (a parameter namedrowCount, or apredictedValue), which hid it.The banner now reads both values through the run details card's helpers, so the banner and the card always agree:
tableRowCountToEqual(value 10,000, found 110)110 / 10,000tableRowCountToBeBetween(12–34, found 5)5 / 12 – 34columnValuesToBeNotNull(found 5)5 / 0The block still hides when the test states no expectation, or when a run measured more than one value (for example
columnValuesToBeBetween's min and max). ApredictedValue, when ingestion reports one, still takes precedence.A range with large numbers (
1,500,000 / 1,000,000 – 2,000,000) is wider than the banner's 320 px right side, and the comparison does not wrap, so it overlapped the run's reason. The right side is now at least 320 px (tw:lg:min-w-80) instead of exactly 320 px: it widens, and the reason truncates before it. Normal values keep the 320 px right side aligned with the rail.2. Result history chart: expectation line missing when every run is far from it
ECharts draws no reference line outside the y axis range, and the axis covered only the runs. A failing run far from its expectation therefore lost the expectation line and its label: the mock's own failing case, 110 rows against an expected 10,000, drew an axis of 110–120 and no line. The y axis extent now takes in the expectation before it is padded.
tableRowCountToEqual, value 10,000, runs at 110 / 120 / 115Expected 10,000linetableRowCountToEqual, value 100, runs at 500 / 600 / 550Expected 100line3. Result history chart: the allowed-range band was read by position
The band took the first two parameters as min and max, only when a test had exactly two, and parsed them with
parseInt. It now reads min and max throughgetParameterBounds, by name and as numbers, like the expectation line and the caption.columnValueMeanToBeBetween, 0.5–1.5tableRowCountToBeBetween, 12–34 plusthresholdtableRowCountToEqual,value10,000 plusthreshold5Expected 10,000line only4. Result history chart: aborted and queued runs pulled the line
An aborted or queued run has no value. The chart placed one for it on the series itself, at the lowest plotted value or on the expectation line, so the line ran through it: an aborted run read as a measured drop, and a queued run pulled the line to the expectation. The TCD-7 acceptance criteria and the mock keep both off the line. The line now joins measured runs only and bridges over the others; their markers stay where they were (the ring at the bottom, the queued dot on the expectation line), selectable as before.
5. Result history: a slow response for a replaced range overwrote the newer one
The fetch wrote whatever response arrived. Picking Today, then Last month while Today was still loading, left the picker on Sep 1 – Sep 30 while the chart, tiles and run card showed Today's runs. The effect now marks its fetch stale when a newer range, dimension or run replaces it; a stale fetch sets no results, shows no error, and leaves the loaders to the fetch that replaced it.
6. Version page: parameter changes were cut off and hard to read
The version page drew its parameter diff in an older layout, with a fixed 200 px column for every name, inside a card about 236 px wide at 1440 px. The values fell off the card's edge. Where they fitted, a character diff glued the old and new numbers together. The diff now comes as the card's own parameter rows, so values wrap like on the normal page, and each change reads whole, with the old value struck through and the new one in the success colour. The assertion SQL keeps its diff block, now below the rows.
value10,000 → 12,000, at 1440 pxvalue:and a cut-off slivervalue 10000 → 12000value10,000 → 12,000, at 1920 px100001200010000 → 120001210and3440(cut off at 1440 px)12 → 10and34 → 40Type of change:
High-level design:
TestCaseLastRunBannertakestestCaseinstead ofparameterValuesat both call sites: AI mode (TestCaseDetail.tsx) and classic (IncidentManagerDetailPage.tsx). The expectation needs the test definition (not-null implies 0) anduseDynamicAssertion, not just the parameters.testCaseinstead of three of its fields, since the banner reads the whole test case.TestSummaryGraph.tsx): the y axis extent takes in the expectation before it is padded.prepareChartDatainTestSummaryGraphUtils.ts):minBound ?? parameters[0]andmaxBound ?? parameters[1], used only when there are exactly two parameters, becomeminBound ?? minandmaxBound ?? maxfromgetParameterBounds. The bounds helpers move aboveprepareChartData, unchanged, forno-use-before-define.applyStatusPlacements): the placed value goes underplacedSeriesKey(series)instead of the series' own key.TestSummaryGraphdraws those keys as dot-only series after the lines (so no line's palette colour shifts), named like their line (ECharts lists a legend name once, and toggling it hides both). The lines setconnectNulls.TestSummaryRunList, the screen-reader list, still lists placed runs; keyboard navigation and click selection reach them through the dot-only series.TestSummary.tsx): the fetch effect givesfetchTestResultsanisStalecheck and flips it in its cleanup. A fetch that a newer range, dimension or run replaced sets no results, shows no error toast, and leaves the loaders to the newer fetch.EntityVersionUtils.tsx,TestCaseResultTab,TestCaseConfigurationCard):getParameterValueDiffDisplay, one pre-rendered block, becomesgetParameterValueDiffRows, which returns{ rows, sqlDiff }. The rows go through the card's ownParameterRows, whose values are now aReactNode, so a change renders asold → new. Only the SQL diff stays a block, below the rows. The legacy.parameter-label/.parameter-value*styles are removed.Tests:
Use cases covered
110 / 10,000in the banner.5 / 12 – 34.5 / 0.columnValuesToMatchRegex) or the run measured two values (columnValuesToBeBetween).Unit tests
TestCaseLastRunBanner.test.tsx: the name-matching cases are replaced by the three real shapes above and the two hidden cases. The row count case fails before the fix (Unable to find an element by: [data-testid="test-case-result-expected"]).TestCaseDetail.test.tsx: the banner now receives the test case.TestSummaryGraph.test.tsx:should stretch the y axis to an expectation above/below every run. Before the fix they fail (Expected: > 10000, Received: 120.4andExpected: < 100, Received: 496). The two padding tests now render without an expectation, so they still check padding alone.TestSummaryGraphUtils.test.ts:should read the allowed band from decimal bounds / a range that also has a threshold / an expected value and a threshold. Before the fix they fail ([0, 1]for[0.5, 1.5],undefinedfor[12, 34],[10000, 5]forundefined).EntityVersionUtils.test.tsx:getParameterValueDiffRowsshows a changed parameter as its whole old and new value, keeps the assertion SQL out of the rows as its own diff, and shows an unchanged parameter as its plain value; before the fix they fail (getParameterValueDiffRows is not a function).TestSummary.test.tsx:should keep the newest range when an older response arrives late; before the fix it fails (Runs 1instead of2once the slow response lands).applyStatusPlacementstests now expect the placed value underplacedSeriesKey(...), not the series' key.TestSummaryGraph.test.tsx:should keep an aborted run off the line and bridge the line over itandshould still list an aborted run kept off the line for screen readers; before the fix they fail (placedSeriesKey is not a function).TestCaseResultTab.test.tsx: the version page builds the Configuration card's rows from the version diff (10000 → 12000). It fails if the rows fall back to the plain parameters.EntityVersionUtils.test.tsx, also: an added parameter shows only its new value and a removed one only its old value, struck through.getSummaryandgetOwnerVersionLabel, which had no tests, are now covered too.TestCaseLastRunBanner.test.tsx, also: no comparison until the test case loads.46 suites, 653 tests pass across
DataQuality/IncidentManager,observability/TestCaseDetail,pages/IncidentManager,Profiler/TestSummary,TestSummaryGraphUtils.test.tsandEntityVersionUtils.test.tsx.Coverage on the 11 changed source files, from the same suites: every changed line is covered. Line coverage per file:
EntityVersionUtils.tsxTestCaseDetail.tsxIncidentManagerDetailPage.tsxTestSummaryGraph.tsxTestSummaryGraphUtils.tsTestCaseLastRunBanner.component.tsx,TestCaseLastRunBanner.utils.ts,TestCaseResultTab.component.tsx,TestCaseConfigurationCard.tsx,TestSummary.tsx,TestSummaryRunList.tsxBackend integration tests
Ingestion integration tests
Playwright (UI) tests
shows every section for a scheduled failed test case runinplaywright/e2e/Features/DataQuality/DataQuality.spec.ts.{ name: 'minValue', predictedValue: '1', value: '0' }, a shape ingestion never produces.{ name: 'rowCount', value: '0' }and expects0 / 1 – 100. It fails without the fix (block not found) and passes with it.TestCaseDetailsPage.spec.ts(AI mode): 13 passed, including the banner/grid alignment test.should show the test case version pageinplaywright/e2e/VersionPages/TestCaseVersionPage.spec.ts.minValue,maxValue). The card rows useconfiguration-parameter-<name>, so on this branch the old step fails (getByTestId('minValue'): element(s) not found).12 → 20,34 → 40). Passes locally.yarn lint:playwright: 0 errors.Manual testing performed
tableRowCountToEqual(value 10,000, rowCount 110) andtableRowCountToBeBetween(12–34, rowCount 5) runs and opened them at/observability/test-case/<fqn>.110 / 10,000and5 / 12 – 34. Nothing else in the banner changes.tableRowCountToBeBetweenrun at 1,500,000 against 1,000,000–2,000,000, with a long reason: the comparison sits beside the truncated reason, with no overlap.Expected 10,000andExpected 100lines and labels are drawn.value10,000 → 12,000 and a range 12–34 → 10–40, at 1440 and 1920 px: before, cut off at 1440 px and glued digits at 1920 px; after,10000 → 12000,12 → 10,34 → 40at both widths, with no overflow.UI screen recording / screenshots:
Attaching: before and after for both tests.
Merge Danger
Door: two-way. UI only; reverting restores the old lookup.
Blast Radius: banner and chart, on both the AI-mode and classic pages.
rangeType/rangeInterval) now draw their band. A dynamic assertion that still has static min/max parameters falls back to them for runs without learned bounds, as two-parameter tests already did; that also hides Collate's AI-learning alert for those runs.configuration-parameter-<name>, instead of<name>. Tests elsewhere that select a version page parameter by its bare name need the same change asTestCaseVersionPage.spec.ts.Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.🤖 Generated with Claude Code