effective_test_bot 1.2.7 → 1.2.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f020934794c731261aa532ab1fd8859f2cafd2e4ac307e7c47915e24775c3bb1
|
4
|
+
data.tar.gz: d151cf48ec7242676de9e9f98787c92aeaf454242659622592761fba89a9af3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55ebfa44b864e7728d0296fb080316b17fac6e4e129417d40ca7c4cb5d26e61bc830ef8c02f0359aff343bb33a360916d11c54f4d957fab1f93e32af56c1dcae
|
7
|
+
data.tar.gz: bf01f6eea8e21d3d3af6bd1b24a33ba052230b23b5921b745e6be17efbd9ef6263fba359444c83aada3bd4061a66b88ca6798b9a93f79913ca2307d4bd19cc23
|
@@ -152,7 +152,7 @@ module EffectiveTestBotFormFaker
|
|
152
152
|
|
153
153
|
if fills.key?(key)
|
154
154
|
fill = fills[key].to_s
|
155
|
-
fill = :unselect if
|
155
|
+
fill = :unselect if ['select', 'input_file'].include?(field_name) && fills[key].blank?
|
156
156
|
end
|
157
157
|
|
158
158
|
break if fill.present?
|
@@ -162,7 +162,7 @@ module EffectiveTestBotFormFaker
|
|
162
162
|
fill ||= fills[value]
|
163
163
|
|
164
164
|
# If this is a file field, make sure the file is present at Rails.root/test/fixtures/
|
165
|
-
if fill.present? && field_name == 'input_file'
|
165
|
+
if fill.present? && fill != :unselect && field_name == 'input_file'
|
166
166
|
filename = (fill.to_s.include?('/') ? fill : "#{Rails.root}/test/fixtures/#{fill}")
|
167
167
|
raise("Warning: Unable to load fill file #{fill}. Expected file #{filename}") unless File.exists?(filename)
|
168
168
|
return filename
|
@@ -72,7 +72,7 @@ module EffectiveTestBotFormFiller
|
|
72
72
|
end
|
73
73
|
|
74
74
|
# Fill all fields now
|
75
|
-
fields = all('input,select,textarea', visible: false).reject do |field|
|
75
|
+
fields = all('input,select,textarea,trix-editor', visible: false).reject do |field|
|
76
76
|
(seen[field_key(field)] rescue true)
|
77
77
|
end
|
78
78
|
|
@@ -108,7 +108,7 @@ module EffectiveTestBotFormFiller
|
|
108
108
|
fill_input_checkbox(field, value)
|
109
109
|
when 'input_radio'
|
110
110
|
fill_input_radio(field, value)
|
111
|
-
when 'textarea', 'textarea_textarea'
|
111
|
+
when 'textarea', 'textarea_textarea', 'trix-editor'
|
112
112
|
fill_input_text_area(field, value)
|
113
113
|
when 'select', 'select_select-one', 'select_select-multiple'
|
114
114
|
fill_input_select(field, value)
|
@@ -219,6 +219,8 @@ module EffectiveTestBotFormFiller
|
|
219
219
|
end
|
220
220
|
|
221
221
|
def fill_input_file(field, value)
|
222
|
+
return if value == :unselect
|
223
|
+
|
222
224
|
if field['class'].to_s.include?('asset-box-uploader-fileinput')
|
223
225
|
upload_effective_asset(field, value)
|
224
226
|
else
|
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.2.
|
4
|
+
version: 1.2.8
|
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: 2021-
|
11
|
+
date: 2021-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|