Skip to content

test: extract menu-bar overflow layout tests into own file (#12824) (CP: 25.2) - #12826

Merged
web-padawan merged 1 commit into
25.2from
cherry-pick-12824-to-25.2-1790172739292
Sep 23, 2026
Merged

web-padawan merged 1 commit into
25.2from
cherry-pick-12824-to-25.2-1790172739292

Conversation

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #12824 to branch 25.2.


Original PR description

Description

Related to #12816

  • Moved the responsive behavior in container, layout combinations and parent resize blocks from overflow.test.js to a new overflow-layouts.test.js, so tests for menu bars inside flex and grid parents have one home
  • Extracted the shared helpers (assertHidden, assertVisible, createItems, expectCollapsed, expectOverflowInside, BUTTON_WIDTH) into helpers.js and imported them in both files
  • Flattened the moved blocks into one flat it per case with a fixtureMenuBar(html, items) helper that renders the markup, sets the items and waits for the first detection
  • Added three tests for layouts where the overflow button already stays inside the menu bar, so upcoming overflow changes cannot regress them silently:
    • grid column sized by content (grid-template-columns: auto 1fr)
    • flex toolbar with align-items: center
    • shrink-to-fit menu bar (display: inline-block; max-width: 100%)

Type of change

  • Tests

🤖 Generated with Claude Code

@sonarqubecloud

Copy link
Copy Markdown

@web-padawan
web-padawan merged commit c6a49d2 into 25.2 Sep 23, 2026
10 checks passed
@web-padawan
web-padawan deleted the cherry-pick-12824-to-25.2-1790172739292 branch September 23, 2026 14:16
@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

This ticket/PR has been released with Vaadin 25.2.9.

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