ios_tests/lib/ios/specs/driver.rb in appium_lib-9.1.3 vs ios_tests/lib/ios/specs/driver.rb in appium_lib-9.2.0
- old
+ new
@@ -30,25 +30,23 @@
assert_equal expected, actual
end
describe 'Appium::Driver attributes' do
t 'verify all attributes' do
- 2.times { set_wait 30 } # must set twice to validate last_waits
actual = driver_attributes
caps_app_for_teardown = actual[:caps][:app]
- actual[:caps][:app] = File.basename actual[:caps][:app]
-
+ expected_app = File.absolute_path('UICatalog.app')
expected_caps = ::Appium::Driver::Capabilities.init_caps_for_appium(platformName: 'ios',
platformVersion: '10.1',
automationName: 'XCUITest',
deviceName: 'iPhone Simulator',
- app: 'UICatalog.app')
+ app: expected_app)
expected = { caps: expected_caps,
+ automation_name: 'XCUITest',
custom_url: false,
export_session: false,
default_wait: 30,
- last_waits: [30, 30],
sauce_username: nil,
sauce_access_key: nil,
port: 4723,
device: :ios,
debug: true,
@@ -88,18 +86,16 @@
driver_attributes[:caps][:app] = for_clean_up
end
t 'no_wait' do
no_wait
- default_wait.must_equal 0
- set_wait 30
+ proc { find_element(:accessibility_id, 'zz') }.must_raise Selenium::WebDriver::Error::NoSuchElementError
+ set_wait
end
t 'default_wait attr' do
- set_wait 31 # set wait and no_wait update default_wait
- default_wait.must_equal 31
- set_wait 30
+ default_wait.must_equal 30
end
t 'app_path attr' do
apk_name = File.basename driver_attributes[:caps][:app]
@@ -217,14 +213,14 @@
set_wait.must_equal(30)
set_wait(2).must_equal(2)
set_wait.must_equal(30)
set_wait(3).must_equal(3)
- set_wait.must_equal(2)
+ set_wait.must_equal(30)
set_wait(2).must_equal(2)
set_wait(3).must_equal(3)
- set_wait.must_equal(2)
+ set_wait.must_equal(30)
end
t 'default_wait' do
set_wait 30
default_wait.must_equal 30 # set in run.rb