Skip to content

test: stabilize crud lumo visual tests by disabling backdrop animation#11587

Merged
web-padawan merged 1 commit intomainfrom
test/lumo-crud-tests
Apr 28, 2026
Merged

test: stabilize crud lumo visual tests by disabling backdrop animation#11587
web-padawan merged 1 commit intomainfrom
test/lumo-crud-tests

Conversation

@web-padawan
Copy link
Copy Markdown
Member

Summary

  • The Lumo overlay backdrop has a 0.2s lumo-overlay-backdrop-enter fade-in animation that packages/crud/test/not-animated-styles.js did not neutralize. Playwright's Locator.screenshot() defaults to animations: 'allow', so the captured frame landed at a varying point along that 0.2 s ramp depending on machine load, producing flaky baselines for any crud test that captures an open editor dialog (default-position, fullscreen, and theme-no-border-edit).
  • Added [part='backdrop'] to the existing animation: none !important selector list. The backdrop now sits at its CSS-default opacity from frame 0, so timing no longer matters.
  • Regenerated the 9 affected lumo baselines. The remaining 14 (closed-dialog) screenshots are byte-identical.

Test plan

  • Two consecutive yarn update:lumo --group crud runs (in the official Playwright Docker image) produce byte-identical PNGs (md5 confirmed).
  • yarn test --config web-test-runner-lumo.config.js --group crud passes 23/23 against the new baselines.
  • CI visual-tests workflow stays green.

🤖 Generated with Claude Code

The Lumo overlay backdrop has a 0.2s fade-in animation that the existing
not-animated-styles.js did not neutralize. Playwright's screenshot()
defaults to animations: 'allow', so the captured frame landed at varying
points along the ramp depending on machine load, producing flaky
baselines for any test with an open editor dialog.

Add [part='backdrop'] to the animation: none selector list and
regenerate the affected baselines.
@sonarqubecloud
Copy link
Copy Markdown

@web-padawan web-padawan merged commit bf83124 into main Apr 28, 2026
10 checks passed
@web-padawan web-padawan deleted the test/lumo-crud-tests branch April 28, 2026 11:24
web-padawan added a commit that referenced this pull request Apr 28, 2026
#11587) (#11589)

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
web-padawan added a commit that referenced this pull request Apr 28, 2026
…isabling backdrop animation

The Lumo overlay backdrop has a 0.2s lumo-overlay-backdrop-enter
fade-in that was not neutralised in any of these packages — dialog
and confirm-dialog covered :host([opening|closing]) and
[part='overlay'] but left [part='backdrop'] animated, while overlay
had no test stylesheet at all. Playwright's screenshot() defaults to
animations: 'allow', so the captured frame lands at a varying point
along the 0.2s ramp depending on machine load, producing flaky
baselines for any test with an open overlay backdrop.

Add [part='backdrop']: animation: none !important to dialog and
confirm-dialog test stylesheets, create the same for overlay, wire
it up in overlay.test.js, and regenerate the affected lumo
baselines. Same fix already applied to crud (#11587).
web-padawan added a commit that referenced this pull request Apr 29, 2026
…lete-state transitions

Aura defines two classes of transitions that race with Playwright's
screenshot timing on the upload components:

- packages/aura/src/components/button.css:7,86-88 — scale 180ms on
  press and opacity/background-color 100ms on the ::before hover
  overlay, applied to vaadin-upload-button via the shared :is(...)
  selector. The upload-button hover/active scenarios catch these
  mid-ramp.
- packages/aura/src/components/upload.css:92-103 — 200ms max-height
  on vaadin-upload-file[complete]::part(status) and 200ms height on
  the slotted vaadin-progress-bar when an upload finishes. Any test
  that flips a file from non-complete to complete and captures
  within 200ms can land mid-collapse.

Add packages/upload/test/visual/not-animated-styles.js with
transition: none !important on:
- vaadin-upload-button :host, :host::before, :host::after
- vaadin-upload-file [part='status']
- vaadin-progress-bar :host (registered separately because the
  progress-bar is slotted into upload-file's "progress" slot — a
  rule scoped to upload-file's shadow cannot reach a light-DOM
  slotted child, so the override has to live in the progress-bar's
  own shadow with !important to beat the document-level Aura rule)

Wire it into all three themes' upload, upload-button, and
upload-file-list-thumbnails visual tests. Three Aura *-hover.png
upload-button baselines shifted to the fully-opaque hover overlay
end state (sub-LSB diff, max delta=1); all other baselines including
Lumo and base are byte-identical to main. The complete-state
suppression is defensive — current tests start with [complete]
already set so no transition fires today, but it protects against
future tests that flip the state programmatically.

Same cascade-order pattern as #11587/#11588/#11591/#11595.
web-padawan added a commit that referenced this pull request Apr 29, 2026
…ransitions

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 added a commit that referenced this pull request 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.
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