testcentricity_web 0.9.6.3 → 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c05b93252a2bdfff64aadae23996e840a69c8eee
4
- data.tar.gz: d153aad91131cac0ea2ec4df70c9ee8292cc7538
3
+ metadata.gz: dcb7185a4babab7ae5d471ae10e0544f31ab000a
4
+ data.tar.gz: 3c453c061dab134ad5a36872b2b94c3814286db2
5
5
  SHA512:
6
- metadata.gz: a1327cfdb2aa9ec0d4f847750d1a52a948749af52711c5dcbd8a4c8b22bfa7e2ae7cdf755423fb2055c59dab2c12062cfc1022cf338d99e817c2e61fe0ef503b
7
- data.tar.gz: 12aa314b269b949f1c528c2f67b730572cb70ae497e172963ce9891dd28cb9afcd0c5c53d02a87daf0483a474119e2d9bfa3262eb7f19895e14ce6bc61dfd032
6
+ metadata.gz: 931e586bbfc70cd878a7fb194d8c1fdea0acccd57ee983ee250f9f2f36340630e28802a7c1760e7f915758a6db6d5f45a06feb1745c73190e3891a18f924929c
7
+ data.tar.gz: db9449f9e74e9794ce790c8ac1ab502acd50a8be721602fed93e672f7e14f0dce50ef81ca0cb377a47cacab955147386606f133d91418069ed7c3db9e166473e
@@ -298,7 +298,24 @@ module TestCentricity
298
298
  actual = ui_object.get_table_cell(cell[0].to_i, cell[1].to_i)
299
299
  end
300
300
  end
301
- ExceptionQueue.enqueue_assert_equal(state, actual, "Expected #{ui_object.get_locator} #{property.to_s} property")
301
+
302
+ if state.is_a?(Hash) && state.length == 1
303
+ error_msg = "Expected #{ui_object.get_locator} #{property.to_s} property to be"
304
+ state.each do |key, value|
305
+ case key
306
+ when :lt, :less_than
307
+ ExceptionQueue.enqueue_exception("#{error_msg} less than #{value} but found #{actual}") unless actual < value
308
+ when :lt_eq, :less_than_or_equal
309
+ ExceptionQueue.enqueue_exception("#{error_msg} less than or equal to #{value} but found #{actual}") unless actual <= value
310
+ when :gt, :greater_than
311
+ ExceptionQueue.enqueue_exception("#{error_msg} greater than #{value} but found #{actual}") unless actual > value
312
+ when :gt_eq, :greater_than_or_equal
313
+ ExceptionQueue.enqueue_exception("#{error_msg} greater than or equal to #{value} but found #{actual}") unless actual >= value
314
+ end
315
+ end
316
+ else
317
+ ExceptionQueue.enqueue_assert_equal(state, actual, "Expected #{ui_object.get_locator} #{property.to_s} property")
318
+ end
302
319
  end
303
320
  end
304
321
  ExceptionQueue.post_exceptions
@@ -303,7 +303,24 @@ module TestCentricity
303
303
  actual = ui_object.get_table_cell(cell[0].to_i, cell[1].to_i)
304
304
  end
305
305
  end
306
- ExceptionQueue.enqueue_assert_equal(state, actual, "Expected #{ui_object.get_locator} #{property.to_s} property")
306
+
307
+ if state.is_a?(Hash) && state.length == 1
308
+ error_msg = "Expected #{ui_object.get_locator} #{property.to_s} property to be"
309
+ state.each do |key, value|
310
+ case key
311
+ when :lt, :less_than
312
+ ExceptionQueue.enqueue_exception("#{error_msg} less than #{value} but found #{actual}") unless actual < value
313
+ when :lt_eq, :less_than_or_equal
314
+ ExceptionQueue.enqueue_exception("#{error_msg} less than or equal to #{value} but found #{actual}") unless actual <= value
315
+ when :gt, :greater_than
316
+ ExceptionQueue.enqueue_exception("#{error_msg} greater than #{value} but found #{actual}") unless actual > value
317
+ when :gt_eq, :greater_than_or_equal
318
+ ExceptionQueue.enqueue_exception("#{error_msg} greater than or equal to #{value} but found #{actual}") unless actual >= value
319
+ end
320
+ end
321
+ else
322
+ ExceptionQueue.enqueue_assert_equal(state, actual, "Expected #{ui_object.get_locator} #{property.to_s} property")
323
+ end
307
324
  end
308
325
  end
309
326
  ExceptionQueue.post_exceptions
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '0.9.6.3'
2
+ VERSION = '0.9.7'
3
3
  end
@@ -16,21 +16,20 @@ module TestCentricity
16
16
  Environ.set_device_type('browser')
17
17
 
18
18
  case browser.downcase.to_sym
19
-
20
- when :appium
21
- initialize_appium
22
- when :browserstack
23
- initialize_browserstack
24
- when :crossbrowser
25
- initialize_crossbrowser
26
- when :poltergeist
27
- initialize_poltergeist
28
- when :saucelabs
29
- initialize_saucelabs
30
- when :testingbot
31
- initialize_testingbot
32
- else
33
- initialize_local_browser(browser)
19
+ when :appium
20
+ initialize_appium
21
+ when :browserstack
22
+ initialize_browserstack
23
+ when :crossbrowser
24
+ initialize_crossbrowser
25
+ when :poltergeist
26
+ initialize_poltergeist
27
+ when :saucelabs
28
+ initialize_saucelabs
29
+ when :testingbot
30
+ initialize_testingbot
31
+ else
32
+ initialize_local_browser(browser)
34
33
  end
35
34
 
36
35
  # set browser window size only if testing with a desktop web browser
@@ -57,6 +56,7 @@ module TestCentricity
57
56
  browserName: ENV['APP_BROWSER'],
58
57
  deviceName: ENV['APP_DEVICE']
59
58
  }
59
+ desired_capabilities['avd'] = ENV['APP_DEVICE'] if ENV['APP_PLATFORM_NAME'].downcase.to_sym == :android
60
60
  desired_capabilities['deviceOrientation'] = ENV['ORIENTATION'] if ENV['ORIENTATION']
61
61
  desired_capabilities['udid'] = ENV['APP_UDID'] if ENV['APP_UDID']
62
62
  desired_capabilities['safariInitialUrl'] = ENV['APP_INITIAL_URL'] if ENV['APP_INITIAL_URL']
@@ -68,7 +68,6 @@ module TestCentricity
68
68
  Capybara.register_driver :appium do |app|
69
69
  appium_lib_options = { server_url: endpoint }
70
70
  all_options = {
71
- browser: :safari,
72
71
  appium_lib: appium_lib_options,
73
72
  caps: desired_capabilities
74
73
  }
@@ -88,14 +87,14 @@ module TestCentricity
88
87
  Environ.set_device_type(Browsers.mobile_device_name(browser))
89
88
  ENV['HOST_BROWSER'] ? host_browser = ENV['HOST_BROWSER'].downcase.to_sym : host_browser = :firefox
90
89
  case host_browser
91
- when :firefox
92
- profile = Selenium::WebDriver::Firefox::Profile.new
93
- profile['general.useragent.override'] = user_agent
94
- Capybara::Selenium::Driver.new(app, :profile => profile)
95
- when :chrome
96
- args = []
97
- args << "--user-agent='#{user_agent}'"
98
- Capybara::Selenium::Driver.new(app, :browser => :chrome, :args => args)
90
+ when :firefox
91
+ profile = Selenium::WebDriver::Firefox::Profile.new
92
+ profile['general.useragent.override'] = user_agent
93
+ Capybara::Selenium::Driver.new(app, :profile => profile)
94
+ when :chrome
95
+ args = []
96
+ args << "--user-agent='#{user_agent}'"
97
+ Capybara::Selenium::Driver.new(app, :browser => :chrome, :args => args)
99
98
  end
100
99
  end
101
100
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6.3
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-14 00:00:00.000000000 Z
11
+ date: 2016-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler