testcentricity_web 4.1.9 → 4.1.10

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
  SHA256:
3
- metadata.gz: c35f1c09951d1a58be2d3bac921d2d221311edf3b4464c5d4806c7a30a57c0f2
4
- data.tar.gz: bbe72af137b6808721f7a87b26032c42d78bbf4708ff88ed34c753ebcec85c46
3
+ metadata.gz: 23887c7085c3a17d09449043491877a3cce346498b778d3e44c3e9aeacad0bdf
4
+ data.tar.gz: 6425f62243f5795ac091814a1a68e6b08d44d219862bc6c26fc5244afb16a456
5
5
  SHA512:
6
- metadata.gz: 0607f397cd9d6564623218d3e88f541a04f17c9b4b8cc96eb50571bc787cfa46927651dc38cfc7765129dd33303fbd3c130720dc809940cf401a336756c3d7c1
7
- data.tar.gz: 11cc150624658854f69575361345dca970a3cf567e1b29e6797450dc22df88f53b069374a63ab8e12f83e7638a28386b0edd0d96e6707720f41e1e6fa621c1f5
6
+ metadata.gz: db06316bf646dac6ea37407286059429141d25433c39863cde90b915d7714cb281e28fe116fc997faefff1c98711835ad88f9be0fbea35a66b5e756b14da8236
7
+ data.tar.gz: d11596401fb3288e73a1cab6b3bbf6f5443f4e1cc6c94ed2be43c38096e48335126c70aa3851530df190f7ac6b1b1c576bd2a71fd51a123e5ccaf51c6e7b1772
data/.gitignore CHANGED
@@ -3,7 +3,7 @@
3
3
  Thumbs.db
4
4
 
5
5
  #IDE project files
6
- .idea
6
+ /.idea
7
7
  .settings
8
8
  .project
9
9
 
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [4.1.10] - 19-APR-2022
6
+
7
+ ### Fixed
8
+ * `PageObject.set_verify_focus` and `PageSection.set_verify_focus` methods now correctly return the `id` of the UI element
9
+ that unexpectedly has focus during an exception.
10
+ * Rolled back `require_all` gem version to 1.5.0 in gemspec development dependencies due to `RequireAll::LoadError` when
11
+ running gem test specs and features.
12
+
13
+
5
14
  ## [4.1.9] - 18-APR-2022
6
15
 
7
16
  ### Fixed
data/README.md CHANGED
@@ -27,6 +27,8 @@ The TestCentricity™ Web gem supports running automated tests against the follo
27
27
 
28
28
  A complete history of bug fixes and new features can be found in the {file:CHANGELOG.md CHANGELOG} file.
29
29
 
30
+ The RubyDocs for this gem can be found [here](https://www.rubydoc.info/gems/testcentricity_web).
31
+
30
32
  An example project that demonstrates the implementation of a page object model framework using Cucumber and TestCentricity™
31
33
  can be found [here](https://github.com/TestCentricity/tc_web_sample).
32
34
 
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'appium_capybara'
1
4
  require 'capybara/cucumber'
2
5
  require 'parallel_tests'
3
- require 'appium_capybara'
4
6
  require 'require_all'
5
7
  require 'simplecov'
6
8
  require 'testcentricity_web'
@@ -10,6 +10,10 @@ class BasicCSSFormPage < BasicFormPage
10
10
  max_length_field: 'input#maxlength',
11
11
  read_only_field: 'input#readonly',
12
12
  number_field: 'input#number-field',
13
+ date_field: 'input#date-picker',
14
+ date_time_field: 'input#date-time-picker',
15
+ email_field: 'input#email-field',
16
+ month_field: 'input#month-field',
13
17
  color_picker: 'input#color-picker',
14
18
  comments_field: 'textarea#comments'
15
19
  ranges slider: 'input#slider'
@@ -15,6 +15,53 @@ class BasicFormPage < BaseTestPage
15
15
  max_length_field,
16
16
  read_only_field,
17
17
  number_field,
18
+ date_field,
19
+ date_time_field,
20
+ email_field,
21
+ month_field,
22
+ color_picker,
23
+ slider,
24
+ comments_field,
25
+ upload_file,
26
+ check_1,
27
+ check_2,
28
+ check_3,
29
+ radio_1,
30
+ [
31
+ radio_2,
32
+ radio_3
33
+ ],
34
+ multi_select,
35
+ drop_down_select,
36
+ link_1,
37
+ link_2,
38
+ cancel_button,
39
+ submit_button
40
+ ]
41
+ }
42
+ trait(:chrome_tab_order) {
43
+ [
44
+ header_nav.form_link,
45
+ header_nav.media_link,
46
+ header_nav.indexed_sections_link,
47
+ header_nav.custom_controls_link,
48
+ username_field,
49
+ password_field,
50
+ max_length_field,
51
+ read_only_field,
52
+ number_field,
53
+ date_field,
54
+ date_field,
55
+ date_field,
56
+ date_time_field,
57
+ date_time_field,
58
+ date_time_field,
59
+ date_time_field,
60
+ date_time_field,
61
+ date_time_field,
62
+ email_field,
63
+ month_field,
64
+ month_field,
18
65
  color_picker,
19
66
  slider,
20
67
  comments_field,
@@ -42,6 +89,17 @@ class BasicFormPage < BaseTestPage
42
89
  max_length_field,
43
90
  read_only_field,
44
91
  number_field,
92
+ date_field,
93
+ date_field,
94
+ date_field,
95
+ date_time_field,
96
+ date_time_field,
97
+ date_time_field,
98
+ date_time_field,
99
+ date_time_field,
100
+ date_time_field,
101
+ email_field,
102
+ month_field,
45
103
  color_picker,
46
104
  slider,
47
105
  comments_field,
@@ -67,6 +125,17 @@ class BasicFormPage < BaseTestPage
67
125
  max_length_field,
68
126
  read_only_field,
69
127
  number_field,
128
+ date_field,
129
+ date_field,
130
+ date_field,
131
+ date_time_field,
132
+ date_time_field,
133
+ date_time_field,
134
+ date_time_field,
135
+ date_time_field,
136
+ date_time_field,
137
+ email_field,
138
+ month_field,
70
139
  comments_field,
71
140
  multi_select,
72
141
  drop_down_select
@@ -393,6 +462,8 @@ class BasicFormPage < BaseTestPage
393
462
 
394
463
  def verify_tab_order
395
464
  order = case Environ.browser
465
+ when :chrome, :chrome_headless
466
+ chrome_tab_order
396
467
  when :safari
397
468
  safari_tab_order
398
469
  when :firefox
@@ -10,6 +10,10 @@ class BasicXpathFormPage < BasicFormPage
10
10
  max_length_field: "//input[@id='maxlength']",
11
11
  read_only_field: "//input[@id='readonly']",
12
12
  number_field: "//input[@id='number-field']",
13
+ date_field: "//input[@id='date-picker']",
14
+ date_time_field: "//input[@id='date-time-picker']",
15
+ email_field: "//input[@id='email-field']",
16
+ month_field: "//input[@id='month-field']",
13
17
  comments_field: "//textarea[@id='comments']",
14
18
  color_picker: "//input[@id='color-picker']"
15
19
  ranges slider: "//input[@id='slider']"
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '4.1.9'
2
+ VERSION = '4.1.10'
3
3
  end
@@ -353,7 +353,7 @@ module TestCentricity
353
353
  sleep(0.5)
354
354
  focused_obj = page.driver.browser.switch_to.active_element
355
355
  expected_obj, = expected_element.find_element(visible = :all)
356
- raise "Expected element '#{expected_element.get_name}' to have focus but found '#{focused_obj.id} is focused instead'" unless focused_obj == expected_obj.native
356
+ raise "Expected element '#{expected_element.get_name}' to have focus but found '#{focused_obj[:id]} is focused instead'" unless focused_obj == expected_obj.native
357
357
 
358
358
  puts "Element '#{expected_element.get_name}' is focused as expected"
359
359
  end end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,8 @@
1
- require 'require_all'
1
+ # frozen_string_literal: true
2
+
2
3
  require 'capybara/rspec'
3
4
  require 'httparty'
5
+ require 'require_all'
4
6
  require 'simplecov'
5
7
  require 'testcentricity_web'
6
8
 
@@ -85,16 +85,32 @@
85
85
  <input id="number-field" type="number" name="number" min="10" max="1024" step="1" value="41">
86
86
  </td>
87
87
  <td>
88
- <label for="color-picker">Color: </label>
89
- <input id="color-picker" type="color" name="color">
88
+ <label for="date-picker">Date: </label>
89
+ <input id="date-picker" type="date" name="date" value="2022-05-23">
90
90
  </td>
91
91
  </tr>
92
92
  <tr>
93
93
  <td>
94
- <label for="slider">Range: </label>
95
- <input id="slider" type="range" name="slider" min="0" max="50">
94
+ <label for="date-time-picker">Local date time:</label>
95
+ <input id="date-time-picker" type="datetime-local" name="datetime" value="2018-01-01T01:01">
96
96
  </td>
97
97
  <td>
98
+ <label for="email-field">Email: </label>
99
+ <input id="email-field" type="email" name="email" value="bob@mailinator.com">
100
+ </td>
101
+ <td>
102
+ <label for="month-field">Month: </label>
103
+ <input id="month-field" type="month" name="month" value="2022-09">
104
+ </td>
105
+ </tr>
106
+ <tr>
107
+ <td>
108
+ <label for="color-picker">Color: </label>
109
+ <input id="color-picker" type="color" name="color">
110
+ </td>
111
+ <td>
112
+ <label for="slider">Range: </label>
113
+ <input id="slider" type="range" name="slider" min="0" max="50">
98
114
  </td>
99
115
  <td>
100
116
  </td>
@@ -104,7 +120,6 @@
104
120
  </td>
105
121
  </tr>
106
122
 
107
-
108
123
  <tr>
109
124
  <td>
110
125
  <label for="comments">TextArea:</label>
@@ -240,42 +255,6 @@
240
255
  </td>
241
256
  </tr>
242
257
 
243
-
244
-
245
- <!-- <tr>-->
246
- <!-- <td>-->
247
- <!-- <div class="form-label">-->
248
- <!-- <label for="date-picker">Date: </label>-->
249
- <!-- <input id="date-picker" type="date" name="date">-->
250
- <!-- </div>-->
251
- <!-- </td>-->
252
- <!-- </tr>-->
253
- <!-- <tr>-->
254
- <!-- <td>-->
255
- <!-- <div class="form-label">-->
256
- <!-- <label for="date-time-picker">Local date time:</label>-->
257
- <!-- <input id="date-time-picker" type="datetime-local" name="datetime" value="2018-01-01T01:01">-->
258
- <!-- </div>-->
259
- <!-- </td>-->
260
- <!-- </tr>-->
261
- <!-- <tr>-->
262
- <!-- <td>-->
263
- <!-- <div class="form-label">-->
264
- <!-- <label for="email-field">Email: </label>-->
265
- <!-- <input id="email-field" type="email" name="email" value="bob@mailinator.com">-->
266
- <!-- </div>-->
267
- <!-- </td>-->
268
- <!-- </tr>-->
269
- <!-- <tr>-->
270
- <!-- <td>-->
271
- <!-- <div class="form-label">-->
272
- <!-- <label for="month-field">Month: </label>-->
273
- <!-- <input id="month-field" type="month" name="month">-->
274
- <!-- </div>-->
275
- <!-- </td>-->
276
- <!-- </tr>-->
277
-
278
-
279
258
  <tr>
280
259
  <td>
281
260
  <input type="reset" id="cancel" name="cancel" value="Cancel" class="styled-click-button">
File without changes
File without changes
File without changes
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8">
5
5
  <title>Custom Controls Page</title>
6
6
  <link rel="stylesheet" href="docsupport/prism.css">
7
- <link rel="stylesheet" href="chosen.css">
7
+ <link rel="stylesheet" href="chosen/chosen.css">
8
8
 
9
9
  <style>
10
10
  table {
@@ -621,7 +621,7 @@
621
621
  </div>
622
622
 
623
623
  <script src="docsupport/jquery-3.2.1.min.js" type="text/javascript"></script>
624
- <script src="chosen.jquery.js" type="text/javascript"></script>
624
+ <script src="chosen/chosen.jquery.js" type="text/javascript"></script>
625
625
  <script src="docsupport/prism.js" type="text/javascript" charset="utf-8"></script>
626
626
  <script src="docsupport/init.js" type="text/javascript" charset="utf-8"></script>
627
627
 
@@ -1,5 +1,7 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
4
+
3
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
6
  require 'testcentricity_web/version'
5
7
 
@@ -19,7 +21,7 @@ Gem::Specification.new do |spec|
19
21
  browsers on iOS device simulators or physical iOS devices, mobile Chrome or Android browsers on Android Studio virtual
20
22
  device emulators, or cloud hosted desktop or mobile web browsers (using BrowserStack, Sauce Labs, TestingBot, or
21
23
  LambdaTest services).'
22
- spec.homepage = 'https://www.rubydoc.info/gems/testcentricity_web/'
24
+ spec.homepage = 'https://github.com/TestCentricity/testcentricity_web'
23
25
  spec.license = 'BSD-3-Clause'
24
26
 
25
27
  spec.files = `git ls-files -z`.split("\x0")
@@ -28,15 +30,15 @@ Gem::Specification.new do |spec|
28
30
  spec.require_paths = ['lib']
29
31
  spec.requirements << 'Capybara, Selenium-WebDriver'
30
32
 
33
+ spec.add_development_dependency 'appium_capybara'
31
34
  spec.add_development_dependency 'bundler'
32
- spec.add_development_dependency 'rake'
33
35
  spec.add_development_dependency 'cucumber'
34
36
  spec.add_development_dependency 'cuke_modeler', '~> 3.0'
35
37
  spec.add_development_dependency 'docker-compose'
36
- spec.add_development_dependency 'appium_capybara'
37
- spec.add_development_dependency 'parallel_tests'
38
38
  spec.add_development_dependency 'httparty'
39
- spec.add_development_dependency 'require_all'
39
+ spec.add_development_dependency 'parallel_tests'
40
+ spec.add_development_dependency 'rake'
41
+ spec.add_development_dependency 'require_all', '=1.5.0'
40
42
  spec.add_development_dependency 'rspec', '~> 3.10'
41
43
  spec.add_development_dependency 'simplecov', ['~> 0.18']
42
44
  spec.add_development_dependency 'yard', ['>= 0.9.0']
@@ -52,6 +54,6 @@ Gem::Specification.new do |spec|
52
54
  spec.add_runtime_dependency 'selenium-webdriver', '>= 4.0', '< 5'
53
55
  spec.add_runtime_dependency 'spreadsheet', '1.1.7'
54
56
  spec.add_runtime_dependency 'test-unit'
55
- spec.add_runtime_dependency 'webdrivers', '~> 5.0'
56
57
  spec.add_runtime_dependency 'virtus'
58
+ spec.add_runtime_dependency 'webdrivers', '~> 5.0'
57
59
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.9
4
+ version: 4.1.10
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: 2022-04-18 00:00:00.000000000 Z
11
+ date: 2022-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: appium_capybara
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: appium_capybara
84
+ name: httparty
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: httparty
112
+ name: rake
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -126,16 +126,16 @@ dependencies:
126
126
  name: require_all
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: 1.5.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - '='
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: 1.5.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -345,33 +345,33 @@ dependencies:
345
345
  - !ruby/object:Gem::Version
346
346
  version: '0'
347
347
  - !ruby/object:Gem::Dependency
348
- name: webdrivers
348
+ name: virtus
349
349
  requirement: !ruby/object:Gem::Requirement
350
350
  requirements:
351
- - - "~>"
351
+ - - ">="
352
352
  - !ruby/object:Gem::Version
353
- version: '5.0'
353
+ version: '0'
354
354
  type: :runtime
355
355
  prerelease: false
356
356
  version_requirements: !ruby/object:Gem::Requirement
357
357
  requirements:
358
- - - "~>"
358
+ - - ">="
359
359
  - !ruby/object:Gem::Version
360
- version: '5.0'
360
+ version: '0'
361
361
  - !ruby/object:Gem::Dependency
362
- name: virtus
362
+ name: webdrivers
363
363
  requirement: !ruby/object:Gem::Requirement
364
364
  requirements:
365
- - - ">="
365
+ - - "~>"
366
366
  - !ruby/object:Gem::Version
367
- version: '0'
367
+ version: '5.0'
368
368
  type: :runtime
369
369
  prerelease: false
370
370
  version_requirements: !ruby/object:Gem::Requirement
371
371
  requirements:
372
- - - ">="
372
+ - - "~>"
373
373
  - !ruby/object:Gem::Version
374
- version: '0'
374
+ version: '5.0'
375
375
  description: |2-
376
376
 
377
377
  The TestCentricity™ Web core framework for desktop and mobile web browser-based app testing implements a Page Object
@@ -490,15 +490,15 @@ files:
490
490
  - spec/testcentricity_web/webdriver_connect/local_webdriver_spec.rb
491
491
  - spec/testcentricity_web/webdriver_connect/mobile_webdriver_spec.rb
492
492
  - test_site/basic_test_page.html
493
- - test_site/chosen-sprite.png
494
- - test_site/chosen-sprite@2x.png
495
- - test_site/chosen.css
496
- - test_site/chosen.jquery.js
497
- - test_site/chosen.jquery.min.js
498
- - test_site/chosen.min.css
499
- - test_site/chosen.proto.js
500
- - test_site/chosen.proto.min.js
501
- - test_site/composer.json
493
+ - test_site/chosen/chosen-sprite.png
494
+ - test_site/chosen/chosen-sprite@2x.png
495
+ - test_site/chosen/chosen.css
496
+ - test_site/chosen/chosen.jquery.js
497
+ - test_site/chosen/chosen.jquery.min.js
498
+ - test_site/chosen/chosen.min.css
499
+ - test_site/chosen/chosen.proto.js
500
+ - test_site/chosen/chosen.proto.min.js
501
+ - test_site/chosen/composer.json
502
502
  - test_site/custom_controls_page.html
503
503
  - test_site/docsupport/chosen.png
504
504
  - test_site/docsupport/init.js
@@ -526,7 +526,7 @@ files:
526
526
  - test_site/media/count_and_bars.mp4
527
527
  - test_site/media_page.html
528
528
  - testcentricity_web.gemspec
529
- homepage: https://www.rubydoc.info/gems/testcentricity_web/
529
+ homepage: https://github.com/TestCentricity/testcentricity_web
530
530
  licenses:
531
531
  - BSD-3-Clause
532
532
  metadata: {}