I think I'm a bit mixed up about the real purpose of Calabash.
I've found some demo script where I read:
Then I see "Sign In"
Then I wait to see if I am on a good screen
Then I enter "my_username" into text field number 1
Then I touch list item number 2
But how do I use operators? In my application, the user often lands on the login page, but can land on the home page if he's really logged. Or on the tutorial if he runs for the first time. On terms and conditions if he never confirmed new terms and condition, or on another screen if some actions are in cache. So it needs a ton of verification.
But all I found were scripts with then, then, that breaks if it doesn't find the specified item.
I'm trying to build a step that would do as follow:
If I am on terms and conditions, click Accept
If I am on login, click Sign In
If I am on tutorial, click Close
And there is no specific order. I found a lot of tutorials on the web, but there is nothing that applies to a normal navigation through an application that can have multiple scenarios. What I understand is that once a test doesn't pass, it stops. Often with a runtime error like "there is no button named -x- so I'll crash"
In a more general way, I want to do stuff like:
Ok, check where I am, and according to where I am in the app, reacts the good way.
Is there something (things) I don't understand about the goal of Calabash. And can I achieve this kind of test with Calabash?
How to cancel certain tests if they are not valid anymore because of the result of one test?