I know that Cypress is not big on conditional testing, but coming from a selenium webdriver background, I'm very used to using this kind of logic in my tests.
I am testing a KaiOS app that instead of scrolling, uses page flipping similar to a kindle device to make it easier for the user to read.
Currently, since KaiOS is based on Firefox OS, the only way to use the app on a computer in a similar way to the device is to use firefox. The problem is that the page flipping when running the tests on cypress (even with firefox) is not working as expected so when we flip the page it doesn't go to the same page as it does on the device or firefox.
So, since I can't make sure how to find the element I'm looking for, I need to keep flipping pages and look for it and then interact with it.
I have tried a bunch of different things without success.
What I need is fairly simple:
- go to page
- check for presence of element, if not present, flip page. keep flipping pages until it finds the element
- once it found the element, interact with it