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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 168ba420f05b70c4da7680017805d1c558cdb0eaf34c3785b0c4ecd97ff257e7
4
- data.tar.gz: e018ed74f5f1f594d54797b567bd9c9d95a582a7a5a84a466546ffb34b4818ab
3
+ metadata.gz: 8b3675728265e5d18bbd207f8b4c3d53bdd4721c35cf8392c0767c725a053c4d
4
+ data.tar.gz: a367c248ef3b4ffdc08976654fc1eb08a22632afb687cff9dd80da57be1e6852
5
5
  SHA512:
6
- metadata.gz: 4651bc832a47bdf0ed291fcddeb9bbfa04bdaff053c54ba9cc8ef6bf2903ccfd125751f04a30e481e5b69ae7ae14a3b4613e9006994120d71e134c6cab207097
7
- data.tar.gz: eccb4965b8d3a3e01a15bdd174815265e0a127948ceb6dc0aa7869500be5262eb6003bc7697759ef6d02d0352c85ca7b3dd2355a688c861540996c26f072d5ac
6
+ metadata.gz: b7e383be8de401862ec330dffbd6205bee1b16953a8a411125f11ea3781c21c0d0542d840bcca531171959193057b84b6447e80149914fa3127f1ea1d3303dec
7
+ data.tar.gz: 9615b1044a6d062729b3c04232d5b53a538596a3d667b6dccce7dab156c900b0466086ec6c72577c4537e3d76964d84949d56266b4565a741358d8b4ef1b2787
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '1.3.12'.freeze
2
+ VERSION = '1.3.13'.freeze
3
3
  end
@@ -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
- synchronize! # Doesn't seem to work
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.12
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-09-23 00:00:00.000000000 Z
11
+ date: 2022-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails