effective_test_bot 1.3.3 → 1.3.4

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: 8a6cbe5a14d34138113db11e14efc896f674267b75576db178ac0668a054c863
4
- data.tar.gz: 17a136497f6402b1fed802c150e45013a1799d69f88ac6540c0d1c98f6f8cc55
3
+ metadata.gz: e3d5c5ac86961fa0b38c5dd96e7749fbf6de1a570d111e06eaf8120deb65fb3d
4
+ data.tar.gz: 18910b3179ab7971734b0bdd1686efb3cfb3fcd195f0fea8cf925473a58d500c
5
5
  SHA512:
6
- metadata.gz: acbb5ec8f74451845f9b048c8787bed47e67251de26532f30f5665db0547f27e759e7b87f3c1387d126fa1b6c1a8dd6d9e152a639b3454742ebe2be1486e4668
7
- data.tar.gz: 6d02d4c7f89bca6f532383daec2d828708e8680d433989f2304b6167973b88938b8ea8c68db9b3ac97fea80c132f1aefade382d16dd8b81e704e2b6724f16ced
6
+ metadata.gz: 9108162d099cd5928979f171c8ed6fdb226853bfe41b277cde7140b85b4b07a7819238059631dbf4a7e602b18f1c8dea8ace0e2af83597ca5df8a34aa103d6b1
7
+ data.tar.gz: 216569dc5ae2a99d9e29bc174ba541ba48677228a67c25ff843e92b508f554765b44e185a9d1e24e2bed771a34c1dceccf340a2e6c11ac0af66478f86cafbcbe
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '1.3.3'.freeze
2
+ VERSION = '1.3.4'.freeze
3
3
  end
@@ -174,6 +174,10 @@ module EffectiveTestBotFormFiller
174
174
  if ckeditor_text_area?(field)
175
175
  value = "<p>#{value.gsub("'", '')}</p>"
176
176
  try_script "CKEDITOR.instances['#{field['id']}'].setData('#{value}')"
177
+ elsif article_editor_text_area?(field)
178
+ value = "<p>#{value.gsub("'", '')}</p>"
179
+ try_script "ArticleEditor('##{field['id']}').editor.setContent({html: '#{value}'})"
180
+ try_script "$('body').click()"
177
181
  else
178
182
  field.set(value)
179
183
  end
@@ -300,6 +304,10 @@ module EffectiveTestBotFormFiller
300
304
  @test_bot_excluded_fields_xpath = nil
301
305
  end
302
306
 
307
+ def article_editor_text_area?(field)
308
+ field.tag_name == 'textarea' && field['class'].to_s.include?('effective_article_editor')
309
+ end
310
+
303
311
  def ckeditor_text_area?(field)
304
312
  return false unless field.tag_name == 'textarea'
305
313
  (field['class'].to_s.include?('ckeditor') || all("span[id='cke_#{field['id']}']", wait: false).present?)
@@ -338,6 +346,7 @@ module EffectiveTestBotFormFiller
338
346
  return true if @test_bot_excluded_fields_xpath.present? && field.path.include?(@test_bot_excluded_fields_xpath)
339
347
 
340
348
  if !field.visible?
349
+ return false if article_editor_text_area?(field)
341
350
  return false if ckeditor_text_area?(field)
342
351
  return false if custom_control_input?(field)
343
352
  return false if file_input?(field)
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.3.3
4
+ version: 1.3.4
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: 2022-07-28 00:00:00.000000000 Z
11
+ date: 2022-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails