automation_helpers 6.0 → 7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1d6285060e12810750da35b34c2177d20a61c452ebf1908e263aa35f77e972b
4
- data.tar.gz: 40ce2a6d8c627360e8f251669706f282e2794b79f3b728ba1dbb5522c6705eb5
3
+ metadata.gz: de65c70c0d33f66469440532cf8a4d49840e8b4e48cc653dca9fc2d20280c9ee
4
+ data.tar.gz: b79dfae24f4df076559ddb46270b32ef2ab5168f3e12b1f3565a060d5673fc3a
5
5
  SHA512:
6
- metadata.gz: 7cb27f6da88756227eb4916b7b60ea5dac209317b79d99f55d70ba860ba6723de20f14b6cff5cd8d3b22667c621ef987561f6d7500a9577996b7c49cb556ebef
7
- data.tar.gz: fddf4a7bd98c70bef88ea423d0b164560ccc3df39c15f12de4d668ecc73f8c53a9646eb2f2520bdc8ad9823d9c52b5528e2f9c6c942135d67ea6bfcd33ae0666
6
+ metadata.gz: 0febf6c2eaba22e6bda884a435388e57967aea3f8556f68a7f445be96a1a9534ee980cf4e80fc0731694185e716f9734c714b9d6747f31e516ae2236446e196e
7
+ data.tar.gz: eda61bc6fb061175fa91d996661748143fa0ae962257b1bc9ead36827e0a469b75285bf77257c48e8f69e1779c01dee0776276acac51496e464f9a9b2cca0557
@@ -89,7 +89,7 @@ module AutomationHelpers
89
89
  {
90
90
  'bstack:options' => {
91
91
  'local' => 'false',
92
- 'seleniumVersion' => '4.28.0',
92
+ 'seleniumVersion' => '4.39.0',
93
93
  'consoleLogs' => 'verbose',
94
94
  'networkLogs' => 'true',
95
95
  'resolution' => '1920x1080'
@@ -61,8 +61,7 @@ module AutomationHelpers
61
61
  'browserName' => 'internet explorer',
62
62
  'bstack:options' => {
63
63
  'ie' => {
64
- # This is a minor hack until the IEDriver catches up and releases a V4 compliant copy
65
- # It is confirmed to be compliant with V4 selenium jars e.t.c.
64
+ # This appears to be the last maintained version and we will remove IE support in V8 of helpers
66
65
  'driver' => '4.16.0.0',
67
66
  'arch' => 'x32'
68
67
  }
@@ -5,7 +5,7 @@ module AutomationHelpers
5
5
  #
6
6
  # Fix the issue where the `#text` method doesn't normalize whitespace (Only the matchers do)
7
7
  #
8
- class Capybara < Base
8
+ class CapybaraSafari < Base
9
9
  private
10
10
 
11
11
  def description
@@ -19,6 +19,14 @@ module AutomationHelpers
19
19
  def perform
20
20
  ::Capybara::Node::Element.prepend SafariTextPatch
21
21
  end
22
+
23
+ def deprecate?
24
+ true
25
+ end
26
+
27
+ def prevent_usage_date
28
+ Time.new(2027, 3, 30)
29
+ end
22
30
  end
23
31
 
24
32
  #
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AutomationHelpers
4
+ module Patches
5
+ #
6
+ # Fix the issue where you cannot close the first window in the handle array with `#close_window`
7
+ #
8
+ class CapybaraWindow < Base
9
+ private
10
+
11
+ def description
12
+ <<~DESCRIPTION
13
+ The method `#close_window` in Capybara::Selenium::Driver (Base), does not permit closing of the first window in the handle array
14
+
15
+ This was introduced over a decade ago and given the propensity for new windows to be opened in the course of testing,
16
+ this is a significant issue for users of Capybara and Selenium.
17
+
18
+ See https://github.com/teamcapybara/capybara/issues/2834 for more details.
19
+ DESCRIPTION
20
+ end
21
+
22
+ def perform
23
+ ::Capybara::Selenium::Driver.prepend WindowPatch
24
+ end
25
+ end
26
+
27
+ #
28
+ # @api private
29
+ #
30
+ module WindowPatch
31
+ def close_window(handle)
32
+ within_given_window(handle) do
33
+ browser.close
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'automation_helpers/patches/base'
4
- require 'automation_helpers/patches/capybara'
4
+ require 'automation_helpers/patches/capybara_safari'
5
+ require 'automation_helpers/patches/capybara_window'
5
6
  require 'automation_helpers/patches/selenium_logger'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AutomationHelpers
4
- VERSION = '6.0'
4
+ VERSION = '7.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: automation_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: '6.0'
4
+ version: '7.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Hill
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-01-06 00:00:00.000000000 Z
12
+ date: 2026-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capybara
@@ -85,14 +85,14 @@ dependencies:
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: 1.81.0
88
+ version: 1.85.1
89
89
  type: :development
90
90
  prerelease: false
91
91
  version_requirements: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 1.81.0
95
+ version: 1.85.1
96
96
  - !ruby/object:Gem::Dependency
97
97
  name: rubocop-performance
98
98
  requirement: !ruby/object:Gem::Requirement
@@ -113,14 +113,14 @@ dependencies:
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: 3.8.0
116
+ version: 3.9.0
117
117
  type: :development
118
118
  prerelease: false
119
119
  version_requirements: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: 3.8.0
123
+ version: 3.9.0
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: selenium-webdriver
126
126
  requirement: !ruby/object:Gem::Requirement
@@ -165,7 +165,8 @@ files:
165
165
  - lib/automation_helpers/extensions/string.rb
166
166
  - lib/automation_helpers/patches.rb
167
167
  - lib/automation_helpers/patches/base.rb
168
- - lib/automation_helpers/patches/capybara.rb
168
+ - lib/automation_helpers/patches/capybara_safari.rb
169
+ - lib/automation_helpers/patches/capybara_window.rb
169
170
  - lib/automation_helpers/patches/selenium_logger.rb
170
171
  - lib/automation_helpers/version.rb
171
172
  homepage: https://www.github.com/site-prism/automation_helpers
@@ -183,14 +184,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
183
184
  requirements:
184
185
  - - ">="
185
186
  - !ruby/object:Gem::Version
186
- version: '3.1'
187
+ version: '3.3'
187
188
  required_rubygems_version: !ruby/object:Gem::Requirement
188
189
  requirements:
189
190
  - - ">="
190
191
  - !ruby/object:Gem::Version
191
192
  version: 3.2.8
192
193
  requirements: []
193
- rubygems_version: 3.3.27
194
+ rubygems_version: 3.5.22
194
195
  signing_key:
195
196
  specification_version: 4
196
197
  summary: Automation Helpers - Avoid writing the most common things in Ruby Automation