effective_test_bot 1.3.0 → 1.3.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: 26e683262e1566595e1354fb38ab178e36763c50edf3a6f5d9bca647bd8df76e
4
- data.tar.gz: 52edb3cf280a5f1ae143e34394ded8fdf5aab19e021ba4bb8c1f2a41d53ffcbf
3
+ metadata.gz: 8a6cbe5a14d34138113db11e14efc896f674267b75576db178ac0668a054c863
4
+ data.tar.gz: 17a136497f6402b1fed802c150e45013a1799d69f88ac6540c0d1c98f6f8cc55
5
5
  SHA512:
6
- metadata.gz: a68273a9574c1fa18e73a73af64988a1e42889599f6b3389919ea2789d226357def3aa77090cbd87ff2db6650052bc872ac5665f300d942c18628501c425c876
7
- data.tar.gz: 45a472ed4d6750c0c00d968927a4d864365468e0934062caa4e5c041b3da2209779f320601169f4926ce02c1d3dbb00e08d746862d6112ee68ca6eca9f7f350e
6
+ metadata.gz: acbb5ec8f74451845f9b048c8787bed47e67251de26532f30f5665db0547f27e759e7b87f3c1387d126fa1b6c1a8dd6d9e152a639b3454742ebe2be1486e4668
7
+ data.tar.gz: 6d02d4c7f89bca6f532383daec2d828708e8680d433989f2304b6167973b88938b8ea8c68db9b3ac97fea80c132f1aefade382d16dd8b81e704e2b6724f16ced
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '1.3.0'.freeze
2
+ VERSION = '1.3.3'.freeze
3
3
  end
@@ -47,7 +47,7 @@ module EffectiveTestBotFormFaker
47
47
  Faker::Internet.email
48
48
  elsif classes.include?('price') || classes.include?('effective_price')
49
49
  4.times.map { DIGITS.sample }.join('') + '.00'
50
- elsif classes.include?('numeric') || classes.include?('effective_number_text') || classes.include?('effective_integer') || attribute.include?('number')
50
+ elsif classes.include?('numeric') || classes.include?('effective_number_text') || classes.include?('effective_integer') || classes.include?('effective_percent') || attribute.include?('number')
51
51
  min = (Float(field['min']) rescue 1)
52
52
  max = (Float(field['max']) rescue 1000)
53
53
  number = Random.new.rand(min..max)
@@ -17,12 +17,17 @@ module EffectiveTestBotFormHelper
17
17
  true
18
18
  end
19
19
 
20
+ def submit_page(label = nil, last: false, assert_path_changed: true, debug: false)
21
+ submit_form(label, last: last, assert_path_changed: assert_path_changed, debug: debug)
22
+ end
23
+
20
24
  # This submits the form, while checking for html5 form validation errors and unpermitted params
21
- def submit_form(label = nil, last: false, assert_path_changed: true, debug: false)
25
+ def submit_form(label = nil, last: false, assert_path_changed: false, debug: false)
22
26
  assert_no_html5_form_validation_errors unless test_bot_skip?(:no_html5_form_validation_errors)
23
27
  assert_jquery_ujs_disable_with(label) unless test_bot_skip?(:jquery_ujs_disable_with)
24
28
 
25
29
  before_path = page.current_path
30
+ before_path = 'ignore' unless assert_path_changed
26
31
 
27
32
  if test_bot_skip?(:no_unpermitted_params)
28
33
  click_submit(label, last: last, debug: debug)
@@ -30,10 +35,11 @@ module EffectiveTestBotFormHelper
30
35
  with_raised_unpermitted_params_exceptions { click_submit(label, last: last, debug: debug) }
31
36
  end
32
37
 
38
+ assert_no_assigns_errors unless test_bot_skip?(:no_assigns_errors)
39
+
33
40
  # This is a blocking selector that will wait until the page has changed url
34
- assert_no_current_path(before_path) if assert_path_changed
41
+ assert_no_current_path(before_path)
35
42
 
36
- assert_no_assigns_errors unless test_bot_skip?(:no_assigns_errors)
37
43
  assert_no_exceptions unless test_bot_skip?(:exceptions)
38
44
  assert_authorization unless test_bot_skip?(:authorization)
39
45
  assert_page_status unless test_bot_skip?(:page_status)
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.0
4
+ version: 1.3.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: 2022-07-06 00:00:00.000000000 Z
11
+ date: 2022-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails