Skip to content

fix(playwright): expand nested columns before suggestion assertions#28059

Merged
harsh-vador merged 3 commits into
1.13from
fix-expand-row-suggestion-spec
May 13, 2026
Merged

fix(playwright): expand nested columns before suggestion assertions#28059
harsh-vador merged 3 commits into
1.13from
fix-expand-row-suggestion-spec

Conversation

@harsh-vador
Copy link
Copy Markdown
Contributor

@harsh-vador harsh-vador commented May 12, 2026

Describe your changes:

Summary

  • Export expandNestedColumn from nestedColumnUpdatesUtils.ts (was const, not reachable)
  • TagsSuggestion.spec.ts: expand struct + array columns before avatar click so all 9 suggested-SuggestTagLabel-card elements render
  • DescriptionSuggestion.spec.ts: same expansion at 3 points — before count check, before accepting a level-2 column suggestion, and after page.reload() to keep nested rows visible through remaining steps

Root cause

PR #27959 changed nested columns to collapse by default. Both suggestion specs relied on implicit auto-expansion: the toHaveCount(entityLinkColumnsName.length) assertion and [data-row-key*=columnsName[5]] locators fail when the parent struct/array rows are collapsed.

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

High-level design:

N/A — small change.

Tests:

Use cases covered

Unit tests

Backend integration tests

Ingestion integration tests

Playwright (UI) tests

Manual testing performed

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

Summary by Gitar

  • Test updates:
    • Updated TestDefinitionForm.test.tsx to include supportedDataTypes as a required field for OpenMetadata tests.
    • Added specific test case to verify supportedDataTypes validation error and updated existing suite to reflect the new requirement.

This will update automatically on new commits.

@harsh-vador harsh-vador self-assigned this May 12, 2026
@harsh-vador harsh-vador requested a review from a team as a code owner May 12, 2026 08:52
@harsh-vador harsh-vador added the safe to test Add this label to run secure Github workflows on PRs label May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions
Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 12, 2026

Code Review ✅ Approved 1 resolved / 1 findings

Exports the expandNestedColumn utility and updates Playwright specs to explicitly expand nested rows before assertions, ensuring consistent visibility of nested columns. Resolved the need for shared expansion logic.

✅ 1 resolved
Quality: Duplicated expand-columns logic should be a shared helper

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DescriptionSuggestion.spec.ts:77-89 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DescriptionSuggestion.spec.ts:155-167 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DescriptionSuggestion.spec.ts:189-201 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TagsSuggestion.spec.ts:78-90
The same 10-line block (get cols, get structCol, get arrayCol, call expandNestedColumn twice) is copy-pasted 4 times across DescriptionSuggestion.spec.ts (3×) and TagsSuggestion.spec.ts (1×). Extracting it into a small helper (e.g. expandSuggestionColumns(page, table)) would reduce duplication and make future column-structure changes a single-point edit.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@github-actions
Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions
Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.76% (60331/94622) 44.21% (32266/72976) 47.04% (9646/20502)

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

🟡 Playwright Results — all passed (13 flaky)

✅ 3742 passed · ❌ 0 failed · 🟡 13 flaky · ⏭️ 79 skipped

Shard Passed Failed Flaky Skipped
✅ Shard 1 290 0 0 4
🟡 Shard 2 699 0 2 7
🟡 Shard 3 723 0 3 1
🟡 Shard 4 710 0 3 24
🟡 Shard 5 672 0 1 35
🟡 Shard 6 648 0 4 8
🟡 13 flaky test(s) (passed on retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/IncidentManager.spec.ts › Complete Incident lifecycle with table owner (shard 2, 1 retry)
  • Features/Permissions/GlossaryPermissions.spec.ts › Team-based permissions work correctly (shard 3, 1 retry)
  • Features/SettingsNavigationPage.spec.ts › should save changes and navigate when "Save changes" is clicked in blocker (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Directory (shard 4, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate Description Rule Is_Not_Set (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Multiple consecutive domain renames preserve all associations (shard 4, 1 retry)
  • Pages/EntityDataConsumer.spec.ts › Tier Add, Update and Remove (shard 5, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)
  • Pages/Users.spec.ts › Permissions for table details page for Data Consumer (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

@harsh-vador harsh-vador merged commit 8df7a8a into 1.13 May 13, 2026
48 of 50 checks passed
@harsh-vador harsh-vador deleted the fix-expand-row-suggestion-spec branch May 13, 2026 07:56
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants