effective_test_bot 1.5.5 → 1.5.6

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: 0c320a94c17497abc43a0f37559dcee2e608ba899a2aabc4f4a4b7cc7a9e5be8
4
- data.tar.gz: e5753beb4030d91505ee07ee221abe9b76d79a69d4da1c41a1a11542b1d703dd
3
+ metadata.gz: 973740fc8ffcd01506d1f25adfd33ea5b6243bf0cf10ac92c2e113e99545db75
4
+ data.tar.gz: f0432c566e900a84b03363a9f71c23e6da82a80ab096ba85b1959cc589c0c1fd
5
5
  SHA512:
6
- metadata.gz: b0530afa717c87156b8b07b78b4660d62e82f13294d3075b8f27e09fc6fb26760bced8f3c579a9f0cfd442d4f70bd0dbcff1a7efc2b49300cf19c107e02e5076
7
- data.tar.gz: bbe0ab99a02579405943790b1da5fe05604e7a8b66451b80df844baa6757626a4f64df47e2d608be6ef7ab98d4c2c75bb36b0dbccc96501d97b7d84c92a32db4
6
+ metadata.gz: 22dcfa39126fb8e039ae905eb274f89181fea57adc283774366dfc8cc53a7cd93e24289fb4f0709045b1f79408652463cd68da1a3b8ec2b44be28353e3499c36
7
+ data.tar.gz: 6eb4f7a4c8b0199e4821a3279b30fdcfc723cc0c3d58b9fc48e1ecbafdee9b6a62bfa0a9f68d98d6d2835df898793bc20402c44e45d40c71ef06bf62e08d5288
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '1.5.5'.freeze
2
+ VERSION = '1.5.6'.freeze
3
3
  end
@@ -149,13 +149,16 @@ module EffectiveTestBotFormFiller
149
149
  end
150
150
 
151
151
  def fill_input_checkbox(field, value)
152
- return if [nil, false].include?(value)
153
-
154
152
  if field['class'].to_s.include?('custom-control-input')
155
153
  label = all("label[for='#{field['id']}']", wait: false).first
156
- return label.click() if label
154
+ if label
155
+ label.click if field.checked? ^ value # click if check status is different from value
156
+ return
157
+ end
157
158
  end
158
159
 
160
+ return if [nil, false].include?(value)
161
+
159
162
  begin
160
163
  field.set(value)
161
164
  rescue Exception => e
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_test_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-04 00:00:00.000000000 Z
11
+ date: 2024-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails