Sha256: 831c40b35d215cca88538e660e07158220e32c338fadd5f97ee2b2892a88d0c2

Contents?: true

Size: 1.38 KB

Versions: 2

Compression:

Stored size: 1.38 KB

Contents

When /^I touch (?:the|a) "([^"]*)" button, then I should see the "([^"]*)" view$/ do |button_id, view_id|
  touch_transition("button marked:'#{button_id}'",
                   "view marked:'#{view_id}'",
                   {:timeout=>TOUCH_TRANSITION_TIMEOUT,
                    :retry_frequency=>TOUCH_TRANSITION_RETRY_FREQ})
end

Then /^I touch (?:the|a) "([^"]*)" button and wait for (?:the|a) "([^"]*)" view$/ do |button_id, view_id|
  touch_transition("button marked:'#{button_id}'",
                   "view marked:'#{view_id}'",
                   {:timeout=>TOUCH_TRANSITION_TIMEOUT,
                    :retry_frequency=>TOUCH_TRANSITION_RETRY_FREQ})
end

Then /^I should see (?:the|a) "([^"]*)" button has title "([^"]*)"$/ do |button_id, title|
  should_see_button_with_title button_id, title
end

# as of 0.9.136 - I should (not)? see a ... button
#  conflicts with calabash predefined steps
Then /^I should( not)? see (?:the|an) "([^"]*)" button$/ do |visibility, button_id|
  visibility ? should_not_see_button(button_id) : should_see_button(button_id)
end

Then /^I should see (?:the|a) "([^"]*)" button is (disabled|enabled)$/ do |button_id, state|
  res = query("button marked:'#{button_id}'", :isEnabled).first
  str_state = state.eql?('disabled') ? '0' : '1'
  unless res.eql?(str_state)
    screenshot_and_raise "expected to see '#{button_id}' that is '#{state}' but found '#{res}'"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
briar-0.0.7 features/step_definitions/control/button_steps.rb
briar-0.0.6 features/step_definitions/control/button_steps.rb