Skip to content

feat(ui): add multi-select test case status filter - #31662

Merged
shah-harshit merged 11 commits into
mainfrom
multi-select-test-status-filter
Aug 20, 2026
Merged

shah-harshit merged 11 commits into
mainfrom
multi-select-test-status-filter

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #31684

Related backend support: #31498

Adds multi-select test case status filtering to the Data Quality Test Cases tab while retaining the existing Ant Design Select. Selected statuses remain URL-backed and are serialized as one comma-separated status parameter for the listing API.

Clicking the overview health chart opens the Test Cases tab with these status filters:

  • Healthy: Success, Queued
  • Unhealthy: Failed, Aborted

Dashboard batch-report queries now serialize multiple status values as an Elasticsearch terms clause. Scalar legacy status values remain supported with term.

Screen.Recording.2026-08-18.at.2.47.06.PM.mov

Type of change:

  • Improvement
  • Bug fix

High-level design:

  • Configure the existing Ant Design status selector with mode="multiple" and status-only options.
  • Normalize legacy scalar URL values to arrays only at the AntD form boundary.
  • Preserve status arrays in URL state and serialize listing requests as comma-separated values.
  • Map healthy and unhealthy chart segments to their corresponding status pairs.
  • Emit terms for multi-status dashboard report filters so batch aggregation requests use OR semantics.

Tests:

Use cases covered

  • Selecting multiple statuses retains earlier selections.
  • Multi-status and legacy single-status URLs restore the AntD control correctly.
  • Listing requests serialize multiple statuses as one comma-separated value.
  • Healthy and unhealthy chart segments navigate with their expected status pairs.
  • Dashboard batch reports emit a valid terms query for multiple statuses.

Unit tests

  • 7 focused Jest suites passed, 253 tests passed.
  • Focused ESLint completed with no errors.
  • Prettier check passed for all changed source and unit-test files.

Backend integration tests

Ingestion integration tests

  • Not applicable.

Playwright (UI) tests

  • Updated the Test Case filter and overview chart redirect scenarios for multi-status behavior.

UI screen recording / screenshots:

Not attached.

Checklist:

Improvement:

  • I have added tests around the new logic.
  • For connector/ingestion changes: N/A.

Greptile Summary

The PR extends Data Quality test-case status filtering from a scalar selection to URL-backed multi-selection.

  • Serializes listing filters as comma-separated status values while preserving legacy scalar URLs.
  • Maps health-chart segments to status groups and emits terms clauses for multi-status dashboard reports.
  • Updates focused unit and Playwright coverage for navigation, state restoration, and request serialization.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCases/TestCases.component.tsx Converts the existing status selector to an Ant Design multi-select using status-only options.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCases/useTestCaseList.ts Normalizes legacy scalar URL statuses to arrays at the form boundary while preserving fetch behavior.
openmetadata-ui/src/main/resources/ui/src/rest/testAPI.ts Serializes status arrays into the comma-separated query parameter expected by the listing endpoint.
openmetadata-ui/src/main/resources/ui/src/utils/DataQuality/DataQualityPureUtils.ts Supports grouped status navigation and selects scalar term versus array terms dashboard clauses.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/ChartWidgets.constants.ts Maps healthy and unhealthy chart segments to their corresponding status groups.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Chart["Health chart segment"] --> URL["URL status array"]
  Select["AntD multi-select"] --> URL
  URL --> Parse["Parse scalar or array"]
  Parse --> Form["Normalize to array for form"]
  Parse --> List["Join statuses with commas"]
  List --> API["Test-case listing API"]
  Parse --> Query["Build term or terms clause"]
  Query --> Batch["Dashboard batch report"]
Loading

Reviews (9): Last reviewed commit: "test(ui): fix status filter merge-queue ..." | Re-trigger Greptile

Context used:

@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Aug 18, 2026
@shah-harshit shah-harshit self-assigned this Aug 18, 2026
@shah-harshit shah-harshit changed the title MINOR - feat(ui): add multi-select test case status filter feat(ui): add multi-select test case status filter Aug 18, 2026
@github-actions

github-actions Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 5bb8a85a77ec87db92646923404b70cadf736504 in Playwright run 32276880940, attempt 1.

✅ 788 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 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) 1h 3m 27s

⏱️ Max setup 5m 37s · max shard execution 16m 41s · max shard-job elapsed before upload 20m 32s · reporting 6s

🌐 214.20 requests/attempt · 2.60 app boots/UI scenario · 28.27% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 28.27% (convergence target: at most 15%).
  • Browser traffic was 214.2 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.6 per UI scenario (2176 boots / 836 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 109 0 0 0 0 0
✅ Shard chromium-02 98 0 0 0 0 0
✅ Shard chromium-03 126 0 0 0 0 0
✅ Shard chromium-04 114 0 0 0 0 0
✅ Shard chromium-05 129 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard import-export-01 26 0 0 0 0 0
✅ Shard ingestion-01 32 0 0 0 0 0
✅ Shard reindex-01 5 0 0 0 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 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

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 30 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 30 warning(s) across 10 changed file(s).

Count Rule
8 openmetadata-imports/no-lower-layer-page-imports
6 openmetadata-imports/no-impure-pure-utils
3 jsx-a11y/control-has-associated-label
3 sonarjs/cyclomatic-complexity
2 openmetadata-imports/no-circular-imports
2 react-hooks/exhaustive-deps
2 openmetadata-imports/no-rest-ui-imports
1 openmetadata-imports/no-internal-barrel-imports
1 sonarjs/no-nested-conditional
1 sonarjs/cognitive-complexity
All findings
Location Rule Message
🟡 src/components/DataQuality/ChartWidgets/EntityHealthStatusPieChartWidget/EntityHealthStatusPieChartWidget.test.tsx:57:11 jsx-a11y/control-has-associated-label A control must be associated with a text label.
🟡 src/components/DataQuality/ChartWidgets/EntityHealthStatusPieChartWidget/EntityHealthStatusPieChartWidget.test.tsx:63:11 jsx-a11y/control-has-associated-label A control must be associated with a text label.
🟡 src/components/DataQuality/DataQuality.interface.ts:21: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/DataQuality/TestCases/TestCases.component.tsx:27: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/DataQuality/TestCases/TestCases.component.tsx:28: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/DataQuality/TestCases/TestCases.component.tsx:37:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataQuality/TestCases/TestCases.component.tsx:39:29 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 14 which is greater than 10 authorized.","cost":4,"secondaryLocations":[{"line":39,"column":28,"endLine":39,"endColumn"
🟡 src/components/DataQuality/TestCases/TestCases.test.tsx:20: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/DataQuality/TestCases/TestCases.test.tsx:122:7 jsx-a11y/control-has-associated-label A control must be associated with a text label.
🟡 src/components/DataQuality/TestCases/useTestCaseFilters.ts:213:6 react-hooks/exhaustive-deps React Hook useMemo has missing dependencies: 'getInitialOptions', 'handleSearchParam', and 'onSearchByKey'. Either include them or remove the dependency array.
🟡 src/components/DataQuality/TestCases/useTestCaseList.test.ts:20: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/DataQuality/TestCases/useTestCaseList.ts:31: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/DataQuality/TestCases/useTestCaseList.ts:189:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'getTestCases'. Either include it or remove the dependency array.
🟡 src/rest/dataQualityDashboardAPI.test.ts:14:1 openmetadata-imports/no-rest-ui-imports REST clients must not import UI or state-layer modules. Move shared request/response types to the interface layer.
🟡 src/rest/testAPI.ts:47: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/rest/testAPI.ts:47:1 openmetadata-imports/no-rest-ui-imports REST clients must not import UI or state-layer modules. Move shared request/response types to the interface layer.
🟡 src/rest/testAPI.ts:49:1 openmetadata-imports/no-internal-barrel-imports Import the internal module directly instead of its index barrel so unrelated siblings do not enter the bundle graph.
🟡 src/utils/DataQuality/DataQualityPureUtils.ts:34:1 openmetadata-imports/no-impure-pure-utils Pure utilities must not depend on React, UI, state, hooks, pages, or REST clients. Move orchestration/rendering out or move shared types to a lower layer.
🟡 src/utils/DataQuality/DataQualityPureUtils.ts:35:1 openmetadata-imports/no-impure-pure-utils Pure utilities must not depend on React, UI, state, hooks, pages, or REST clients. Move orchestration/rendering out or move shared types to a lower layer.
🟡 src/utils/DataQuality/DataQualityPureUtils.ts:36:1 openmetadata-imports/no-impure-pure-utils Pure utilities must not depend on React, UI, state, hooks, pages, or REST clients. Move orchestration/rendering out or move shared types to a lower layer.
🟡 src/utils/DataQuality/DataQualityPureUtils.ts:37:1 openmetadata-imports/no-impure-pure-utils Pure utilities must not depend on React, UI, state, hooks, pages, or REST clients. Move orchestration/rendering out or move shared types to a lower layer.
🟡 src/utils/DataQuality/DataQualityPureUtils.ts:55:1 openmetadata-imports/no-impure-pure-utils Pure utilities must not depend on React, UI, state, hooks, pages, or REST clients. Move orchestration/rendering out or move shared types to a lower layer.
🟡 src/utils/DataQuality/DataQualityPureUtils.ts:55: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/utils/DataQuality/DataQualityPureUtils.ts:59:1 openmetadata-imports/no-impure-pure-utils Pure utilities must not depend on React, UI, state, hooks, pages, or REST clients. Move orchestration/rendering out or move shared types to a lower layer.
🟡 src/utils/DataQuality/DataQualityPureUtils.ts:66:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/utils/DataQuality/DataQualityPureUtils.ts:134:49 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 16 which is greater than 10 authorized.","cost":6,"secondaryLocations":[{"line":134,"column":48,"endLine":134,"endColum
🟡 src/utils/DataQuality/DataQualityPureUtils.ts:146:9 sonarjs/no-nested-conditional Extract this nested ternary operation into an independent statement.
🟡 src/utils/DataQuality/DataQualityPureUtils.ts:381:4 sonarjs/cognitive-complexity Refactor this function to reduce its Cognitive Complexity from 25 to the 15 allowed.
🟡 src/utils/DataQuality/DataQualityPureUtils.ts:381:4 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 22 which is greater than 10 authorized.","cost":12,"secondaryLocations":[{"line":381,"column":3,"endLine":381,"endColum
🟡 src/utils/DataQuality/DataQualityPureUtils.ts:630:29 sonarjs/no-duplicate-string Define a constant instead of duplicating this literal 3 times.

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@github-actions

github-actions Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 66%
66.85% (79923/119540) 51.26% (48791/95171) 52.23% (14607/27962)

chirag-madlani
chirag-madlani previously approved these changes Aug 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-08-18T23:54:14Z)

Blocked the queue: playwright-summary

@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-08-19T13:36:58Z)

Blocked the queue: ui-coverage

@chirag-madlani

Copy link
Copy Markdown
Collaborator

Heads-up from merge-queue triage: this PR's queue entries are being ejected by a deterministic failure in a spec the targeted PR run doesn't cover.

Failure (queue runs 32254270577, and inherited by stacked entries like 32254896751):

Table.spec.ts:134 › Table pagination sorting search scenarios
Error: locator.click: strict mode violation:
getByTestId('status-select-filter').locator('div') resolved to 4 elements

The new multi-select status filter changes the status-select-filter DOM, so Features/Table.spec.ts's locator now matches 4 elements. The PR-level run passes because targeted selection doesn't map this component to Table.spec.ts — it only surfaces in the queue's full suite, ejecting the entry each time.

Fix: update Table.spec.ts's locator (and any sibling specs using status-select-filter) in this PR to target the specific element within the new multi-select structure. Optionally add the component→spec edge to .github/playwright/impact-map.json so the PR run covers it next time.

@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-08-19T16:36:15Z)

The entry left the queue before it was built, so no checks ran against it.

@sonarqubecloud

Copy link
Copy Markdown

@gitar-bot

gitar-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Adds multi-select test case status filtering to the Data Quality tab with URL state preservation and comma-separated REST serialization. No issues found.

✅ 1 resolved
✅ Quality: Status-sync effect re-runs on every render

📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCases/TestCases.component.tsx:104-118
The useEffect at TestCases.component.tsx:104-125 lists selectedStatusItems (the object returned by react-stately's useListData) in its dependency array. That object gets a fresh identity on every render, so the effect body executes after every render even when nothing changed. It does not loop (it only calls setState via remove/append when out of sync), but it is unnecessary work and fragile. Depend on the primitive selection instead — e.g. drop selectedStatusItems from the deps (it's a stable ref you can safely omit) and key the effect on selectedStatuses, disabling the exhaustive-deps lint if needed.

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 👍 / 👎 | 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.

Support multi-select test status filtering in Data Quality

3 participants