effective_test_bot 1.3.12 → 1.3.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/effective_test_bot/version.rb +1 -1
- data/test/support/effective_test_bot_form_helper.rb +28 -1
- metadata +2 -2
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
|
@@ -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"
|
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
|