Skip to content

Fix flaky resize debounce test#658

Merged
ValentinH merged 1 commit into
mainfrom
agent/fix-flaky-resize-debounce-test
Jul 8, 2026
Merged

Fix flaky resize debounce test#658
ValentinH merged 1 commit into
mainfrom
agent/fix-flaky-resize-debounce-test

Conversation

@ValentinH

@ValentinH ValentinH commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Stabilize the resize debounce Cypress test by waiting for the initial crop UI to settle before spying
  • Compare callback counts against a captured baseline instead of assuming zero calls
  • Reuse cy.setViewportStable for resize delivery

Root cause

The test waited two animation frames before installing the console spy, but image load, React updates, and ResizeObserver delivery can still land after that timing guess. That let the initial onCropComplete be counted as part of the resize burst.

Validation

  • pnpm test
📦 Published PR as canary version: 6.2.1--canary.658.13e41e0.0

✨ Test out this PR locally via:

npm install react-easy-crop@6.2.1--canary.658.13e41e0.0
# or 
yarn add react-easy-crop@6.2.1--canary.658.13e41e0.0

@ValentinH ValentinH marked this pull request as ready for review July 8, 2026 08:00
@ValentinH ValentinH added the skip-release Preserve the current version when merged label Jul 8, 2026
@ValentinH ValentinH merged commit 0c18355 into main Jul 8, 2026
4 checks passed
@ValentinH ValentinH deleted the agent/fix-flaky-resize-debounce-test branch July 8, 2026 08:00
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🚀 PR was released in v6.2.1 🚀

@github-actions github-actions Bot added the released This issue/pull request has been released. label Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released This issue/pull request has been released. skip-release Preserve the current version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant