effective_test_bot 1.2.2 → 1.2.3

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: 647d5dd319259ed9c24df5ffc927e84a8c10e8a5dba646c51a4b986ce4a770a1
4
- data.tar.gz: 043afb956e64b693898b2c3d640b6498217f01781cf2fbba34d20e2a02587e80
3
+ metadata.gz: 80ce8222bd314d35d85d3c6fd58620dbd5d8957cd4ece629467968ee3cbb7e5e
4
+ data.tar.gz: 322fcb891096428196ce8ce3c51a7692bfae9255c72db164b77aa137d39f31cc
5
5
  SHA512:
6
- metadata.gz: 31dd6ecaa5eaf1a2ace0a162c994e7bafd3c67eb0997cc924fdaa0bce2c74e79d00337cd5bbff05472ab8f0f76e7c70b30428326c96fef7f48dd5feb810ca05f
7
- data.tar.gz: 5fa422b2fe60f3e4c9ad057e77ed6335c41d273b6ddb563db20b674d3f1363a1dfe2a08f4ed59b6256d16a04c601a44cd047677d2479c76bacbbeda1b6f5073f
6
+ metadata.gz: 486cf835958bdaae57dcb381ee604d05daecddde263189b090db4986c3a12fbe388c0f3d94a204fa8a211d8ff488694c816482e056ef1680657d56034f63b9c7
7
+ data.tar.gz: d66b36d8ede631896e0228970175bfc67f0b6e911f51613b39fb2dbfde56eafab957cc103b54086003f828a9364e7bd9d718b0c1fc3bc7fd3c22e0fd12080ceb
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '1.2.2'.freeze
2
+ VERSION = '1.2.3'.freeze
3
3
  end
@@ -1,4 +1,6 @@
1
1
  module EffectiveTestBotAssertions
2
+ include ActiveJob::TestHelper if defined?(ActiveJob::TestHelper)
3
+
2
4
  def assert_page_content(content, message: "(page_content) Expected page content :content: to be present")
3
5
  assert page.has_text?(/#{Regexp.escape(content)}/i, wait: 0), message.sub(':content:', content)
4
6
  end
@@ -240,6 +242,8 @@ module EffectiveTestBotAssertions
240
242
  def assert_email(action = nil, to: nil, from: nil, subject: nil, body: nil, message: nil, count: nil, &block)
241
243
  retval = nil
242
244
 
245
+ perform_enqueued_jobs if respond_to?(:perform_enqueued_jobs)
246
+
243
247
  if block_given?
244
248
  before = ActionMailer::Base.deliveries.length
245
249
  retval = yield
@@ -68,6 +68,11 @@ module EffectiveTestBotTestHelper
68
68
  Array(all(selector).first).each { |field| within(field) { yield } }
69
69
  end
70
70
 
71
+ def within_tab(name, &block)
72
+ first("a.nav-link#tab-#{name.parameterize}").click
73
+ within_first("div.tab-pane##{name.parameterize}") { yield }
74
+ end
75
+
71
76
  def click_first(label)
72
77
  click_link(label, match: :first)
73
78
  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.2.2
4
+ version: 1.2.3
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-03-17 00:00:00.000000000 Z
11
+ date: 2021-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails