effective_test_bot 1.7.1 → 1.7.3

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: 914a9df1a597575ab9150aeed63569eb8d76066822f8cdb746a7204f1235d5fe
4
- data.tar.gz: 240e22997753bf272671a9ceb8709b863052d3039f55b84fe673cdc7b029f2dc
3
+ metadata.gz: ee7799f74d434efa744019fac146df7b9c5c48bc07258f7aaea4aa551b137662
4
+ data.tar.gz: b246f08bc2459df959c6858cbaea894618e5a32038f8af12d1a11beb28af3571
5
5
  SHA512:
6
- metadata.gz: 62624653851827706582229b697e9cfeb7644e3a11372c832432c96acccd1de929ef6dd676b023c540c004d376b4cceb08d936f2bfcd2631a4e0fac5a04e3cdf
7
- data.tar.gz: 5054abd3cfe3d42acca6b467349365d41221afe0381112939839e6847725d27ad905b1a44b1ef9c312d86acffe427521ad0c827a003ac943476bdbd2847b6a0e
6
+ metadata.gz: bf7fd13d2a8004efc83ae2988c100583b10276b6aa8317e42893494086afe039126b26d38593a986b65c3959c86ecf840df0dbfe24064918faa11b0aeec3255d
7
+ data.tar.gz: 73d400bceeb4f33a83554455076aee06d3546c20133d01bd9c0beb6922b2088eea4de61ec38999a47da09f6913823d86abc3dc7d344804d1b723184c96a3d58b
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '1.7.1'.freeze
2
+ VERSION = '1.7.3'.freeze
3
3
  end
@@ -247,7 +247,9 @@ module EffectiveTestBotAssertions
247
247
 
248
248
  #include ActiveJob::TestHelper if defined?(ActiveJob::TestHelper)
249
249
  def assert_email_perform_enqueued_jobs
250
- perform_enqueued_jobs if respond_to?(:perform_enqueued_jobs)
250
+ if respond_to?(:perform_enqueued_jobs)
251
+ perform_enqueued_jobs while (jobs = perform_enqueued_jobs) > 0
252
+ end
251
253
  end
252
254
 
253
255
  # assert_email :new_user_sign_up
@@ -335,4 +337,8 @@ module EffectiveTestBotAssertions
335
337
  assert_no_exceptions
336
338
  end
337
339
 
340
+ def assert_wizard_step(step)
341
+ assert page.current_url.end_with?("/#{step}"), "Expected current wizard step to be :#{step}, but it was :#{page.current_url.split('/').last}"
342
+ end
343
+
338
344
  end
@@ -19,6 +19,19 @@ module EffectiveTestBotFormHelper
19
19
  true
20
20
  end
21
21
 
22
+ # Asserts were on the given wizard step, fills the form and submits the page
23
+ def submit_wizard_step(step, fills = {})
24
+ if(add_another = fills.delete(:add_another)).present?
25
+ add_another = 1 if add_another == true
26
+ raise("expected add_another to be a number, but it was #{add_another}") if add_another.present? && !add_another.is_a?(Integer)
27
+ add_another.times { click_on('Add Another') }
28
+ end
29
+
30
+ assert_wizard_step(step)
31
+ fill_form(fills)
32
+ submit_page
33
+ end
34
+
22
35
  def submit_page(label = nil, last: false, assert_path_changed: true, wait: true, debug: false)
23
36
  submit_form(label, last: last, assert_path_changed: assert_path_changed, wait: wait, debug: debug)
24
37
  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.7.1
4
+ version: 1.7.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: 2025-05-15 00:00:00.000000000 Z
11
+ date: 2025-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails