You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Manual test after scroll and carousel settle, the settle event happens. It works in manual test.
In storybook test, I want to check if the log works as expected. I tried to fire scroll event in different ways (e.g. fireEvent.scroll, dispatchEvent, or mouse keydown and drag) and I did see the carousel tile scrolled, and the scroll event of the embla carousel happened, but no settle event happened. Hence the log on settle didn't work.
I also added left/right arrow button, on click to scroll left/right. Manual test onclick arrow button, after scroll event there was settle event, but in storybook only scroll event no settle event.
I googled online, didn't find any solution.
Could you help me understand how to make the settle event happen in storybook test after triggering scroll?
thanks
If applicable, which variants of Embla Carousel are relevant to this question?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi @davidjerleke
I'm using the Embla carousel in my project and want to log some info on
settle
event like this:Manual test after scroll and carousel settle, the settle event happens. It works in manual test.
In storybook test, I want to check if the log works as expected. I tried to fire scroll event in different ways (e.g.
fireEvent.scroll
,dispatchEvent
, or mouse keydown and drag) and I did see the carousel tile scrolled, and thescroll
event of the embla carousel happened, but no settle event happened. Hence the log on settle didn't work.I also added left/right arrow button, on click to scroll left/right. Manual test onclick arrow button, after scroll event there was settle event, but in storybook only scroll event no settle event.
I googled online, didn't find any solution.
Could you help me understand how to make the settle event happen in storybook test after triggering scroll?
thanks
If applicable, which variants of Embla Carousel are relevant to this question?
Additional information
No response
CodeSandbox example
No response
Beta Was this translation helpful? Give feedback.
All reactions