Assertions are powered by Cucumber and written in steps, usually using plain English sentences
Written in Ruby
Assertions
@chooz-login
Feature:
Scenario:
Given I wait for "Chooz ze good" to appear
Then I press "Se connecter avec email"
Then I wait for "Ton mot de passe" to appear
Then I press "Revenir"
And I wait for "Chooz ze good" to appear
Then I press "Se connecter avec email"
Then I wait for "Ton mot de passe" to appear
Then(/^I should see '(.*)'$/) do |expected_mark|
until element_exists("view marked:'#{expected_mark}'")
|| element_exists("view text:'#{expected_mark}'")
screenshot_and_raise "No element found: #{expected_mark}"
end
end
Features with scenarios
Steps
How does it works?
Setting up Calabash with React Native
Installing Calabash-ios
https://github.com/calabash/calabash-ios
Tutorial & documentation on the GitHub:
I added Calabash to a React Native app:
https://github.com/bamlab/rn-calabash-demo
DEMO TIME
Predefined steps
I wait for "..." to appear
I touch "..."
I should see "..."
I should see text starting with "prefix"
I enter "..." into input field number 1
I pinch to zoom in
I swipe left
I take picture