testcentricity_web 4.4.5 → 4.4.7

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: ffc632e024d749a91dc5f2c1f8975b0aa99f9783ffebe62216075fa3047568a5
4
- data.tar.gz: 1d06294114d774a4d879ea534ad8bbe1ba5fce9fe327a1dc27c043dcdb3d53b8
3
+ metadata.gz: df25b2f03c601530a6cac7652a619802fdbcf541cfac60a372abd80cd88539dc
4
+ data.tar.gz: 06e5852b86f220a53716c5acda9e2621e9a0e673bb88c1b6808ebd1f9c2b6310
5
5
  SHA512:
6
- metadata.gz: 2d7e40b4dd16fc144dfa7f5ac09dd3ac6ed6f2c72e7cbf607d64f85d0e89a366b1f66d63add79e7db6f594c841a9897c34158a0adf620ad54e59d305a3442bb1
7
- data.tar.gz: 8b762bff0363cf9dbc1a4d911c5e1bb2c8257b62f644c91afc4d274a1d1e47342f6ca94e48edc9113a235420070c3e00a42edf2910f2e4f58517820222ca295a
6
+ metadata.gz: 0107a6c5d7a1bfe3ab8dd3d17c394e5ac2630ef7f53a2947c2916296c3281875d7c25b163a2270088f77e193878e7b128843518c39aa110e32b8c8b44b63c856
7
+ data.tar.gz: 50cebc5c0b3b0e5f07cf05a9d594916abd6c6edc3ccc3fc9025bae3c60c2793d3639b91770a48d54206ba6f3fc91c2b27a8d1a5ddbbc6da0a0898fa8661572f0
data/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [4.4.7] - 13-JAN-2024
6
+
7
+ ### Fixed
8
+ * `WebDriverConnect.activate_driver` now correctly sets `Environ.driver_name` to name of activated WebDriver instance.
9
+ * `WebDriverConnect.close_all_drivers` no longer raises exception if called before any WebDrivers have been instantiated.
10
+
11
+ ### Added
12
+ * Added `WebDriverConnect.driver_exists?` method.
13
+
14
+ ## [4.4.6] - 12-JAN-2024
15
+
16
+ ### Fixed
17
+ * `WebDriverConnect.num_drivers` no longer raises exception if called before any WebDrivers have been instantiated.
18
+
19
+
5
20
  ## [4.4.5] - 10-JAN-2024
6
21
 
7
22
  ### Fixed
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '4.4.5'
2
+ VERSION = '4.4.7'
3
3
  end
@@ -109,24 +109,35 @@ module TestCentricity
109
109
  @drivers[Environ.driver_name] = Environ.driver_state
110
110
  end
111
111
 
112
- def self.activate_driver(driver_name)
113
- driver_state = @drivers[driver_name]
114
- raise "Could not find a driver named '#{driver_name}'" if driver_state.nil?
112
+ def self.driver_exists?(driver_name)
113
+ if @drivers.nil?
114
+ false
115
+ else
116
+ driver_state = @drivers[driver_name]
117
+ !driver_state.nil?
118
+ end
119
+ end
120
+
121
+ def self.activate_driver(name)
122
+ driver_state = @drivers[name]
123
+ raise "Could not find a driver named '#{name}'" if driver_state.nil?
115
124
 
116
125
  Environ.restore_driver_state(driver_state)
117
- Capybara.current_driver = driver_name
118
- Capybara.default_driver = driver_name
126
+ Capybara.current_driver = name
127
+ Capybara.default_driver = name
128
+ Environ.driver_name = name
119
129
  end
120
130
 
121
131
  # Return the number of driver instances
122
132
  #
123
133
  # @return [Integer]
124
134
  def self.num_drivers
125
- @drivers.length
135
+ @drivers.nil? ? 0 : @drivers.length
126
136
  end
127
137
 
128
138
  # Close all browsers and terminate all driver instances
129
139
  def self.close_all_drivers
140
+ return if @drivers.nil?
130
141
  @drivers.each do |key, _value|
131
142
  Environ.restore_driver_state(@drivers[key])
132
143
  Capybara.current_driver = key
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: 4.4.5
4
+ version: 4.4.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: 2024-01-10 00:00:00.000000000 Z
11
+ date: 2024-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler