Skip to content

test: stabilize upload-button visual tests by disabling hover transitions (CP: 25.1)#11618

Merged
web-padawan merged 1 commit into25.1from
test/aura-upload-stabilize-25.1
Apr 29, 2026
Merged

test: stabilize upload-button visual tests by disabling hover transitions (CP: 25.1)#11618
web-padawan merged 1 commit into25.1from
test/aura-upload-stabilize-25.1

Conversation

@web-padawan
Copy link
Copy Markdown
Member

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


Summary

Aura defines two transitions on the shared :is(vaadin-button, vaadin-upload-button, …) selector at packages/aura/src/components/button.css:7,86-88:

  • scale 180ms on press ([active])
  • opacity 100ms, background-color 100ms on the ::before hover overlay

The upload-button visual tests' hover and active scenarios trigger these via sendMouseToElement / mousedown and capture immediately after, so the screenshot lands somewhere on the 100–180 ms ramp. Different Playwright versions land at different points along that ramp, producing baseline drift on every bump.

Same Playwright-timing cascade pitfall as #11587/#11588/#11591/#11595.

Changes

  • New packages/upload/test/visual/not-animated-styles.js registering transition: none !important on vaadin-upload-button :host, :host::before, :host::after.
  • Imported from the upload-button visual tests for all 3 themes (aura, lumo, base).

!important is required because Aura is adopted into adoptedStyleSheets after registerStyles, and both rules sit at specificity 0,1,0.

Baseline impact

Three Aura *-hover.png upload-button baselines shifted to the fully-opaque hover overlay end state (sub-LSB diff, MAX_DELTA = 1, button center byte-identical). The active, default, focus-ring, disabled, icon and accent baselines stay byte-identical, as do all Lumo and base baselines. The vaadin-upload (legacy) and upload-file-list-thumbnails tests don't render vaadin-upload-button, so they don't import this stylesheet.

Test plan

  • Two consecutive yarn update:aura --group upload runs in Docker produce byte-identical baselines (md5 confirmed).
  • yarn test:{aura,lumo,base} --group upload — all 38/38 (aura), 39/39 (lumo), 39/39 (base) pass against the new baselines.
  • CI visual-tests workflow stays green.

🤖 Generated with Claude Code

…ions (CP: 25.1) (#11598)

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

@web-padawan web-padawan merged commit bd04a45 into 25.1 Apr 29, 2026
10 checks passed
@web-padawan web-padawan deleted the test/aura-upload-stabilize-25.1 branch April 29, 2026 14:09
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