effective_test_bot 1.7.4 → 1.7.6
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 +4 -4
- data/lib/effective_test_bot/version.rb +1 -1
- data/test/concerns/test_botable/devise_dsl.rb +1 -1
- data/test/support/effective_test_bot_form_faker.rb +1 -2
- data/test/support/effective_test_bot_form_helper.rb +31 -0
- data/test/test_bot/system/environment_test.rb +3 -3
- 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: 542b5ab2e8b8031550190cb4b108e828b1e405874e8ad88922a6f6185c1b12ac
|
|
4
|
+
data.tar.gz: '00687b6785a8490709ce9c5632903a913be39d56c7f4ce805b9edcc6cd4a0edf'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f14bab5260dc566dbbfa585c84448efa18e72da0504d46202625fa64e7409167f658d08f61d6bf65cf01257ac691364cd2790f5533119138c879beb3bd8bddbd
|
|
7
|
+
data.tar.gz: a2f335295318080c8bcf582ae7bab1406ae810dc21e24d65ffefcc667c4ee615b966f5b2171325a78c4f67d624c72cb7a7c4e99f13e3047a05b910e7ffa95b7c
|
|
@@ -33,7 +33,7 @@ module TestBotable
|
|
|
33
33
|
# Instance Methods - Call me from within a test
|
|
34
34
|
def devise_action_test(test:, **options)
|
|
35
35
|
options[:email] ||= "unique-#{Time.zone.now.to_i}@example.com"
|
|
36
|
-
options[:password] ||= '!
|
|
36
|
+
options[:password] ||= '!SecurePassword123'
|
|
37
37
|
options[:username] ||= 'unique-username'
|
|
38
38
|
options[:login] ||= 'unique-login'
|
|
39
39
|
options[:user] ||= User.new
|
|
@@ -107,8 +107,7 @@ module EffectiveTestBotFormFaker
|
|
|
107
107
|
|
|
108
108
|
when 'input_password'
|
|
109
109
|
# Use the same password throughout a single test. Allows passwords and password_confirmations to match.
|
|
110
|
-
@filled_password_fields ||= Faker::Internet.password
|
|
111
|
-
|
|
110
|
+
@filled_password_fields ||= LETTERS.sample(10).join + DIGITS.sample(6).join + Faker::Internet.password
|
|
112
111
|
when 'input_radio'
|
|
113
112
|
value_for_input_radio_field(field, fill_value)
|
|
114
113
|
|
|
@@ -136,6 +136,37 @@ module EffectiveTestBotFormHelper
|
|
|
136
136
|
true
|
|
137
137
|
end
|
|
138
138
|
|
|
139
|
+
def submit_helcim_checkout(success_content: nil)
|
|
140
|
+
# Click Pay by Credit Card button
|
|
141
|
+
within('.effective-helcim-checkout') { find('a#helcim-checkout-button').click }
|
|
142
|
+
|
|
143
|
+
# Find the iframe
|
|
144
|
+
helcim_checkout_iframe = find('iframe#helcimPayIframe')
|
|
145
|
+
assert helcim_checkout_iframe.present?, 'unable to find helcim iframe'
|
|
146
|
+
|
|
147
|
+
before_path = page.current_path
|
|
148
|
+
|
|
149
|
+
within_frame(helcim_checkout_iframe) do
|
|
150
|
+
assert_content 'Card number'
|
|
151
|
+
find('input[id=checkout-card-fields__number]').set("4242424242424242")
|
|
152
|
+
find('input[id=checkout-card-fields__expiry-date]').set("12#{Time.zone.now.year - 1999}")
|
|
153
|
+
(find('input[id=checkout-card-fields__security-number]') rescue nil).try(:set, "123")
|
|
154
|
+
find('button.hds-a-button').click
|
|
155
|
+
|
|
156
|
+
assert_no_js_errors
|
|
157
|
+
refute_content 'Payment not completed'
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# This is a blocking selector that will wait until the page has changed url
|
|
161
|
+
assert_no_current_path(before_path.to_s, wait: Capybara.default_max_wait_time * 10)
|
|
162
|
+
|
|
163
|
+
if success_content
|
|
164
|
+
assert page.has_content?(success_content, wait: Capybara.default_max_wait_time * 10), "#{success_content} not found"
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
true
|
|
168
|
+
end
|
|
169
|
+
|
|
139
170
|
def submit_moneris_checkout(success_content: nil)
|
|
140
171
|
moneris_checkout_iframe = find('iframe[id=monerisCheckout-Frame]')
|
|
141
172
|
assert moneris_checkout_iframe.present?, 'unable to find moneris checkout iframe'
|
|
@@ -32,7 +32,7 @@ module TestBot
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
test '04: activerecord can save a resource' do
|
|
35
|
-
User.new(email: 'unique@testbot.com', password: '!
|
|
35
|
+
User.new(email: 'unique@testbot.com', password: '!SecurePassword123', password_confirmation: '!SecurePassword123').save(validate: false)
|
|
36
36
|
assert_equal (@@original_users_count + 1), User.unscoped.count
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -50,10 +50,10 @@ module TestBot
|
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
test '08: capybara database connection is shared' do
|
|
53
|
-
user = User.new(email: 'unique@testbot.com', password: '!
|
|
53
|
+
user = User.new(email: 'unique@testbot.com', password: '!SecurePassword123', password_confirmation: '!SecurePassword123')
|
|
54
54
|
user.save!(validate: false)
|
|
55
55
|
|
|
56
|
-
without_screenshots { sign_in_manually(user, '!
|
|
56
|
+
without_screenshots { sign_in_manually(user, '!SecurePassword123') }
|
|
57
57
|
assert_signed_in(message: "expected successful devise manual sign in with user created in this test.\nTry using one of the ActiveRecord shared_connection snippets in test/test_helper.rb")
|
|
58
58
|
end
|
|
59
59
|
|
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.7.
|
|
4
|
+
version: 1.7.6
|
|
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:
|
|
11
|
+
date: 2026-01-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|