Skip to content

Migrate Test Suites list to ui-core Table#27713

Open
shah-harshit wants to merge 7 commits intomainfrom
issue-3837-test-suites-table
Open

Migrate Test Suites list to ui-core Table#27713
shah-harshit wants to merge 7 commits intomainfrom
issue-3837-test-suites-table

Conversation

@shah-harshit
Copy link
Copy Markdown
Contributor

@shah-harshit shah-harshit commented Apr 24, 2026

Summary

  • Replace the legacy Ant Design Table on the data quality Test Suites list with @openmetadata/ui-core-components Table, including column definitions, sorting via SortDescriptor, and row rendering helpers.
  • Swap the data quality sub-tab control from Ant Design Radio to ButtonGroup / ButtonGroupItem for consistency with other observability UI.
  • Use OwnerLabel for the owners column and wire pagination with NextPrevious where appropriate.
  • Expand TestSuites.test.tsx to cover the new table and interaction patterns.

Related issue

Refs: https://github.com/open-metadata/openmetadata-collate/issues/3837

Test plan

  • Open Data Quality → Test Suites and confirm rows, links (basic vs logical suite), and empty state.
  • Verify column sorting (especially name/FQN ordering).
  • Verify owners column and summary columns render as before.
  • Switch data quality sub-tabs via the new control and confirm navigation.
  • yarn test TestSuites.test.tsx (or full UI test suite in CI).

Made with Cursor


Summary by Gitar

  • Playwright adjustments:
    • Updated bundle-suite-radio-btn interaction in dataContracts.ts to target parent label for improved reliability.
    • Refined DataContracts.spec.ts to use explicit waitForResponse promises for POST and GET requests during contract saving.

This will update automatically on new commits.

Replace Ant Design table columns with @openmetadata/ui-core-components Table,
SortDescriptor-based sorting, OwnerLabel for owners, and ButtonGroup for
data quality sub-tabs. Update unit tests accordingly.

Made-with: Cursor
@shah-harshit shah-harshit requested a review from a team as a code owner April 24, 2026 12:44
@shah-harshit shah-harshit self-assigned this Apr 24, 2026
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.43% (62951/100833) 42.77% (33936/79332) 45.76% (10039/21938)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

🔴 Playwright Results — 1 failure(s), 16 flaky

✅ 3981 passed · ❌ 1 failed · 🟡 16 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
✅ Shard 1 299 0 0 4
🟡 Shard 2 746 0 8 8
🟡 Shard 3 743 0 3 7
🔴 Shard 4 772 1 2 18
✅ Shard 5 687 0 0 41
🟡 Shard 6 734 0 3 8

Genuine Failures (failed on all attempts)

Pages/DataContracts.spec.ts › Create Data Contract and validate for Table (shard 4)
�[31mTest timeout of 900000ms exceeded.�[39m
🟡 16 flaky test(s) (passed on retry)
  • Features/ActivityAPI.spec.ts › Activity event is created when description is updated (shard 2, 2 retries)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/AdvancedSearch.spec.ts › Verify Group functionality for field Tags with OR operator (shard 2, 1 retry)
  • Features/BulkEditEntity.spec.ts › Database (shard 2, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/Glossary/GlossaryHierarchy.spec.ts › should cancel move operation (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should start term as Draft when glossary has reviewers (shard 2, 2 retries)
  • Features/IncidentManager.spec.ts › Complete Incident lifecycle with table owner (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/Table.spec.ts › Table pagination with sorting should works (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate DataProduct Rule Any_In (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Tier Add, Update and Remove (shard 4, 1 retry)
  • Pages/Glossary.spec.ts › Glossary Term Update in Glossary Page should persist tree (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)

📦 Download artifacts

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

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 5, 2026

Code Review ✅ Approved 3 resolved / 3 findings

Migrates the Test Suites list to the ui-core Table and updates tab navigation for UI consistency, resolving issues with sort descriptor handling and import ordering. All test suites and interaction patterns have been validated.

✅ 3 resolved
Bug: Client-side sort ignores sortDescriptor.column

📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestSuite/TestSuiteList/TestSuites.component.tsx:149-163
The sortedData memo (lines 149-166) always sorts by the fully-qualified name regardless of which column triggered the sort. It checks sortDescriptor.column for presence but never branches on its value. Today only the 'name' column has allowsSorting: true, so this works by coincidence. If any other column (e.g. 'tests') is made sortable in the future, it will still sort by FQN, producing incorrect results.

This is low-risk today but fragile for future changes.

Quality: Unsafe {} as SortDescriptor type assertion

📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestSuite/TestSuiteList/TestSuites.component.tsx:115-117
Initializing state with {} as SortDescriptor (line 115-116) bypasses type safety. SortDescriptor expects column and direction properties, but the empty object has neither. The code handles this at runtime (line 150 checks for their presence), but the assertion masks a type mismatch.

Using a properly typed initial value or making the state nullable is cleaner.

Quality: Third-party type import placed between local imports

📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestSuite/TestSuiteList/TestSuites.component.tsx:61
The import type { SortDescriptor } from 'react-aria-components' at line 61 is sandwiched between local utility imports (EntityUtils and formUtils). Convention in this codebase groups third-party imports before local ones. This should be moved up near the other third-party imports (e.g., next to the @openmetadata/ui-core-components import block).

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 5, 2026

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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant