lib/calabash-cucumber/rotation_helpers.rb in calabash-cucumber-0.12.0.pre5 vs lib/calabash-cucumber/rotation_helpers.rb in calabash-cucumber-0.12.0.pre9
- old
+ new
@@ -49,12 +49,10 @@
#
# @return [Symbol] The orientation of the button when all rotations have
# been completed. If there is problem rotating, this method will return
# `:down` regardless of the actual home button position.
#
- # @todo When running under UIAutomation, we should use that API to rotate
- # instead of relying on playbacks.
def rotate_home_button_to(dir)
dir_sym = dir.to_sym
if dir_sym.eql?(:top)
if full_console_logging?
calabash_warn "converting '#{dir}' to ':up' - please adjust your code"
@@ -127,13 +125,10 @@
# @note For legacy support the `dir` argument can be a String or Symbol.
# Please update your code to pass a Symbol.
#
# @param [Symbol] dir The position of the home button after the rotation.
# Can be one of `{:down | :left | :right | :up }`.
- #
- # @todo When running under UIAutomation, we should use that API to rotate
- # instead of relying on playbacks.
def rotate(dir)
dir = dir.to_sym
current_orientation = status_bar_orientation().to_sym
rotate_cmd = nil
case dir
@@ -169,10 +164,10 @@
result
end
end
def recalibrate_after_rotation
- uia_tap_offset(x:0,y:0)
+ uia_query :window
end
end
end
\ No newline at end of file