added scroll distance support for iOS's scroll script execution.#805
added scroll distance support for iOS's scroll script execution.#805saim80 wants to merge 4 commits intoappium:masterfrom
Conversation
KazuCocoa
left a comment
There was a problem hiding this comment.
Thanks!
I commended rubocop issues.
Could you sign the CLA?
| # scroll direction: "down" | ||
| # ``` | ||
| def scroll(direction:, name: nil, element: nil, to_visible: nil, predicate_string: nil) | ||
| def scroll(direction:, distance: nil, name: nil, element: nil, to_visible: nil, predicate_string: nil) |
There was a problem hiding this comment.
Can you add # rubocop:disable Metrics/ParameterLists at the end of this line to avoid rubocop?
| end | ||
|
|
||
| # @param [string] direction Either 'up', 'down', 'left' or 'right'. | ||
| # @option opts [Double] :distance scroll distance, proportional to scroll view height. |
There was a problem hiding this comment.
Remove a white space here to fix rubocop
| # scroll direction: "down" | ||
| # ``` | ||
| def scroll(direction:, name: nil, element: nil, to_visible: nil, predicate_string: nil) | ||
| def scroll(direction:, distance: nil, name: nil, element: nil, to_visible: nil, predicate_string: nil) # rubocop:disable Metrics/ParameterLists |
There was a problem hiding this comment.
Rubocop pointed out another issue... Could you fix it like https://github.com/appium/ruby_lib_core/blob/21620568f14ed4537b43c29e2b28026795e30617/lib/appium_lib_core/common/device/image_comparison.rb#L105-L111 ?
You can run rubocop with rake rubocop on your local, btw.
thanks for the contribution
There was a problem hiding this comment.
I modified the line as suggested. I ran the rake rubocop I see other warnings as well when I ran the command, should I be worried?
There was a problem hiding this comment.
ah, yeah. Rubocop raises warnings depends on its versions.
you can run it with bundle exec rake rubocop to specify the version.
| # scroll direction: "down" | ||
| # ``` | ||
| def scroll(direction:, name: nil, element: nil, to_visible: nil, predicate_string: nil) | ||
| def scroll(direction:, |
There was a problem hiding this comment.
The below should make rubocop 💚
def scroll(direction:, # rubocop:disable Metrics/ParameterLists
distance: nil,
name: nil,
element: nil,
to_visible: nil,
predicate_string: nil)* fix rubocop warning for #805 * update changelog * add a link to the user
|
@saim80 Thanks again! |
No description provided.