lib/appium_lib/ios/xcuitest/command/gestures.rb in appium_lib-9.15.1 vs lib/appium_lib/ios/xcuitest/command/gestures.rb in appium_lib-9.15.2

- old
+ new

@@ -34,11 +34,11 @@ element: nil, to_visible: nil, predicate_string: nil) return 'Set "up", "down", "left" or "right" for :direction' unless %w(up down left right).include?(direction) - args = { direction: direction } + args = { direction: direction } args[:element] = element.ref if element args[:distance] = distance if distance args[:name] = name if name args[:toVisible] = to_visible if to_visible args[:predicateString] = predicate_string if predicate_string @@ -66,11 +66,11 @@ # # ```ruby # double_tap x: 100, y: 100 # double_tap element: find_element(:accessibility_id, "some item") # ``` - def double_tap(x: nil, y: nil, element: nil) + def double_tap(x: nil, y: nil, element: nil) # rubocop:disable Naming/UncommunicativeMethodParamName return 'Set x, y or element' if (x.nil? || y.nil?) && element.nil? args = element.nil? ? { x: x, y: y } : { element: element.ref } @driver.execute_script 'mobile: doubleTap', args end @@ -83,11 +83,11 @@ # ```ruby # touch_and_hold x: 100, y: 100 # touch_and_hold x: 100, y: 100, duration: 2.0 # touch_and_hold element: find_element(:accessibility_id, "some item") # ``` - def touch_and_hold(x: nil, y: nil, element: nil, duration: 1.0) + def touch_and_hold(x: nil, y: nil, element: nil, duration: 1.0) # rubocop:disable Naming/UncommunicativeMethodParamName return 'Set x, y or element' if (x.nil? || y.nil?) && element.nil? args = element.nil? ? { x: x, y: y } : { element: element.ref } args[:duration] = duration @driver.execute_script 'mobile: touchAndHold', args @@ -111,10 +111,10 @@ # # ```ruby # tap x: 100, y: 100 # tap x: 100, y: 100, element: find_element(:accessibility_id, "some item") # ``` - def tap(x:, y:, element: nil) + def tap(x:, y:, element: nil) # rubocop:disable Naming/UncommunicativeMethodParamName args = { x: x, y: y } args[:element] = element.ref if element @driver.execute_script 'mobile: tap', args end