Skip to content

test: pin item height in date-picker overlay-content fixture (#11676) (CP: 25.1)#11725

Merged
web-padawan merged 1 commit into
25.1from
cherry-pick-11676-to-25.1-1778494466828
May 11, 2026
Merged

test: pin item height in date-picker overlay-content fixture (#11676) (CP: 25.1)#11725
web-padawan merged 1 commit into
25.1from
cherry-pick-11676-to-25.1-1778494466828

Conversation

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #11676 to branch 25.1.


Original PR description

The customizeFixture helper in overlay-content.test.js set the month scroller height as 270 * monthScrollerItems px, hardcoding the theme-specific Lumo item height. The actual --vaadin-infinite-scroller-item-height is theme-dependent (264 px in the current base styles, different in upcoming changes), so revealDate position math drifted and two assertions had to fall back on closeTo(…, 0.1) plus FIXME comments.

Pin the CSS variable to 270px on the month scroller before it activates (i.e. before _createPool reads and caches itemHeight). With a clean integer item height, percentage-based buffer offsets resolve to whole pixels and the visible-area math is exact:

  • monthScrollerItems: 2, no offset → visibleItems = 2 → expected position + 1
  • monthScrollerItems: 3, 10% offset → bufferOffset = 81 px exact → visibleItems = 2.4 → expected position + 0.6

Drop the FIXMEs and tighten the two assertions from closeTo(…, 0.1) to equal(…) so any future drift fails loudly instead of being masked.

🤖 Generated with Claude Code

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@web-padawan web-padawan merged commit 275eb78 into 25.1 May 11, 2026
10 checks passed
@web-padawan web-padawan deleted the cherry-pick-11676-to-25.1-1778494466828 branch May 11, 2026 11:01
@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

This ticket/PR has been released with Vaadin 25.1.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants