Skip to content

Chore(UI): Fix flakiness in AutoPilot and ServiceEntity#27226

Merged
aniketkatkar97 merged 9 commits intomainfrom
fix-flaky-aut
Apr 15, 2026
Merged

Chore(UI): Fix flakiness in AutoPilot and ServiceEntity#27226
aniketkatkar97 merged 9 commits intomainfrom
fix-flaky-aut

Conversation

@aniketkatkar97
Copy link
Copy Markdown
Member

This pull request makes targeted improvements to the Playwright utility functions in common.ts to enhance test reliability and specificity. The main changes focus on improving page navigation and toast notification handling.

Navigation improvements:

  • Updated redirectToHomePage to use waitUntil: 'domcontentloaded' when navigating to the home page, ensuring the DOM is loaded before proceeding.

Toast notification handling:

  • Modified toastNotification to wait specifically for the alert bar containing the provided message text, and to pass through the optional timeout parameter for more precise test control. Removed redundant checks for the alert bar text.

@aniketkatkar97 aniketkatkar97 self-assigned this Apr 10, 2026
@aniketkatkar97 aniketkatkar97 requested a review from a team as a code owner April 10, 2026 05:53
@aniketkatkar97 aniketkatkar97 added the To release Will cherry-pick this PR into the release branch label Apr 10, 2026
Copilot AI review requested due to automatic review settings April 10, 2026 05:53
@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Apr 10, 2026
@aniketkatkar97 aniketkatkar97 changed the title Chore(UI): Fix flakiness in AutoPilot and ServiceForm Chore(UI): Fix flakiness in AutoPilot and ServiceEntity Apr 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves Playwright test stability by tightening navigation and toast-notification waits in shared utilities.

Changes:

  • Update redirectToHomePage to navigate with waitUntil: 'domcontentloaded' before continuing.
  • Update toastNotification to wait for the specific alert-bar content matching the provided message (and forward the optional timeout).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 10, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.88% (59797/93603) 43.64% (31322/71768) 46.73% (9415/20144)

Copilot AI review requested due to automatic review settings April 13, 2026 03:45
@open-metadata open-metadata deleted a comment from github-actions Bot Apr 13, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

timeout?: number
) => {
await page.getByTestId('alert-bar').waitFor({
await page.getByTestId('alert-bar').getByText(message).waitFor({
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toastNotification now uses getByText(message) which does substring matching by default for string messages. This reduces assertion specificity compared to the previous toHaveText check and can allow the helper to pass even when the toast text contains additional/unexpected content. Consider using exact matching for string messages (e.g., getByText(message, { exact: true }) when typeof message === 'string') or otherwise restoring an explicit assertion that the visible toast message matches the expected text.

Suggested change
await page.getByTestId('alert-bar').getByText(message).waitFor({
const alertBar = page.getByTestId('alert-bar');
const toastMessage =
typeof message === 'string'
? alertBar.getByText(message, { exact: true })
: alertBar.getByText(message);
await toastMessage.waitFor({

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 14, 2026 12:23
@open-metadata open-metadata deleted a comment from github-actions Bot Apr 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings April 15, 2026 04:49
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 15, 2026

Code Review ✅ Approved

Stabilizes UI test execution for AutoPilot and ServiceEntity components by addressing intermittent flakiness. 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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (27 flaky)

✅ 3629 passed · ❌ 0 failed · 🟡 27 flaky · ⏭️ 84 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 477 0 3 4
🟡 Shard 2 643 0 2 7
🟡 Shard 3 644 0 9 1
🟡 Shard 4 620 0 6 22
🟡 Shard 5 611 0 1 42
🟡 Shard 6 634 0 6 8
🟡 27 flaky test(s) (passed on retry)
  • Flow/Navbar.spec.ts › Search Term - Metric (shard 1, 1 retry)
  • Flow/Tour.spec.ts › Tour should work from help section (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 › Automated badge should appear on entity description with Automated source (shard 2, 1 retry)
  • Features/Permissions/GlossaryPermissions.spec.ts › Team-based permissions work correctly (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 2 retries)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 2 retries)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/UserProfileOnlineStatus.spec.ts › Should show "Active recently" for users active within last hour (shard 3, 1 retry)
  • Flow/AddRoleAndAssignToUser.spec.ts › Verify assigned role to new user (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 Table (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 assets (tables, topics, dashboards) preserves associations (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Rename domain with owners and experts preserves assignments (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Tag Add, Update and Remove (shard 4, 1 retry)
  • Pages/Glossary.spec.ts › Delete Glossary and Glossary Term using Delete Modal (shard 5, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Spreadsheet (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/Users.spec.ts › Permissions for table details page for Data Consumer (shard 6, 1 retry)
  • Pages/Users.spec.ts › Check permissions for Data Steward (shard 6, 1 retry)
  • VersionPages/EntityVersionPages.spec.ts › Directory (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

@github-actions
Copy link
Copy Markdown
Contributor

Changes have been cherry-picked to the 1.12.6 branch.

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 To release Will cherry-pick this PR into the release branch UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants