I'm looking to assert that I am on a particular screen during my tests, and if I'm not, then I should fail. What is the recommended way of doing this? For example, if I have a test like this:
Given that I am on the Login screen
When I press "Sign Up"
Then I should be on the Sign up screen
I've written Page Object Models for both screens involved, and they each have a trait method defined.
I've looked, and there is the TaskyPro sample (https://github.com/xamarin/mobile-samples/tree/master/TaskyPro-Calabash/features/step_definitions), which defines an "assert_screen" method. I've tried putting it into my project, but it doesn't work, as @screen is always nil. I don't have Xamarin, so I can't build their project and test it out.