Fixes #31636: wait for popover name to resolve in avatar navigation test - #31637
Conversation
The popover renders an empty user name until useEntityPopoverData resolves, so capturing textContent() right after the popover becomes visible could yield an empty string and make the profile-title assertion compare against "". Wait for non-empty text before capturing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
✅ Playwright Results — workflow succeededValidated commit ✅ 75 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking 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) 48m 50s ⏱️ Max setup 1m 36s · max shard execution 7m 30s · max shard-job elapsed before upload 13m 28s · reporting 2s 🌐 162.21 requests/attempt · 1.71 app boots/UI scenario · 0.00% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
|
Changes have been cherry-picked to the 2.0 branch. |
#31637) The popover renders an empty user name until useEntityPopoverData resolves, so capturing textContent() right after the popover becomes visible could yield an empty string and make the profile-title assertion compare against "". Wait for non-empty text before capturing. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> (cherry picked from commit 4f7b626)
Code Review ✅ ApprovedUpdates the avatar navigation Playwright test to wait for the popover user display name to resolve before capturing it, fixing flaky test assertions. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
Changes have been cherry-picked to the 1.13 branch. |
#31637) The popover renders an empty user name until useEntityPopoverData resolves, so capturing textContent() right after the popover becomes visible could yield an empty string and make the profile-title assertion compare against "". Wait for non-empty text before capturing. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> (cherry picked from commit 4f7b626)
Describe your changes:
Fixes #31636
Users.spec.ts›User Profile Feed Interactions›Should navigate to user profile from feed card avatar clickfails intermittently on the merge queue with:Root cause.
PopoverTitle(src/components/common/PopOverCard/PopoverTitle.component.tsx) resolves the popover user viauseEntityPopoverData. Until that request resolves,userDataisundefined, sodisplayNameis''and[data-testid="user-name"]renders empty. The test captured the expected name withtextContent()immediately after the popover became visible — and the popover becomes visible before its user request resolves. On a slow run it captured''and then asserted the profile-page title equals'', while the page correctly showed the real display name.Fix. Wait for the popover name to resolve before capturing it, so the assertion compares two real display names:
Test-only change; no product code touched.
Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Not applicable — no product logic changed.
Backend integration tests
Not applicable (no backend API changes).
Ingestion integration tests
Not applicable (no ingestion changes).
Playwright (UI) tests
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Users.spec.tsManual testing performed
yarn lint:playwright— 0 errors (only pre-existingno-force-option/no-wait-for-selectorwarnings on untouched lines).UI screen recording / screenshots:
Not applicable — no UI changes.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.🤖 Generated with Claude Code
Greptile Summary
The PR stabilizes the user-profile avatar navigation test by waiting for the asynchronously loaded popover name before capturing it.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/flaky-user-..." | Re-trigger Greptile