Skip to content

Commit a6240cb

Browse files
authored
refactor: Move window size method and touch related actions (#678)
* move window_size method * divide and inherit multioutch actions * fix rubocop
1 parent 36ef57b commit a6240cb

File tree

15 files changed

+704
-606
lines changed

15 files changed

+704
-606
lines changed

.rubocop.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Custom config for RuboCop static code analysis
22
Metrics/LineLength:
3-
Max: 125
3+
Max: 128
44
Metrics/MethodLength:
55
Enabled: false
66
Metrics/ModuleLength:
@@ -21,7 +21,7 @@ Style/RegexpLiteral:
2121
Enabled: false
2222
Style/ConstantName:
2323
Enabled: false
24-
# blocked on https://github.com/appium/ruby_lib/issues/312
24+
# blocked on https://github.com/appium/ruby_lib/issues/312. Already removed from core part
2525
Style/GlobalVars:
2626
Enabled: false
2727
Style/AccessorMethodName:

android_tests/lib/android/specs/common/device_touchaction.rb

+6-7
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,20 @@ def before_first
3333
end
3434

3535
t 'swipe' do
36+
wait { text('Animation').click }
37+
wait { text_exact('Bouncing Balls').click }
3638
wait { Appium::TouchAction.new.swipe(start_x: 0.75, start_y: 0.25, end_x: 0.75, end_y: 50).perform }
37-
wait { !exists { text_exact 'NFC' } }
38-
wait { text_exact 'Bouncing Balls' }
39-
back
39+
2.times { back }
4040
wait { text_exact 'NFC' }
4141
end
4242

4343
t 'pinch & zoom' do
4444
wait { text_exact 'NFC' }
4545
wait { text_exact('Graphics').click }
4646
wait { text('BitmapMesh').click }
47-
wait do
48-
zoom 200
49-
pinch 75
50-
end
47+
wait { zoom 200 }
48+
wait { pinch 75 }
49+
wait { text('Graphics/BitmapMesh') }
5150
2.times { back }
5251
wait { text_exact 'NFC' }
5352
end

android_tests/lib/android/specs/common/patch.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# rubocop:disable Lint/RescueException
2-
# rubocop:disable Metrics/LineLength
32

43
# Skip:
54
# status # status patches are already tested in driver.rb

ios_tests/lib/ios/specs/common/patch.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# rubocop:disable Lint/RescueException
2-
# rubocop:disable Metrics/LineLength
32

43
#
54
# Skip:

0 commit comments

Comments
 (0)