effective_test_bot 1.2.7 → 1.2.10

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: a91dcb207c7da77c8a8a1c7f91da5bf31c1ac55910061e673c08265b1c46bee7
4
- data.tar.gz: 8b94c2061100cab03625f63ea6ef8d2a4dda45d25dd8daf33b2c32adfad4a3e8
3
+ metadata.gz: f117b4980f2edc56c9f3f99922209374ccd851e487fdc8762b80e5f8739069ac
4
+ data.tar.gz: cfe4ea65d642ce4c4f0ef9fc909516cb4f3dc426e4aa654c5ca85a8ec9912152
5
5
  SHA512:
6
- metadata.gz: 476735f4d0cfc788f2fff4c366e94eaf9960e4be5ce02a92ce709e73c7b503fe9cac6628d0131bfeecbcfc008045fb0dcdcc842451ca56cda0b3a46a00501a90
7
- data.tar.gz: c1ec5489d1224b57c5cb485711d4fd95e929351c955e9e786e6ec6802bc73aed5541b39ec0a08e963d19925ccc492775e2011f138b1269be16abe79a5bb81638
6
+ metadata.gz: 8d90692c2a84642e49d8d07beafb398e9be878ed2d6ce0d0c67f8c5fc599b98fd70348ab1fe7b42912754c11516ca012e8b258470584e7a071ab3279428bbe46
7
+ data.tar.gz: 470dcdcdefe2b351f7b76e734bd06b8c9a3b8d59356683c78df84b166fb9f5422feddeab476b0acaac412ea634b6ed210504bfd706e8d3c8819b1a7af1bd58f5
@@ -3,15 +3,15 @@ module EffectiveTestBot
3
3
  engine_name 'effective_test_bot'
4
4
 
5
5
  config.autoload_paths += Dir[
6
- "#{config.root}/test/test_botable/",
7
- "#{config.root}/test/concerns/",
8
- "#{config.root}/test/support/"
6
+ "#{config.root}/test/test_botable",
7
+ "#{config.root}/test/concerns",
8
+ "#{config.root}/test/support"
9
9
  ]
10
10
 
11
11
  config.eager_load_paths += Dir[
12
- "#{config.root}/test/test_botable/",
13
- "#{config.root}/test/concerns/",
14
- "#{config.root}/test/support/"
12
+ "#{config.root}/test/test_botable",
13
+ "#{config.root}/test/concerns",
14
+ "#{config.root}/test/support"
15
15
  ]
16
16
 
17
17
  # Set up our default configuration options.
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '1.2.7'.freeze
2
+ VERSION = '1.2.10'.freeze
3
3
  end
@@ -85,6 +85,7 @@ module EffectiveTestBotAssertions
85
85
  end
86
86
 
87
87
  def assert_page_status(status = 200, message: '(page_status) Expected :status: HTTP status code')
88
+ return if response_code == nil # This doesn't work well in some drivers
88
89
  assert_equal status, response_code, message.sub(':status:', status.to_s)
89
90
  end
90
91
 
@@ -123,7 +123,7 @@ module EffectiveTestBotFormFaker
123
123
  when 'input_url'
124
124
  Faker::Internet.url
125
125
 
126
- when 'textarea', 'textarea_textarea'
126
+ when 'textarea', 'textarea_textarea', 'trix-editor'
127
127
  Faker::Lorem.paragraph
128
128
 
129
129
  when 'input_hidden'
@@ -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 field_name == 'select' && fills[key].blank?
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.7
4
+ version: 1.2.10
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-07-29 00:00:00.000000000 Z
11
+ date: 2022-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails