effective_test_bot 1.1.9 → 1.1.10

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: 388b001b2623967980652158d514fced5cc43e1aa68d8e82ed58477b5259ce7e
4
- data.tar.gz: 75f822d0e2b123ac4895ffca16c43177b9cc535d8b1f6662a732d27095fa3c32
3
+ metadata.gz: 3b3829648f3fc69bd8f75d3312984aee55b9d6c534fe57c2af5ff5902633c9a9
4
+ data.tar.gz: 04da07a2a5860b4c55755b8e9627d32e0b90f538323fbf9111f26bd3416cb500
5
5
  SHA512:
6
- metadata.gz: 928fd9aa3369645ceafc2649c1f1b829194805438bfa64e8396dff29c9bc74fa6c4b2157da0172658ec7243c16447afd46093d2d5a7ec9bbb8e4b200c41c4ec1
7
- data.tar.gz: eb8435cb593eb355924ea139255050d3699c33fd38c80627d384d4d651ef93cd998eaea22cda87fb3f29b53187c4b1e8186fbfb120bda9634a17bea31deff45b
6
+ metadata.gz: f5ebc7ca28ffdbacc2f76948f87b4f6b6b0477d100c68acc2138a054a15b8f2e955d820c5783672554d79a4e227198aa0800a46aa70cf6255dcc8a35920b73ec
7
+ data.tar.gz: 35af10f02568f30c12efb8d6e8523aa8fe881c0cdb5ad33f77aed6b6de72f884313c275b77ff650558eed919dd74c081213fef2aaac9ef12d564cb752d78f8cf
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '1.1.9'.freeze
2
+ VERSION = '1.1.10'.freeze
3
3
  end
@@ -140,7 +140,8 @@ module EffectiveTestBotAssertions
140
140
  # It ensures there are no HTML5 validation errors that would prevent the form from being submit
141
141
  # Browsers seem to only consider visible fields, so we will to
142
142
  def assert_no_html5_form_validation_errors(message: nil)
143
- errors = all(':invalid', visible: true, wait: false).map { |field| field['name'] }
143
+ errors = all(':invalid', visible: true, wait: false).map { |field| field['name'].presence }.compact
144
+
144
145
  assert errors.blank?, message || "(no_html5_form_validation_errors) Unable to submit form, unexpected HTML5 validation error present on the following fields:\n#{errors.join("\n")}"
145
146
  end
146
147
 
@@ -296,7 +296,7 @@ module EffectiveTestBotFormFiller
296
296
  field_id.start_with?('filters_scope_') ||
297
297
  field_id.start_with?('filters_') && field['name'].blank? ||
298
298
  (field.disabled? rescue true) || # Selenium::WebDriver::Error::StaleElementReferenceError: stale element reference: element is not attached to the page document
299
- (!field.visible? && !ckeditor_text_area?(field) && !custom_control_input?(field)) ||
299
+ (!field.visible? && !ckeditor_text_area?(field) && !custom_control_input?(field) && !file_input?(field)) ||
300
300
  ['true', true, 1].include?(field['data-test-bot-skip']) ||
301
301
  (@test_bot_excluded_fields_xpath.present? && field.path.include?(@test_bot_excluded_fields_xpath))
302
302
  end
@@ -104,10 +104,13 @@ module EffectiveTestBotFormHelper
104
104
  puts "Clicking: <#{submit.tag_name} id='#{submit['id']}' class='#{submit['class']}' name='#{submit['name']}' value='#{submit['value']}' href='#{submit['href']}' />"
105
105
  end
106
106
 
107
- submit.click
108
-
109
- if submit['data-confirm']
110
- effective_bootstrap_custom_data_confirm? ? submit.click : page.accept_alert
107
+ if submit['data-confirm'] && effective_bootstrap_custom_data_confirm?
108
+ submit.click
109
+ submit.click # Twice
110
+ elsif submit['data-confirm']
111
+ page.accept_confirm { submit.click }
112
+ else
113
+ submit.click
111
114
  end
112
115
 
113
116
  synchronize!
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.9
4
+ version: 1.1.10
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: 2019-08-07 00:00:00.000000000 Z
11
+ date: 2019-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails