lib/calabash-cucumber/keyboard_helpers.rb in calabash-cucumber-0.18.2 vs lib/calabash-cucumber/keyboard_helpers.rb in calabash-cucumber-0.19.0.pre1

- old
+ new

@@ -1,15 +1,12 @@ require 'calabash-cucumber/core' require 'calabash-cucumber/tests_helpers' -require 'calabash-cucumber/playback_helpers' require 'calabash-cucumber/environment_helpers' -require 'calabash-cucumber/utils/logging' module Calabash module Cucumber - # Raised when there is a problem involving a keyboard mode. There are # three keyboard modes: docked, split, and undocked. # # All iPads support these keyboard modes, but the user can disable them # in Settings.app. @@ -50,11 +47,10 @@ # stable. We are fighting against known bugs in Apple's UIAutomation. You # should only need to fall back to the examples below in unusual situations. module KeyboardHelpers include Calabash::Cucumber::TestsHelpers - include Calabash::Cucumber::Logging # @!visibility private KEYPLANE_NAMES = { :small_letters => 'small-letters', :capital_letters => 'capital-letters', @@ -166,17 +162,10 @@ wait_for(opts) do keyboard_visible? end end - # @deprecated 0.9.163 replaced with `wait_for_keyboard` - # @see #wait_for_keyboard - def await_keyboard - _deprecated('0.9.163', "use 'wait_for_keyboard' instead", :warn) - wait_for_keyboard - end - # @!visibility private # returns an array of possible ipad keyboard modes def _ipad_keyboard_modes [:docked, :undocked, :split] end @@ -289,16 +278,10 @@ # @option opts [Boolean] :should_screenshot (true) whether or not to # screenshot on errors # @option opts [Float] :wait_after_char ('POST_ENTER_KEYBOARD' or 0.05) # how long to wait after a character is typed. def keyboard_enter_char(chr, opts={}) - unless opts.is_a?(Hash) - msg = "you should no longer pass a boolean as the second arg; pass {:should_screenshot => '#{opts}'} hash instead" - _deprecated('0.9.163', msg, :warn) - opts = {:should_screenshot => opts} - end - default_opts = {:should_screenshot => true, # introduce a small wait to avoid skipping characters # keep this as short as possible :wait_after_char => (ENV['POST_ENTER_KEYBOARD'] || 0.05).to_f} @@ -446,36 +429,9 @@ # do not have an action key. # # @raise [RuntimeError] if the text cannot be typed. def tap_keyboard_action_key keyboard_enter_char 'Return' - end - - # @deprecated 0.10.0 replaced with `tap_keyboard_action_key` - # @see #tap_keyboard_action_key - # - # Touches the keyboard action key. - # - # The action key depends on the keyboard. Some examples include: - # - # * Return - # * Next - # * Go - # * Join - # * Search - # - # @note - # Not all keyboards have an action key. For example, numeric keyboards - # do not have an action key. - # - # @raise [RuntimeError] if the text cannot be typed. - def done - _deprecated("0.10.0", -%Q{Use tap_keyboard_action_key - -The `done` method will be removed in 0.19.0 -}, :warn) - tap_keyboard_action_key end # @!visibility private # Returns the current keyplane. def _current_keyplane