testcentricity_web 3.2.16 → 3.2.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
  SHA256:
3
- metadata.gz: 365b55689ded4886c7c52ca8ccb95e8bce18f6c33b6d08fc6872c26b88c2a7e7
4
- data.tar.gz: 534bce4c71c825e0ba51548b180982428ca8d315f58d62752907203271907ce1
3
+ metadata.gz: 967025c22dced2c769d460dbb4d6a20708293277b43887a82158c64f242686e9
4
+ data.tar.gz: 9db450d8190d44e31012c45fdad5236507bee75638f323e2bd42632758354743
5
5
  SHA512:
6
- metadata.gz: 5010441fe14bc169b4f8b51ace3fbed1ace9320cf7882d7529e274640ac327032b704b3cea1e9a64eb25e1966f4a5105070f48c2d8fbb94adb4c4752243e8442
7
- data.tar.gz: 75d127eeddce7949fe2d09f265e25d811a9a6f5789632f9ecbe8dc7eef04d78bfe14216188742f208920887a9b64fa96ef29427dbc548a9fb11c3c6bbfc8d6dc
6
+ metadata.gz: bdceb150bda3a9cfa267e3658a5332a76042deada8d57b58b5862f6b73b1c0e9a49721a7f7f57e99cae851626d67531290463acbd26eb2981193a4e1354bb18e
7
+ data.tar.gz: cc252a2ec353bc83d91dcd97a8d4c30f89b434107bbbde48d91a9937f5befe1ad9264e62409ac744f8372885f7c67d52bf10260a25c0b45927783a2a8bbf351d
@@ -1,6 +1,13 @@
1
1
  # CHANGELOG
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [3.2.17] - 19-JUNE-2020
5
+
6
+ ### Changed
7
+ * Updated `Table.define_table_elements` method to accept value for `:row_header` element.
8
+ * Updated `Table.get_row_count`, `Table.get_column_count`, and `Table.get_table_cell_locator` methods to support tables
9
+ with row headers in row #1.
10
+
4
11
  ## [3.2.16] - 13-MAY-2020
5
12
 
6
13
  ### Changed
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- testcentricity_web (3.2.16)
4
+ testcentricity_web (3.2.17)
5
5
  appium_lib
6
6
  browserstack-local
7
7
  capybara (>= 3.1, < 4)
@@ -25,7 +25,7 @@ GEM
25
25
  appium_lib_core (~> 3.3)
26
26
  nokogiri (~> 1.8, >= 1.8.1)
27
27
  tomlrb (~> 1.1)
28
- appium_lib_core (3.7.0)
28
+ appium_lib_core (3.10.0)
29
29
  faye-websocket (~> 0.10.0)
30
30
  selenium-webdriver (~> 3.14, >= 3.14.1)
31
31
  axiom-types (0.1.1)
@@ -33,7 +33,7 @@ GEM
33
33
  ice_nine (~> 0.11.0)
34
34
  thread_safe (~> 0.3, >= 0.3.1)
35
35
  browserstack-local (1.3.0)
36
- capybara (3.32.1)
36
+ capybara (3.32.2)
37
37
  addressable
38
38
  mini_mime (>= 0.1.3)
39
39
  nokogiri (~> 1.8)
@@ -51,13 +51,13 @@ GEM
51
51
  thread_safe (~> 0.3, >= 0.3.1)
52
52
  equalizer (0.0.11)
53
53
  eventmachine (1.2.7)
54
- faker (2.11.0)
54
+ faker (2.12.0)
55
55
  i18n (>= 1.6, < 2)
56
56
  faye-websocket (0.10.9)
57
57
  eventmachine (>= 0.12.0)
58
58
  websocket-driver (>= 0.5.1)
59
- ffi (1.12.2)
60
- i18n (1.8.2)
59
+ ffi (1.13.1)
60
+ i18n (1.8.3)
61
61
  concurrent-ruby (~> 1.0)
62
62
  ice_nine (0.11.2)
63
63
  mini_mime (1.0.2)
@@ -67,12 +67,12 @@ GEM
67
67
  os (1.1.0)
68
68
  power_assert (1.2.0)
69
69
  public_suffix (4.0.5)
70
- rack (2.2.2)
70
+ rack (2.2.3)
71
71
  rack-test (1.1.0)
72
72
  rack (>= 1.0, < 3)
73
73
  rake (13.0.1)
74
74
  redcarpet (3.5.0)
75
- regexp_parser (1.7.0)
75
+ regexp_parser (1.7.1)
76
76
  ruby-ole (1.2.12.2)
77
77
  rubyzip (2.3.0)
78
78
  selenium-webdriver (3.142.7)
@@ -80,7 +80,7 @@ GEM
80
80
  rubyzip (>= 1.2.2)
81
81
  spreadsheet (1.1.7)
82
82
  ruby-ole (>= 1.0)
83
- test-unit (3.3.5)
83
+ test-unit (3.3.6)
84
84
  power_assert
85
85
  thread_safe (0.3.6)
86
86
  tomlrb (1.3.0)
@@ -89,13 +89,13 @@ GEM
89
89
  coercible (~> 1.0)
90
90
  descendants_tracker (~> 0.0, >= 0.0.3)
91
91
  equalizer (~> 0.0, >= 0.0.9)
92
- webdrivers (4.3.0)
92
+ webdrivers (4.4.1)
93
93
  nokogiri (~> 1.6)
94
94
  rubyzip (>= 1.3.0)
95
95
  selenium-webdriver (>= 3.0, < 4.0)
96
- websocket-driver (0.7.1)
96
+ websocket-driver (0.7.2)
97
97
  websocket-extensions (>= 0.1.0)
98
- websocket-extensions (0.1.4)
98
+ websocket-extensions (0.1.5)
99
99
  xpath (3.2.0)
100
100
  nokogiri (~> 1.8)
101
101
 
data/README.md CHANGED
@@ -778,7 +778,7 @@ a `/downloads` folder at the same level as the `/config` and `/features` folders
778
778
 
779
779
  When running tests in multiple concurrent threads using the `parallel_tests` gem, a new folder will be created within the `/downloads` folder for each
780
780
  test thread. This is to ensure that files downloaded in each test thread are isolated from tests running in other parallel threads. An example of the
781
- `/downloads` folder structure for 4 paralle threads is depicted below:
781
+ `/downloads` folder structure for 4 parallel threads is depicted below:
782
782
 
783
783
  my_automation_project
784
784
  ├── config
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '3.2.16'
2
+ VERSION = '3.2.17'
3
3
  end
@@ -7,6 +7,7 @@ module TestCentricity
7
7
  attr_accessor :table_header
8
8
  attr_accessor :header_row
9
9
  attr_accessor :header_column
10
+ attr_accessor :row_header
10
11
  attr_accessor :tree_expand
11
12
  attr_accessor :tree_collapse
12
13
 
@@ -21,7 +22,8 @@ module TestCentricity
21
22
  table_column: 'td',
22
23
  table_header: 'thead',
23
24
  header_row: 'tr',
24
- header_column: 'th'
25
+ header_column: 'th',
26
+ row_header: nil
25
27
  }
26
28
 
27
29
  case @locator_type
@@ -52,6 +54,8 @@ module TestCentricity
52
54
  @header_row = value
53
55
  when :header_column
54
56
  @header_column = value
57
+ when :row_header
58
+ @row_header = value
55
59
  when :tree_expand
56
60
  @tree_expand = value
57
61
  when :tree_collapse
@@ -70,20 +74,18 @@ module TestCentricity
70
74
  #
71
75
  def get_row_count
72
76
  wait_until_exists(5)
73
- case @locator_type
74
- when :xpath
75
- if @table_section.nil?
76
- page.all(:xpath, "#{@locator}/#{@table_body}/#{@table_row}", visible: :all).count
77
- else
78
- page.all(:xpath, "#{@locator}/#{@table_body}/#{@table_section}", visible: :all).count
79
- end
80
- when :css
81
- if @table_section.nil?
82
- page.all(:css, "#{@locator} > #{@table_body} > #{@table_row}", visible: :all).count
83
- else
84
- page.all(:css, "#{@locator} > #{@table_body} > #{@table_section}", visible: :all).count
85
- end
86
- end
77
+ delimiter = case @locator_type
78
+ when :xpath
79
+ "/"
80
+ when :css
81
+ " > "
82
+ end
83
+ path = if @table_section.nil?
84
+ "#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_row}"
85
+ else
86
+ "#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_section}"
87
+ end
88
+ page.all(@locator_type, path, visible: :all).count
87
89
  end
88
90
 
89
91
  # Wait until the table's row count equals the specified value, or until the specified wait time has expired. If the wait
@@ -138,33 +140,48 @@ module TestCentricity
138
140
  row_count = get_row_count
139
141
  case @locator_type
140
142
  when :xpath
141
- if row_count.zero?
142
- page.all(:xpath, "#{@locator}/#{@table_header}/#{@header_row}/#{@header_column}", visible: :all).count
143
- else
144
- if @table_section.nil?
145
- row_count == 1 ?
146
- page.all(:xpath, "#{@locator}/#{@table_body}/#{@table_row}/#{@table_column}", visible: :all).count :
147
- page.all(:xpath, "#{@locator}/#{@table_body}/#{@table_row}[2]/#{@table_column}", visible: :all).count
148
- else
149
- row_count == 1 ?
150
- page.all(:xpath, "#{@locator}/#{@table_body}/#{@table_section}/#{@table_row}/#{@table_column}", visible: :all).count :
151
- page.all(:xpath, "#{@locator}/#{@table_body}/#{@table_section}[2]/#{@table_row}/#{@table_column}", visible: :all).count
152
- end
153
- end
143
+ delimiter = "/"
144
+ index = "[2]"
154
145
  when :css
155
- if row_count.zero?
156
- page.all(:css, "#{@locator} > #{@table_header} > #{@header_row} > #{@header_column}", visible: :all).count
157
- else
158
- if @table_section.nil?
159
- row_count == 1 ?
160
- page.all(:css, "#{@locator} > #{@table_body} > #{@table_row} > #{@table_column}", visible: :all).count :
161
- page.all(:css, "#{@locator} > #{@table_body} > #{@table_row}:nth-of-type(2) > #{@table_column}", visible: :all).count
162
- else
163
- row_count == 1 ?
164
- page.all(:css, "#{@locator} > #{@table_body} > #{@table_section} > #{@table_row} > #{@table_column}", visible: :all).count :
165
- page.all(:css, "#{@locator} > #{@table_body} > #{@table_section}:nth-of-type(2) > #{@table_row} > #{@table_column}", visible: :all).count
166
- end
167
- end
146
+ delimiter = " > "
147
+ index = ":nth-of-type(2)"
148
+ end
149
+ path = if row_count.zero?
150
+ "#{@locator}#{delimiter}#{@table_header}#{delimiter}#{@header_row}#{delimiter}#{@header_column}"
151
+ else
152
+ if @table_section.nil?
153
+ if row_count == 1
154
+ "#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_row}#{delimiter}#{@table_column}"
155
+ else
156
+ "#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_row}#{index}#{delimiter}#{@table_column}"
157
+ end
158
+ else
159
+ if row_count == 1
160
+ "#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_section}#{delimiter}#{@table_row}#{delimiter}#{@table_column}"
161
+ else
162
+ "#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_section}#{index}#{delimiter}#{@table_row}#{delimiter}#{@table_column}"
163
+ end
164
+ end
165
+ end
166
+ if @row_header.nil?
167
+ page.all(@locator_type, path, visible: :all).count
168
+ else
169
+ cols = page.all(@locator_type, path, visible: :all).count
170
+
171
+ path = if @table_section.nil?
172
+ if row_count == 1
173
+ "#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_row}#{delimiter}#{@row_header}"
174
+ else
175
+ "#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_row}#{index}#{delimiter}#{@row_header}"
176
+ end
177
+ else
178
+ if row_count == 1
179
+ "#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_section}#{delimiter}#{@table_row}#{delimiter}#{@row_header}"
180
+ else
181
+ "#{@locator}#{delimiter}#{@table_body}#{delimiter}#{@table_section}#{index}#{delimiter}#{@table_row}#{delimiter}#{@row_header}"
182
+ end
183
+ end
184
+ cols + page.all(@locator_type, path, visible: :all).count
168
185
  end
169
186
  end
170
187
 
@@ -615,7 +632,15 @@ module TestCentricity
615
632
  row_spec = "#{@locator}/#{@table_body}/#{@table_section}"
616
633
  row_spec = "#{row_spec}[#{row}]/#{@table_row}[1]"
617
634
  end
618
- column_spec = "/#{@table_column}[#{column}]"
635
+ column_spec = if @row_header.nil?
636
+ "/#{@table_column}[#{column}]"
637
+ else
638
+ if column == 1
639
+ "/#{@row_header}"
640
+ else
641
+ "/#{@table_column}[#{column - 1}]"
642
+ end
643
+ end
619
644
  when :css
620
645
  if @table_section.nil?
621
646
  row_spec = "#{@locator} > #{@table_body} > #{@table_row}"
@@ -624,7 +649,16 @@ module TestCentricity
624
649
  row_spec = "#{@locator} > #{@table_body} > #{@table_section}"
625
650
  row_spec = "#{row_spec}:nth-of-type(#{row}) > #{@table_row}:nth-of-type(1)"
626
651
  end
627
- column_spec = " > #{@table_column}:nth-of-type(#{column})"
652
+
653
+ column_spec = if @row_header.nil?
654
+ " > #{@table_column}:nth-of-type(#{column})"
655
+ else
656
+ if column == 1
657
+ " > #{@row_header}"
658
+ else
659
+ " > #{@table_column}:nth-of-type(#{column - 1})"
660
+ end
661
+ end
628
662
  end
629
663
  "#{row_spec}#{column_spec}"
630
664
  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: 3.2.16
4
+ version: 3.2.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: 2020-05-13 00:00:00.000000000 Z
11
+ date: 2020-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler