Testing carousels #17716
Unanswered
joshuacassidygrant
asked this question in
Component Testing
Testing carousels
#17716
Replies: 1 comment
-
Can you provide an isolated reproduction? I agree it's gonna be a tricky component to test. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been trying to test a component made with Ant Design's carousel (https://ant.design/components/carousel/), itself built on react-slick. I'm having a lot of trouble navigating it in a deterministic way (e.g. "Wait until load; click on Next, wait for next element, repeat).
My strategy:
Check if the last slide has become non-visible.
Check if the current slide's elements are visible
Click next
This seems to work... sometimes. Often, I get into a state where Cypress thinks an element is not visible (since it is still animating in) and fails rather than retrying.
Has anyone else had good success or a better strategy for these types of dynamic components that require a series of repeated interactions and animated transitions?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions