effective_test_bot 1.3.11 → 1.3.13
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b3675728265e5d18bbd207f8b4c3d53bdd4721c35cf8392c0767c725a053c4d
|
4
|
+
data.tar.gz: a367c248ef3b4ffdc08976654fc1eb08a22632afb687cff9dd80da57be1e6852
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7e383be8de401862ec330dffbd6205bee1b16953a8a411125f11ea3781c21c0d0542d840bcca531171959193057b84b6447e80149914fa3127f1ea1d3303dec
|
7
|
+
data.tar.gz: 9615b1044a6d062729b3c04232d5b53a538596a3d667b6dccce7dab156c900b0466086ec6c72577c4537e3d76964d84949d56266b4565a741358d8b4ef1b2787
|
@@ -38,7 +38,7 @@ module EffectiveTestBotFormHelper
|
|
38
38
|
assert_no_assigns_errors unless test_bot_skip?(:no_assigns_errors)
|
39
39
|
|
40
40
|
# This is a blocking selector that will wait until the page has changed url
|
41
|
-
assert_no_current_path(before_path)
|
41
|
+
assert_no_current_path(before_path.to_s)
|
42
42
|
|
43
43
|
assert_no_exceptions unless test_bot_skip?(:exceptions)
|
44
44
|
assert_authorization unless test_bot_skip?(:authorization)
|
@@ -78,6 +78,8 @@ module EffectiveTestBotFormHelper
|
|
78
78
|
stripe_iframe = find('iframe[name=stripe_checkout_app]')
|
79
79
|
assert stripe_iframe.present?, 'unable to find stripe iframe'
|
80
80
|
|
81
|
+
before_path = page.current_path
|
82
|
+
|
81
83
|
within_frame(stripe_iframe) do
|
82
84
|
fill_in('Card number', with: '4242424242424242')
|
83
85
|
fill_in('Expiry', with: "12#{Time.zone.now.year - 1999}")
|
@@ -85,7 +87,32 @@ module EffectiveTestBotFormHelper
|
|
85
87
|
find_submit.click
|
86
88
|
end
|
87
89
|
|
88
|
-
|
90
|
+
# This is a blocking selector that will wait until the page has changed url
|
91
|
+
assert_no_current_path(before_path.to_s, wait: Capybara.default_max_wait_time * 10)
|
92
|
+
|
93
|
+
if success_content
|
94
|
+
assert page.has_content?(success_content, wait: Capybara.default_max_wait_time * 10), "#{success_content} not found"
|
95
|
+
end
|
96
|
+
|
97
|
+
true
|
98
|
+
end
|
99
|
+
|
100
|
+
def submit_moneris_checkout(success_content: nil)
|
101
|
+
moneris_checkout_iframe = find('iframe[id=monerisCheckout-Frame]')
|
102
|
+
assert moneris_checkout_iframe.present?, 'unable to find moneris checkout iframe'
|
103
|
+
|
104
|
+
before_path = page.current_path
|
105
|
+
|
106
|
+
within_frame(moneris_checkout_iframe) do
|
107
|
+
fill_in('Cardholder Name', with: 'Test User')
|
108
|
+
fill_in('Card Number', with: '4242424242424242')
|
109
|
+
fill_in('MMYY', with: "12#{Time.zone.now.year - 1999}")
|
110
|
+
fill_in('CVV', with: '123')
|
111
|
+
find_submit.click
|
112
|
+
end
|
113
|
+
|
114
|
+
# This is a blocking selector that will wait until the page has changed url
|
115
|
+
assert_no_current_path(before_path.to_s, wait: Capybara.default_max_wait_time * 10)
|
89
116
|
|
90
117
|
if success_content
|
91
118
|
assert page.has_content?(success_content, wait: Capybara.default_max_wait_time * 10), "#{success_content} not found"
|
@@ -152,7 +179,8 @@ module EffectiveTestBotFormHelper
|
|
152
179
|
|
153
180
|
if label.present?
|
154
181
|
submit = (find("input[type='submit'][value='#{label}'],button[type='submit'][value='#{label}']", match: :first) rescue nil)
|
155
|
-
submit ||= find(:link_or_button, label, match: :first)
|
182
|
+
submit ||= (find(:link_or_button, label, match: :first) rescue nil)
|
183
|
+
submit ||= all('a', text: label).first
|
156
184
|
|
157
185
|
if last
|
158
186
|
submit = all("input[type='submit'][value='#{label}'],button[type='submit'][value='#{label}']").last
|
@@ -105,7 +105,8 @@ module EffectiveTestBotTestHelper
|
|
105
105
|
end
|
106
106
|
|
107
107
|
def assigns(key = nil)
|
108
|
-
assigns = (page.evaluate_script('window.effective_test_bot.assigns') rescue nil)
|
108
|
+
assigns = (page.evaluate_script('window.effective_test_bot.assigns') rescue nil)
|
109
|
+
assigns = {} unless assigns.kind_of?(Hash)
|
109
110
|
key ? assigns[key.to_s] : assigns
|
110
111
|
end
|
111
112
|
|
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.
|
4
|
+
version: 1.3.13
|
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-
|
11
|
+
date: 2022-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|