fix(playwright): retry oneOf dropdown selection when React Aria popover closes on scroll - #32940
fix(playwright): retry oneOf dropdown selection when React Aria popover closes on scroll#32940Rohit0301 wants to merge 11 commits into
Conversation
…er closes on scroll Co-Authored-By: Claude Sonnet 4.6 <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 |
…strict-mode violations Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ Playwright Results — workflow succeededValidated commit ✅ 4478 passed · ❌ 0 failed · 🟡 6 flaky · ⏭️ 1 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 24s ⏱️ Max setup 4m 20s · max shard execution 20m 9s · max shard-job elapsed before upload 23m 59s · reporting 19s 🌐 216.94 requests/attempt · 2.31 app boots/UI scenario · 35.24% common-shard skew Optimization targets still in progress:
🟡 6 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
…try to handle React Aria scroll-dismissal - AirflowIngestionClass: fix option name 'BackendConnection' → 'Backend Connection' - serviceFormUtils: migrate selectIngestionRunnerFromDropdown to selectOptionWithRetry - ServiceBaseClass: migrate runner select to selectOptionWithRetry, remove .first() positional locator - ConnectionConfigLayout: migrate chooseSelectOption to selectOptionWithRetry Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t strict-mode violations - ServiceBaseClass: update displayName to full label 'Collate SaaS Runner' (was substring 'Collate SaaS') - Both runner option locators now use exact: true, consistent with selectOneOfOption Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code Review ✅ Approved 2 resolved / 2 findingsFixes React Aria popover dismissal on scroll during oneOf dropdown selection by replacing the fallback logic with ✅ 2 resolved✅ Edge Case: Option locator may match multiple options (strict-mode)
✅ Edge Case: Runner option locator omits exact match (substring)
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 |
Describe your changes:
The
AutoPilot.spec.tstest (and any other test usingselectOneOfOption) was timing out atserviceFormUtils.ts:72because the React Aria non-modal popover was being dismissed by Playwright's automatic scroll-into-view behavior. The sequence:selectWidget.click()opens the popovergetByLabel(...).getByText(...)fallback that never matched a real element, blocking until the 8-minute timeoutFix: replace the multi-path fallback with
selectOptionWithRetry(trigger, option)— the existing utility inplaywright/utils/common.tsthat checksaria-expanded, reopens the dropdown if closed, and retries withinexpect(...).toPass({ timeout: 15000 }). Also removes.first()positional locators that violated theopenmetadata-playwright/no-positional-locatorslint rule.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
AutoPilot.spec.ts › Create Service and check the AutoPilot status— the dropdown selection in the service creation form now retries correctly when the React Aria popover closes due to scrollUnit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
playwright/utils/serviceFormUtils.ts— the utility used by AutoPilot and any service form test that callsselectOneOfOption.Manual testing performed
waiting for getByLabel('Backend Connection', { exact: true }).getByText('Backend Connection')— confirmed the broken fallback was the blocking point.UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.