Skip to content

Commit 1ef94e6

Browse files
committed
tweak more
1 parent 9290d72 commit 1ef94e6

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

test/functional/ios/driver_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def test_default_keyboard_pref
118118
@@driver.find_element(:accessibility_id, 'Keyboard').click
119119

120120
# to wait the animation
121-
auto_correction_name = over_ios26?(@@driver) ? 'KeyboardAutocorrection' : 'Auto-Correction'
121+
auto_correction_name = over_ios26? @@driver ? 'KeyboardAutocorrection' : 'Auto-Correction'
122122
@@driver.wait { |d| d.find_element :accessibility_id, auto_correction_name }
123123

124124
auto_correction = @@driver.wait do |d|
@@ -127,9 +127,9 @@ def test_default_keyboard_pref
127127

128128
# need to bding the element into the screen
129129
w3c_scroll @@driver, duration: 1.0
130-
search_word = if over_ios26?(@@driver)
130+
search_word = if over_ios26? @@driver
131131
'KeyboardPrediction'
132-
elsif over_ios17?(@@driver)
132+
elsif over_ios17? @@driver
133133
'Predictive Text'
134134
else
135135
'Predictive'

test/functional/ios/ios/mobile_commands_test.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def test_permission
8484
core = ::Appium::Core.for(caps)
8585
@driver = core.start_driver
8686

87+
skip 'Not stable on CI' if ci?
8788
# skip 'Permissions does not work well on iOS 14 yet' if over_ios14?(@driver)
8889
assert @driver.execute_script('mobile: getPermission',
8990
{ service: 'calendar', bundleId: 'com.example.apple-samplecode.UICatalog' }) == 'yes'
@@ -94,12 +95,14 @@ def test_permission
9495
@driver.activate_app('com.apple.Preferences')
9596
@driver.settings.update({ defaultActiveApplication: 'com.apple.Preferences' })
9697
w3c_scroll @driver, duration: 1.0
97-
@driver.find_element(:accessibility_id, 'com.apple.settings.privacyAndSecurity').click
98+
99+
privacy_name = over_ios26? @driver ? 'com.apple.settings.privacyAndSecurity' : 'Privacy'
100+
@driver.find_element(:accessibility_id, privacy_name).click
98101

99102
@driver.find_element(:accessibility_id, 'Calendars').click
100103
if over_ios26? @driver
101104
# without exceptions
102-
d.find_element :predicate, "label == 'UIKitCatalog, Full Access'"
105+
@driver.find_element :predicate, "label == 'UIKitCatalog, Full Access'"
103106
else
104107
el = @driver.find_element(:accessibility_id, uicatalog)
105108
assert_equal '1', el.value

0 commit comments

Comments
 (0)