Skip to content

test: stabilize upload-button visual tests by disabling hover transitions#11598

Merged
web-padawan merged 1 commit intomainfrom
test/aura-upload-stabilize
Apr 29, 2026
Merged

test: stabilize upload-button visual tests by disabling hover transitions#11598
web-padawan merged 1 commit intomainfrom
test/aura-upload-stabilize

Conversation

@web-padawan
Copy link
Copy Markdown
Member

@web-padawan web-padawan commented Apr 29, 2026

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

@web-padawan web-padawan force-pushed the test/aura-upload-stabilize branch 2 times, most recently from 11192d8 to 6643bc7 Compare April 29, 2026 09:05
@web-padawan web-padawan changed the title test: stabilize upload visual tests by disabling Aura button and complete-state transitions test: stabilize upload-button visual tests by disabling Aura button transitions Apr 29, 2026
@web-padawan web-padawan changed the title test: stabilize upload-button visual tests by disabling Aura button transitions test: stabilize upload-button visual tests by disabling hover transitions Apr 29, 2026
…ions

Aura defines two transitions on the shared
:is(vaadin-button, vaadin-upload-button, …) selector in
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-180ms ramp.
Different Playwright versions land at different points, producing
baseline drift on every bump.

Add packages/upload/test/visual/not-animated-styles.js with
transition: none !important on vaadin-upload-button :host,
:host::before, :host::after, and import it from the upload-button
visual tests for all 3 themes. Three Aura *-hover.png baselines
shift to the fully-opaque hover overlay end state (sub-LSB diff,
max delta=1); active and default baselines, and all Lumo and base
baselines, stay byte-identical.

Same cascade-order pattern as #11587/#11588/#11591/#11595.
@web-padawan web-padawan force-pushed the test/aura-upload-stabilize branch from 6643bc7 to 649f74a Compare April 29, 2026 09:07
@web-padawan web-padawan requested a review from vursen April 29, 2026 09:07
@sonarqubecloud
Copy link
Copy Markdown

@web-padawan web-padawan merged commit f357c1c into main Apr 29, 2026
10 checks passed
@web-padawan web-padawan deleted the test/aura-upload-stabilize branch April 29, 2026 09:16
@vaadin-bot
Copy link
Copy Markdown
Collaborator

Hi @web-padawan and @web-padawan, when i performed cherry-pick to this commit to 25.1, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick f357c1c
error: could not apply f357c1c... test: stabilize upload-button visual tests by disabling hover transitions (#11598)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

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.

3 participants