effective_test_bot 1.3.4 → 1.3.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: e3d5c5ac86961fa0b38c5dd96e7749fbf6de1a570d111e06eaf8120deb65fb3d
4
- data.tar.gz: 18910b3179ab7971734b0bdd1686efb3cfb3fcd195f0fea8cf925473a58d500c
3
+ metadata.gz: adc113bc0b3849b93e8f09ddffcc22f58926aa18b4eab27157c1bc987da9ddd2
4
+ data.tar.gz: 1ea98e01b3c4a292dce5525c4e1e9416b34e538d7091bcf58b16ac84138ce282
5
5
  SHA512:
6
- metadata.gz: 9108162d099cd5928979f171c8ed6fdb226853bfe41b277cde7140b85b4b07a7819238059631dbf4a7e602b18f1c8dea8ace0e2af83597ca5df8a34aa103d6b1
7
- data.tar.gz: 216569dc5ae2a99d9e29bc174ba541ba48677228a67c25ff843e92b508f554765b44e185a9d1e24e2bed771a34c1dceccf340a2e6c11ac0af66478f86cafbcbe
6
+ metadata.gz: 0f037d2039c6bb2ae21c530ce6a9db6e4e20332f372c2af5d22a281767b5bbf4144a82f64e4cd40ff9b7ae8ea4cb8418eb53df85419520f80a55fc19d5f230fd
7
+ data.tar.gz: 73fa9ad0ce3101823a68948caa8a19dfa31b3e4dfbbd2be7dcfa659062bac984f2d41b3a27e32a8f8a23dc90486cfdee05660b6c32aa8692ab313275b6396186
data/README.md CHANGED
@@ -145,6 +145,16 @@ As well,
145
145
 
146
146
  - `assert_page_normal` checks for general errors on the current page. Checks include `assert_page_status`, `assert_no_js_errors`, and `assert_page_title`.
147
147
 
148
+ ## Object Extras
149
+
150
+ Includes a `stub_any_instance` helper:
151
+
152
+ ```
153
+ String.stub_any_instance(:length, 42) do
154
+ assert_equal "hello".length, 42
155
+ end
156
+ ```
157
+
148
158
  ## Capybara Extras
149
159
 
150
160
  The following quality of life helpers are added by this gem:
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '1.3.4'.freeze
2
+ VERSION = '1.3.6'.freeze
3
3
  end
@@ -176,8 +176,11 @@ module EffectiveTestBotFormFiller
176
176
  try_script "CKEDITOR.instances['#{field['id']}'].setData('#{value}')"
177
177
  elsif article_editor_text_area?(field)
178
178
  value = "<p>#{value.gsub("'", '')}</p>"
179
+ try_script "ArticleEditor('##{field['id']}').editor.setFocus('start')"
179
180
  try_script "ArticleEditor('##{field['id']}').editor.setContent({html: '#{value}'})"
180
- try_script "$('body').click()"
181
+ try_script "ArticleEditor('##{field['id']}').editor.insertContent({html: '#{value}'})"
182
+ try_script "ArticleEditor('##{field['id']}').editor.setFocus('end')"
183
+ field.set(value)
181
184
  else
182
185
  field.set(value)
183
186
  end
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.4
4
+ version: 1.3.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: 2022-08-24 00:00:00.000000000 Z
11
+ date: 2022-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails