Skip to content

test: stabilize rich-text-editor visual tests by disabling toolbar-button transitions (#11600) (CP: 25.1)#11601

Merged
web-padawan merged 1 commit into25.1from
cherry-pick-11600-to-25.1-1777455723134
Apr 29, 2026
Merged

test: stabilize rich-text-editor visual tests by disabling toolbar-button transitions (#11600) (CP: 25.1)#11601
web-padawan merged 1 commit into25.1from
cherry-pick-11600-to-25.1-1777455723134

Conversation

@vaadin-bot
Copy link
Copy Markdown
Collaborator

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


Original PR description

Summary

Both Aura and Lumo define transitions on the rich-text-editor's toolbar-button parts:

  • packages/aura/src/components/rich-text-editor.css:42-46color 80ms, background-color 80ms, scale 180ms, with a :active override at :62-64
  • packages/vaadin-lumo-styles/src/components/rich-text-editor.css:54 — same color/background-color ramp

Several visual tests trigger these mid-ramp:

  • toolbar-button-hoversendMouseToElement fires the color/bg ramp
  • toolbar-button-pressedsendMouse({ type: 'down' }) engages :active and the scale ramp
  • focus — focusing the editor flips toolbar-button-pressed's --vaadin-rich-text-editor-toolbar-button-{background,text-color} via :focus-within, which the existing transition then animates
  • background-popup / color-popup (Lumo) — opening the colour pickers shifts the active-picker button colours

Capturing immediately after each trigger lands the screenshot somewhere on the 80-180 ms ramp; different Playwright versions land at different points, producing baseline drift on every bump.

Changes

Extend packages/rich-text-editor/test/visual/common.js with [part~='toolbar-button'] { transition: none !important }.

The selector uses ~= because buttons carry multi-token part lists (e.g. part="toolbar-button toolbar-button-bold"); the exact-match [part='toolbar-button'] would silently miss them. !important is required because Aura is adopted into adoptedStyleSheets after registerStyles, and both rules sit at specificity 0,1,0.

Baseline impact

8 baselines shift to their fully-applied end state:

  • 6 Aura — 3 default + 3 dark (focus.png, toolbar-button-hover.png, toolbar-button-pressed.png)
  • 2 Lumo — background-popup.png, color-popup.png

All diffs are sub-pixel: max delta ≤ 3, zero high-delta pixels. Base baselines are byte-identical to main.

Test plan

  • Two consecutive 4-config sweeps in Docker (yarn update:aura --group rte && update:aura:dark --group rte && update:lumo --group rte && update:base --group rte) produce byte-identical baselines.
  • yarn test:aura --group rte (and the dark + lumo + base counterparts) pass against the new baselines.
  • CI visual-tests workflow stays green.

Same cascade-order pattern as #11587/#11588/#11591/#11595/#11598/#11599.

🤖 Generated with Claude Code

…ons (#11600)

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

@web-padawan web-padawan merged commit d056092 into 25.1 Apr 29, 2026
10 checks passed
@web-padawan web-padawan deleted the cherry-pick-11600-to-25.1-1777455723134 branch April 29, 2026 09:50
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