Skip to content

fix(playwright): Fix flaky announcement reply click in ServiceEntity test#27261

Merged
harsh-vador merged 1 commit intomainfrom
fix-flaky-serviceentity-spec
Apr 11, 2026
Merged

fix(playwright): Fix flaky announcement reply click in ServiceEntity test#27261
harsh-vador merged 1 commit intomainfrom
fix-flaky-serviceentity-spec

Conversation

@harsh-vador
Copy link
Copy Markdown
Contributor

Describe your changes:

Summary

  • Fix flaky Playwright test in ServiceEntity.spec.ts by clicking getByTestId('add-reply') directly instead of targeting its child .locator('svg'), which gets detached from the DOM during popover animation in CI

Root Cause

The inner SVG element of the reply button is unstable during popover animations — it can be detached and recreated by React re-renders. In slower CI environments, this race condition triggers "element is not stable" / "element was detached from the DOM" errors. Locally, rendering is fast enough that the click completes before any re-render.

Fix

Aligned the add-reply click with the pattern already used by edit-message and delete-message in the same file — click the data-testid container directly rather than drilling into the SVG child.

Screen.Recording.2026-04-11.at.1.43.10.AM.mov

Type of change:

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

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • 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.

@harsh-vador harsh-vador self-assigned this Apr 10, 2026
@harsh-vador harsh-vador requested a review from a team as a code owner April 10, 2026 20:14
@harsh-vador harsh-vador added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Apr 10, 2026
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 10, 2026

Code Review ✅ Approved

Fixes flaky announcement reply click behavior in ServiceEntity test by improving Playwright element interaction reliability. No issues found.

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

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 64%
64.25% (59751/92995) 43.84% (31229/71229) 46.95% (9394/20006)

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (21 flaky)

✅ 3604 passed · ❌ 0 failed · 🟡 21 flaky · ⏭️ 207 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 453 0 4 2
🟡 Shard 2 641 0 2 32
🟡 Shard 3 648 0 2 26
🟡 Shard 4 621 0 6 47
🟡 Shard 5 608 0 1 67
🟡 Shard 6 633 0 6 33
🟡 21 flaky test(s) (passed on retry)
  • Features/DataAssetRulesDisabled.spec.ts › Verify the Database entity item action after rules disabled (shard 1, 1 retry)
  • Features/CustomizeDetailPage.spec.ts › Table - customization should work (shard 1, 1 retry)
  • Flow/Tour.spec.ts › Tour should work from welcome screen (shard 1, 1 retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/ChangeSummaryBadge.spec.ts › AI badge should NOT appear for manually-edited descriptions (shard 2, 1 retry)
  • Features/Permissions/GlossaryPermissions.spec.ts › Team-based permissions work correctly (shard 3, 1 retry)
  • Flow/ExploreDiscovery.spec.ts › Should display deleted assets when showDeleted is checked and deleted is not present in queryFilter (shard 3, 1 retry)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Topic (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Chart (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Rename domain with subdomains attached verifies subdomain accessibility (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Rename domain with data products attached at domain and subdomain levels (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Inactive Announcement create & delete (shard 4, 1 retry)
  • Pages/ExploreTree.spec.ts › Verify Database and Database Schema available in explore tree (shard 5, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Table (shard 6, 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/ProfilerConfigurationPage.spec.ts › Non admin user (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 69a428e into main Apr 11, 2026
54 of 84 checks passed
@harsh-vador harsh-vador deleted the fix-flaky-serviceentity-spec branch April 11, 2026 04:08
SaaiAravindhRaja pushed a commit to SaaiAravindhRaja/OpenMetadata that referenced this pull request Apr 12, 2026
SaaiAravindhRaja pushed a commit to SaaiAravindhRaja/OpenMetadata that referenced this pull request Apr 12, 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.

2 participants