effective_test_bot 1.1.21 → 1.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: defcfe0cf1666c1b04a57911d6818d1c9d73bf3e1301fb86ee2b6cf8e4d2cbc9
|
4
|
+
data.tar.gz: 034d7b35c7aa2cedfe186d9ac145d47abfed6783f9a231618dc5acd8f79ec77d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8f727e5ddf6deb68015538f4cd07c1bda01b917a44ac95e330eafeecf8f46fb8ee49142bdc5bc3b0f6dd999a6ccc9a234b30fa09069fd0a4a2bf7d0158d04e4
|
7
|
+
data.tar.gz: 9f17145549ada4184ec34dd92939e2026f06d6bc5e166829e02e14aa557027666f147d083200f777413edcba60e84fe96ec300dc07954917899b3089af2077b3
|
@@ -2,10 +2,17 @@ module EffectiveTestBot
|
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
engine_name 'effective_test_bot'
|
4
4
|
|
5
|
-
config.autoload_paths += Dir[
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
config.autoload_paths += Dir[
|
6
|
+
"#{config.root}/test/test_botable/",
|
7
|
+
"#{config.root}/test/concerns/",
|
8
|
+
"#{config.root}/test/support/"
|
9
|
+
]
|
10
|
+
|
11
|
+
config.eager_load_paths += Dir[
|
12
|
+
"#{config.root}/test/test_botable/",
|
13
|
+
"#{config.root}/test/concerns/",
|
14
|
+
"#{config.root}/test/support/"
|
15
|
+
]
|
9
16
|
|
10
17
|
# Set up our default configuration options.
|
11
18
|
initializer 'effective_test_bot.defaults', before: :load_config_initializers do |app|
|
@@ -218,7 +218,15 @@ module EffectiveTestBotAssertions
|
|
218
218
|
# assert_email :new_user_sign_up
|
219
219
|
# assert_email :new_user_sign_up, to: 'newuser@example.com'
|
220
220
|
# assert_email from: 'admin@example.com'
|
221
|
-
def assert_email(action = nil, to: nil, from: nil, subject: nil, body: nil, message: nil)
|
221
|
+
def assert_email(action = nil, to: nil, from: nil, subject: nil, body: nil, message: nil, &block)
|
222
|
+
if block_given?
|
223
|
+
before = ActionMailer::Base.deliveries.length
|
224
|
+
yield
|
225
|
+
after = ActionMailer::Base.deliveries.length
|
226
|
+
|
227
|
+
assert (after - before == 1), "(assert_email) Expected one email to have been delivered"
|
228
|
+
end
|
229
|
+
|
222
230
|
if (action || to || from || subject || body).nil?
|
223
231
|
assert ActionMailer::Base.deliveries.present?, message || "(assert_email) Expected email to have been delivered"
|
224
232
|
return
|
@@ -19,7 +19,8 @@ module EffectiveTestBotFormFiller
|
|
19
19
|
active_tab = all("li.active > a[data-toggle='tab']", wait: false).first
|
20
20
|
|
21
21
|
tab_content = if active_tab && active_tab['href'].present?
|
22
|
-
|
22
|
+
tab_href = '#' + active_tab['href'].split('#').last
|
23
|
+
find('div' + tab_href).find(:xpath, '..')
|
23
24
|
end
|
24
25
|
|
25
26
|
excluding_fields_with_parent(tab_content) { fill_form_fields(fills) }
|
@@ -30,6 +30,10 @@ module EffectiveTestBotTestHelper
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
+
def with_time_travel(date, &block)
|
34
|
+
travel_to(date) { yield }
|
35
|
+
end
|
36
|
+
|
33
37
|
def finished_all_ajax_requests?
|
34
38
|
ajax_request_count = page.evaluate_script('jQuery.active')
|
35
39
|
ajax_request_count.blank? || ajax_request_count.zero?
|
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.1.
|
4
|
+
version: 1.1.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -175,7 +175,7 @@ homepage: https://github.com/code-and-effect/effective_test_bot
|
|
175
175
|
licenses:
|
176
176
|
- MIT
|
177
177
|
metadata: {}
|
178
|
-
post_install_message:
|
178
|
+
post_install_message:
|
179
179
|
rdoc_options: []
|
180
180
|
require_paths:
|
181
181
|
- lib
|
@@ -190,8 +190,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
- !ruby/object:Gem::Version
|
191
191
|
version: '0'
|
192
192
|
requirements: []
|
193
|
-
rubygems_version: 3.
|
194
|
-
signing_key:
|
193
|
+
rubygems_version: 3.1.2
|
194
|
+
signing_key:
|
195
195
|
specification_version: 4
|
196
196
|
summary: A shared library of rails model & system tests that should pass in every
|
197
197
|
Rails application.
|