effective_test_bot 1.5.19 → 1.7.0

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: '0814954e60e179ce7620a760b5747970987f2a76eadc7afbf6a684ce6d696af0'
4
- data.tar.gz: 2485fafd66c52fa1ad73a78240ec91c1c325666acde6bf4ff187cad746f03c89
3
+ metadata.gz: 0b4f8b032c99230c6fcee477b0b80ace59c6d2bfae02936c1e4b0e3c6b366233
4
+ data.tar.gz: 2826d465044bdd27544a4d8dc4be38f2ce78109fafabc953d9c6541b6e6f5e07
5
5
  SHA512:
6
- metadata.gz: a768bea0fdd4c135da173d0149cc29ae745405c5699885ffa313aff3bc392df5bd2659bc284d0d4f72d257c5e550b8ba668cc42420b137df009fa35f5bb933e0
7
- data.tar.gz: 2d01541212a01f3f68ace1ae24b6194d8664783985872629719c51392b3e96b8aa664d70e8b61c204cdfeb36519d26b6bcd37008f4a492d1f1417eb19b1e1a99
6
+ metadata.gz: 16cea9eb462395b662a10005cd577a305c67b2f405801cd5ed48d0e6478d4a5a30f72cb662ab7f9d9e71e22df614a971cdf4e5cc5e0f62519f501ba4316355b7
7
+ data.tar.gz: 8fdac06110cdde7a0e7ef41eb24e4f67156c1afad7c82856e1c15b0c36c2eaf2d9abba2df7a49a189c0d9f3a4ab8bbeac16f4486a4083eb46179701b5dd62d3e
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2019 Code and Effect Inc.
1
+ Copyright 2025 Code and Effect Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -54,10 +54,11 @@ Then you're ready to install `effective_test_bot`:
54
54
  ```ruby
55
55
  group :test do
56
56
  gem 'capybara'
57
- gem 'selenium-webdriver'
58
- gem 'webdrivers'
59
57
  gem 'effective_test_bot'
60
58
 
59
+ # Choose one:
60
+ gem 'selenium-webdriver' # or cuprite
61
+
61
62
  # Optional. Only required if you want animated gifs.
62
63
  gem 'rmagick'
63
64
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '1.5.19'.freeze
2
+ VERSION = '1.7.0'.freeze
3
3
  end
@@ -28,6 +28,9 @@ module EffectiveTestBotFormHelper
28
28
  assert_no_html5_form_validation_errors unless test_bot_skip?(:no_html5_form_validation_errors)
29
29
  assert_jquery_ujs_disable_with(label) unless test_bot_skip?(:jquery_ujs_disable_with)
30
30
 
31
+ # Add a unique class to the body before submission
32
+ page.execute_script("document.body.classList.add('effective-test-bot-submitting-form');")
33
+
31
34
  before_path = page.current_path
32
35
  before_path = 'ignore' unless assert_path_changed
33
36
 
@@ -39,8 +42,9 @@ module EffectiveTestBotFormHelper
39
42
 
40
43
  assert_no_assigns_errors unless test_bot_skip?(:no_assigns_errors)
41
44
 
42
- # This is a blocking selector that will wait until the page has changed url
43
- assert_no_current_path(before_path.to_s)
45
+ # Make sure the page has fully loaded afer submission
46
+ assert_no_selector('body.effective-test-bot-submitting-form', wait: Capybara.default_max_wait_time * 10)
47
+ assert_no_current_path(before_path.to_s, wait: Capybara.default_max_wait_time * 10)
44
48
 
45
49
  assert_no_exceptions unless test_bot_skip?(:exceptions)
46
50
  assert_authorization unless test_bot_skip?(:authorization)
@@ -80,7 +80,6 @@ module EffectiveTestBotTestHelper
80
80
  def within_datatable_new_form(&block)
81
81
  click_on 'New'
82
82
  within_first('.col-inline-form') { yield }
83
- sleep(1)
84
83
  end
85
84
  alias_method :within_datatables_new_form, :within_datatable_new_form
86
85
 
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.5.19
4
+ version: 1.7.0
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-04-14 00:00:00.000000000 Z
11
+ date: 2025-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: selenium-webdriver
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: effective_resources
57
43
  requirement: !ruby/object:Gem::Requirement