testcentricity_web 3.0.16 → 3.0.17

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: 59511d3c1058420271406cf0301c0e70d68d5359
4
- data.tar.gz: 0ae473931053acfc7aef79062bc95bb43db644cd
3
+ metadata.gz: 28c21dc1cccc47282ea868cf24537968b8afc5a2
4
+ data.tar.gz: fac64767a0b4ea3f9c929f502ad624637828bcb1
5
5
  SHA512:
6
- metadata.gz: e023a7d3b88b63c1f13c67d2173db58151ffaf6fe6ac9278bf05acd05b28ee9baa13c0abcfebe816d82d9c87a195450b16788fbf7428304a623a08f5b8052682
7
- data.tar.gz: 52ab694da1a11f5bf5b0530c76c5f7c72a73454ea158932fbd12b9c1431b90fcf6c943e2e98fdc3f0357d893986c0d3e2659f6537a1e2ade758074dbf1670b0c
6
+ metadata.gz: 83636b0f706a88718b7e688aac1bd13c16f6d5c615acc8aeaf678737a1a811bff09d0d5540ea6f3000db9f1f8e21deef18484307210d287fe9ef34bcb4cdc5dc
7
+ data.tar.gz: e119b96eaa75bda7da9d592f84bf3242c95bbd98289970fc25ba722061814702c5693e7e1011c783953c7b97067ead8b9f1d0e696e539e1294f439f20a4e7f49
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # CHANGELOG
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [3.0.17] - 2018-09-19
5
+
6
+ ### Added
7
+ * `UIElement.aria_disabled?` and `UIElement.aria_label` methods.
8
+ * Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of `aria-label` and `aria-disabled` properties.
9
+
4
10
  ## [3.0.16] - 2018-09-21
5
11
 
6
12
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- testcentricity_web (3.0.16)
4
+ testcentricity_web (3.0.17)
5
5
  appium_lib
6
6
  browserstack-local
7
7
  capybara (>= 3.1, < 4)
@@ -28,7 +28,7 @@ GEM
28
28
  faye-websocket (~> 0.10.0)
29
29
  selenium-webdriver (~> 3.14)
30
30
  browserstack-local (1.3.0)
31
- capybara (3.8.0)
31
+ capybara (3.8.2)
32
32
  addressable
33
33
  mini_mime (>= 0.1.3)
34
34
  nokogiri (~> 1.8)
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '3.0.16'
2
+ VERSION = '3.0.17'
3
3
  end
@@ -662,6 +662,10 @@ module TestCentricity
662
662
  actual = ui_object.count(visible = :all)
663
663
  when :siebel_options
664
664
  actual = ui_object.get_siebel_options
665
+ when :aria_label
666
+ actual = ui_object.aria_label
667
+ when :aria_disabled
668
+ actual = ui_object.aria_disabled?
665
669
  else
666
670
  if property.is_a?(Hash)
667
671
  property.each do |key, value|
@@ -862,6 +862,10 @@ module TestCentricity
862
862
  actual = ui_object.count(visible = :all)
863
863
  when :siebel_options
864
864
  actual = ui_object.get_siebel_options
865
+ when :aria_label
866
+ actual = ui_object.aria_label
867
+ when :aria_disabled
868
+ actual = ui_object.aria_disabled?
865
869
  else
866
870
  if property.is_a?(Hash)
867
871
  property.each do |key, value|
@@ -204,9 +204,7 @@ module TestCentricity
204
204
  options.args << '--headless' if browser == :firefox_headless
205
205
  Capybara::Selenium::Driver.new(app, browser: :firefox, options: options)
206
206
  when :chrome, :chrome_headless
207
- (browser == :chrome) ?
208
- options = Selenium::WebDriver::Chrome::Options.new :
209
- options = Selenium::WebDriver::Chrome::Options.new(args: %w[headless disable-gpu no-sandbox])
207
+ options = (browser == :chrome) ? Selenium::WebDriver::Chrome::Options.new : Selenium::WebDriver::Chrome::Options.new(args: %w[headless disable-gpu no-sandbox])
210
208
  options.add_argument('--disable-infobars')
211
209
  options.add_argument("--lang=#{ENV['LOCALE']}") if ENV['LOCALE']
212
210
  Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
@@ -273,9 +271,7 @@ module TestCentricity
273
271
  capabilities['project'] = ENV['AUTOMATE_PROJECT'] if ENV['AUTOMATE_PROJECT']
274
272
  capabilities['build'] = ENV['AUTOMATE_BUILD'] if ENV['AUTOMATE_BUILD']
275
273
 
276
- ENV['TEST_CONTEXT'] ?
277
- context_message = "#{Environ.test_environment} - #{ENV['TEST_CONTEXT']}" :
278
- context_message = Environ.test_environment
274
+ context_message = ENV['TEST_CONTEXT'] ? "#{Environ.test_environment} - #{ENV['TEST_CONTEXT']}" : Environ.test_environment
279
275
  if ENV['PARALLEL']
280
276
  thread_num = ENV['TEST_ENV_NUMBER']
281
277
  thread_num = 1 if thread_num.blank?
@@ -289,6 +285,7 @@ module TestCentricity
289
285
 
290
286
  case browser.downcase.to_sym
291
287
  when :ie
288
+ capabilities['ie.fileUploadDialogTimeout'] = 10000
292
289
  capabilities['ie.ensureCleanSession'] = 'true'
293
290
  capabilities['ie.browserCommandLineSwitches'] = 'true'
294
291
  capabilities['nativeEvents'] = 'true'
@@ -418,9 +415,7 @@ module TestCentricity
418
415
  when :firefox, :safari, :ie, :edge
419
416
  capabilities = Selenium::WebDriver::Remote::Capabilities.send(browser)
420
417
  when :chrome, :chrome_headless
421
- (browser == :chrome) ?
422
- options = %w[--disable-infobars] :
423
- options = %w[headless disable-gpu no-sandbox --disable-infobars]
418
+ options = browser == :chrome ? %w[--disable-infobars] : %w[headless disable-gpu no-sandbox --disable-infobars]
424
419
  options.push("--lang=#{ENV['LOCALE']}") if ENV['LOCALE']
425
420
  capabilities = Selenium::WebDriver::Remote::Capabilities.chrome('goog:chromeOptions' => { args: options })
426
421
  else
@@ -507,9 +502,7 @@ module TestCentricity
507
502
  Environ.platform = :desktop
508
503
  end
509
504
 
510
- ENV['TUNNELING'] ?
511
- endpoint = '@localhost:4445/wd/hub' :
512
- endpoint = '@hub.testingbot.com:4444/wd/hub'
505
+ endpoint = ENV['TUNNELING'] ? '@localhost:4445/wd/hub' : '@hub.testingbot.com:4444/wd/hub'
513
506
  endpoint = "http://#{ENV['TB_USERNAME']}:#{ENV['TB_AUTHKEY']}#{endpoint}"
514
507
  Capybara.register_driver :testingbot do |app|
515
508
  capabilities = Selenium::WebDriver::Remote::Capabilities.new
@@ -556,6 +556,27 @@ module TestCentricity
556
556
  )
557
557
  end
558
558
 
559
+ # Return state of UI object's aria-label property
560
+ #
561
+ # @return [String]
562
+ # @example
563
+ # buy_now_button.aria_label
564
+ #
565
+ def aria_label
566
+ get_attribute('aria-label')
567
+ end
568
+
569
+ # Return state of UI object's aria-disabled property
570
+ #
571
+ # @return [Boolean]
572
+ # @example
573
+ # buy_now_button.aria_disabled?
574
+ #
575
+ def aria_disabled?
576
+ state = get_attribute('aria-disabled')
577
+ state.boolean? ? state : state == 'true'
578
+ end
579
+
559
580
  def get_attribute(attrib)
560
581
  obj, type = find_element(false)
561
582
  object_not_found_exception(obj, type)
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: 3.0.16
4
+ version: 3.0.17
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: 2018-09-22 00:00:00.000000000 Z
11
+ date: 2018-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler