Skip to content

[2.0] fix(playwright): stop search-settings slider drags from landing on stale coordinates - #37639

Merged
shrabantipaul-collate merged 1 commit into
2.0from
fix/2.0-search-settings-slider-offscreen-drag
Nov 12, 2026
Merged

shrabantipaul-collate merged 1 commit into
2.0from
fix/2.0-search-settings-slider-offscreen-drag

Conversation

@shrabantipaul-collate

@shrabantipaul-collate shrabantipaul-collate commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

No issue: test-only fix for the nightly AUT failure in openmetadata-nightly run 43151588373 (AUT kind / postgresql 1.12.14 ➡ 2.0).

SearchSettings.spec.ts › Preview config reflects reverted n-gram weight after save has timed out on all 3 attempts in most 2.0 AUT runs since Nov 8. Of 13 runs, 7 failed and 4 passed only on retry.

Root cause (from the trace): setSliderValue read the slider track's bounding box before hover() scrolled the slider into view. In the Collate shell, the track was measured at y=862 (the viewport is 720px tall), and the hover then scrolled the handle to y=541. The helper dragged with raw mouse.down/move/up on those stale coordinates while the n-gram collapse panel was still expanding, and it never checked the result. The drag was lost and the weight stayed at 1. Save stayed disabled, and the test hit the 60s timeout on save-btn.click().

Fix: setSliderValue now:

  • re-reads the coordinates after hover() on every attempt, and drags along the handle's own row;
  • uses the arrow keys (step 0.1) for any remaining gap, so values like 25.6 or the reverted 1 land exactly;
  • asserts aria-valuenow, all inside expect().toPass({ timeout: 15_000 }), so a lost drag is retried instead of being ignored.

This is 2.0 only. main replaced the antd slider and this helper in #35253.

Type of change:

  • Bug fix

High-level design:

N/A — small change (one Playwright helper).

Tests:

Use cases covered

  • Field weight / field-value boost sliders on the search settings pages are set to an exact value, even while the panel is animating or the slider starts outside the viewport.

Unit tests

  • Not applicable (Playwright helper only).

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Files updated: playwright/utils/searchSettingUtils.ts (used by SearchSettings.spec.ts and CustomProperties.spec.ts).

Manual testing performed

Run locally against an OpenMetadata 2.0.7 stack (no search-settings UI or config drift between 2.0.7-release and 2.0):

  1. Throwaway spec at 6× CPU throttle (Emulation.setCPUThrottlingRate), viewport heights 720/420/360. The old helper failed 11/11 (lands on 5.1 instead of 5). The new helper passed 11/11.
  2. SearchSettings.spec.ts:438 (the failing test), --repeat-each=5: 5/5 passed.
  3. Full SearchSettings.spec.ts (Basic + chromium projects): 10/10 passed.
  4. CustomProperties.spec.ts "configure search for Dashboard/Pipeline" (other helper callers): 2/2 passed.
  5. organize-imports, eslint, prettier and tsc are clean on the changed file.

Playwright run (terminal): the failing test 5/5 with --repeat-each=5, then the full SearchSettings.spec.ts 10/10, at commit 629c3eb3640 against OpenMetadata 2.0.7.

Playwright: SearchSettings.spec.ts passing on the fix

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

🤖 Generated with Claude Code

… on stale coordinates

setSliderValue read the track's bounding box before hover() scrolled the
slider into view, then dragged with raw mouse events and never checked
the result. In the Collate AUT shell the slider starts below the fold and
its collapse panel is still expanding, so the drag missed, the weight
stayed at 1, Save stayed disabled, and "Preview config reflects reverted
n-gram weight after save" timed out on every retry.

Re-measure after hover() on every attempt, drag along the handle's own
row, key-step the remaining gap (step 0.1), and assert aria-valuenow
inside expect().toPass so a lost drag is retried instead of silently
ignored.
@shrabantipaul-collate
shrabantipaul-collate requested a review from a team as a code owner November 12, 2026 08:16
@shrabantipaul-collate
shrabantipaul-collate requested review from shah-harshit and removed request for a team November 12, 2026 08:16
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Changing the Playwright slider helper to retry drags and adjust with arrow keys could produce incorrect settings or alter test outcomes.

Test-only fix to the setSliderValue Playwright helper in playwright/utils/searchSettingUtils.ts, which re-reads slider coordinates after hover(), uses arrow keys for remaining gaps, and asserts aria-valuenow inside a retry block so lost drags are retried instead of silently ignored. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@shrabantipaul-collate
shrabantipaul-collate merged commit 37bd287 into 2.0 Nov 12, 2026
54 of 57 checks passed
@shrabantipaul-collate
shrabantipaul-collate deleted the fix/2.0-search-settings-slider-offscreen-drag branch November 12, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants