Skip to content

test(ui5-dialog): stabilize RTL resize anchor test - #13853

Merged
GerganaKremenska merged 2 commits into
mainfrom
fix-dialog-rtl-resize-anchor
Jul 23, 2026
Merged

test(ui5-dialog): stabilize RTL resize anchor test#13853
GerganaKremenska merged 2 commits into
mainfrom
fix-dialog-rtl-resize-anchor

Conversation

@GerganaKremenska

@GerganaKremenska GerganaKremenska commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The dialog remains anchored after resizing in RTL mode test was skipped due to an intermittent failure: expected 715 to equal 320. 715 is the dialog's initial width — meaning the resize occasionally didn't register on the 1px-wide shadow-DOM resize handle, leaving the dialog unresized rather than clamped to its 320px minimum.

Investigation showed the dialog resize logic on main is correct: with the source unchanged, the full Dialog.cy.tsx spec passes 66/66 across repeated isolated and full-spec runs. The failure is test flakiness, not a product bug, so this fix is test-only — no production code changes.

Changes

packages/main/cypress/specs/Dialog.cy.tsx:

  • Wait for the resize handle to be visible and engage it at its center (realMouseDown({ position: "center" })).
  • Drive the pointer in steps so intermediate mousemove events reliably fire the resize handler.
  • Use closeTo(..., 1) for width / left / right-edge assertions to absorb sub-pixel rounding from getBoundingClientRect.
  • Un-skip the test.

Testing

  • Dialog.cy.tsx passes 66/66 across 3 repeated full-spec runs with the unchanged dialog logic.

Fixes #13813

@sap-ui5-webcomponents-release

Copy link
Copy Markdown

@GerganaKremenska
GerganaKremenska requested review from a team and removed request for a team July 22, 2026 06:54
@GerganaKremenska
GerganaKremenska marked this pull request as draft July 22, 2026 12:24
The "dialog remains anchored after resizing in RTL mode" test was
skipped due to an intermittent failure (expected 715 to equal 320).
715 is the dialog's initial width, i.e. the resize occasionally did
not register on the 1px-wide resize handle, leaving the dialog
unresized.

Harden the test instead of changing production logic:
- Wait for the resize handle to be visible and grab it at its center.
- Drive the pointer in steps so intermediate mousemove events reliably
  fire the resize handler.
- Use closeTo(..., 1) for width / left / right-edge assertions to
  absorb sub-pixel rounding from getBoundingClientRect.

The dialog resize logic is unchanged; the full Dialog spec passes
66/66 across repeated runs.

Fixes #13813
@GerganaKremenska
GerganaKremenska force-pushed the fix-dialog-rtl-resize-anchor branch from 6dc0d54 to b4db82b Compare July 22, 2026 12:42
@GerganaKremenska GerganaKremenska changed the title fix(ui5-dialog): anchor right edge when resizing in RTL mode test(ui5-dialog): stabilize RTL resize anchor test Jul 22, 2026
@GerganaKremenska
GerganaKremenska marked this pull request as ready for review July 23, 2026 07:38
@GerganaKremenska
GerganaKremenska requested a review from a team July 23, 2026 07:39
@GerganaKremenska
GerganaKremenska merged commit 30007a5 into main Jul 23, 2026
12 checks passed
@GerganaKremenska
GerganaKremenska deleted the fix-dialog-rtl-resize-anchor branch July 23, 2026 11:23
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.

fix(ui5-dialog): dialog right-edge anchor drifts when resizing in RTL mode

2 participants