effective_test_bot 1.3.12 → 1.3.14

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: 82fbbd03c627e05a1ede295c3fd516bde033e423709f0a170a45c8deb91294dc
4
+ data.tar.gz: e53a0ffa4cd30f9e680b643eaefdd1788a44af1cd7d6f686a78211bcc2d544fb
5
5
  SHA512:
6
- metadata.gz: 4651bc832a47bdf0ed291fcddeb9bbfa04bdaff053c54ba9cc8ef6bf2903ccfd125751f04a30e481e5b69ae7ae14a3b4613e9006994120d71e134c6cab207097
7
- data.tar.gz: eccb4965b8d3a3e01a15bdd174815265e0a127948ceb6dc0aa7869500be5262eb6003bc7697759ef6d02d0352c85ca7b3dd2355a688c861540996c26f072d5ac
6
+ metadata.gz: 831d177cf0bb053a9627cc9be850ae07dc145189cd8503dc16c47a97569df022501aaddf51c1e982dcbaba0b05df8807f7b58fe532ce23a3822354bdd10e359f
7
+ data.tar.gz: f1a49af77206c74085a3ef466ae78a2b7040282fda7cb07a417005bdbfe1248b1aac76030a4455e06cb085227b0250265bfb2f23c4923045a45a7653c530a587
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '1.3.12'.freeze
2
+ VERSION = '1.3.14'.freeze
3
3
  end
@@ -367,7 +367,7 @@ module EffectiveTestBotFormFiller
367
367
  field['name'].presence,
368
368
  ("##{field['id']}" if field['id'].present?),
369
369
  field_name,
370
- (".#{field['class'].split(' ').join('.')}" if field['class'].present?)
370
+ (".#{field['class'].to_s.split(' ').join('.')}" if field['class'].present?)
371
371
  ].compact.join(' ')
372
372
  end
373
373
 
@@ -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.14
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: 2023-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails