Advertisement
Glorifind

steps_definition.rb

Sep 3rd, 2015
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.01 KB | None | 0 0
  1. require 'calabash-android/calabash_steps'
  2.  
  3. #Given(/^I wait to see welcoming sceen$/) do
  4. #  macro 'I see the text "WPISZ MIEJSCOWO\u015A\u0106"'
  5. #end
  6.  
  7. When(/^I enter "(.*?)" into input$/) do |arg1|
  8.   arg1 = "Chorzów"
  9.   macro %[I enter "#{arg1}" into input field number 1]
  10. end
  11.  
  12. Then(/^I touch show$/) do
  13.   tap_mark "POKA\u017B"
  14. end
  15.  
  16. Then(/^I should see list of places$/) do
  17.   wait_for_elements_exist(["com.pp.evokids.view.custom.layout.ImageListView"], :timeout => 5)
  18.   screenshot_embed
  19. end
  20.  
  21. Given(/^I see list of places$/) do
  22.   wait_for_elements_exist(["com.pp.evokids.view.custom.layout.ImageListView"], :timeout => 5)
  23. end
  24.  
  25. Then(/^I choose category:$/) do |table|
  26.   # table is a Cucumber::Ast::Table
  27.   data = table.raw
  28.   data.each do |i|
  29.     #tap_mark i
  30.     #tap_when_element_exists("* {text CONTAINS[c] '#{i}'}")
  31.     touch(i)
  32.     #TODO move back one View
  33.   end
  34. end
  35.  
  36. Then(/^I should see list of all sub\-categories$/) do
  37.   pending # express the regexp above with the code you wish you had
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement