Sha256: a777f99ffd384d4ab567658c375ce87799db475b40b5af7c51e8a66a1951921d

Contents?: true

Size: 579 Bytes

Versions: 2

Compression:

Stored size: 579 Bytes

Contents

#include Briar::ScrollView
#include Briar::Core

Then /^I scroll (left|right|up|down) until I see "([^\"]*)" limit (\d+)$/ do |dir, name, limit|
  unless exists?(name)
    count = 0
    begin
      scroll("scrollView index:0", dir)
      step_pause
      count = count + 1
    end while ((not exists?(name)) and count < limit.to_i)
  end
  unless exists?(name)
    screenshot_and_raise "i scrolled '#{dir}' '#{limit}' times but did not see #{name}"
  end
end

Then /^I scroll "([^"]*)" (left|right|up|down)"$/ do |name, dir|
  swipe(dir, {:query => "view marked:'#{name}'"})
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
briar-0.0.5 features/step_definitions/scroll_view_steps.rb
briar-0.0.4 features/step_definitions/scroll_view_steps.rb