spree_dev_tools 0.0.5 → 0.0.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59a8e1c04b79af3d209068a282a6ee72562a2b839ffeb009afbf23811ddbb587
|
4
|
+
data.tar.gz: d12866a93e336567b8801bfaa915668f5177ed53cf7658ad51343df4eed37d30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54d7776d4c9b0896a0ebb6d96595503f977d69e32a3fc7d054137f5a6b13ebfadb82ab39f8369d60c02a93d110ad87131dc1231d0a80ba1e4e92e939365d5a80
|
7
|
+
data.tar.gz: 738b0426f56e859e97f28f5ad2a9d6623eabcb3db1a6ff12992f457deb856a30be0ecb6f91668a3cce51aabd9d0581a2604bc94f4b6b98fd736965d01fe91e90
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Spree
|
2
|
+
module TestingSupport
|
3
|
+
module AuthHelpers
|
4
|
+
def log_in(email:, password:, remember_me: true)
|
5
|
+
visit spree.login_path
|
6
|
+
|
7
|
+
fill_in 'Email', with: email
|
8
|
+
fill_in 'Password', with: password
|
9
|
+
|
10
|
+
# Regression test for #1257
|
11
|
+
first('label', text: 'Remember me').click if remember_me
|
12
|
+
click_button 'Log in'
|
13
|
+
|
14
|
+
expect(page).to have_content 'Logged in successfully'
|
15
|
+
end
|
16
|
+
|
17
|
+
def log_out
|
18
|
+
show_user_menu
|
19
|
+
click_link 'LOG OUT'
|
20
|
+
|
21
|
+
expect(page).to have_content 'Signed out successfully'
|
22
|
+
end
|
23
|
+
|
24
|
+
def show_user_menu
|
25
|
+
find("button[aria-label='Show user menu']").click
|
26
|
+
end
|
27
|
+
|
28
|
+
def show_user_account
|
29
|
+
within '#nav-bar' do
|
30
|
+
show_user_menu
|
31
|
+
click_link 'MY ACCOUNT'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Spree
|
2
|
+
module TestingSupport
|
3
|
+
module CheckoutHelpers
|
4
|
+
def fill_in_address
|
5
|
+
address = 'order_bill_address_attributes'
|
6
|
+
fill_in "#{address}_firstname", with: 'Ryan'
|
7
|
+
fill_in "#{address}_lastname", with: 'Bigg'
|
8
|
+
fill_in "#{address}_address1", with: '143 Swan Street'
|
9
|
+
fill_in "#{address}_city", with: 'Richmond'
|
10
|
+
select country.name, from: "#{address}_country_id"
|
11
|
+
select state.name, from: "#{address}_state_id"
|
12
|
+
fill_in "#{address}_zipcode", with: '12345'
|
13
|
+
fill_in "#{address}_phone", with: '(555) 555-5555'
|
14
|
+
end
|
15
|
+
|
16
|
+
def fill_in_credit_card_info(invalid: false)
|
17
|
+
fill_in 'name_on_card', with: 'Spree Commerce'
|
18
|
+
fill_in 'card_number', with: invalid ? '123' : '4111 1111 1111 1111'
|
19
|
+
fill_in 'card_expiry', with: '12 / 24'
|
20
|
+
fill_in 'card_code', with: '123'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/spree_dev_tools.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_dev_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Spark Solutions
|
@@ -282,14 +282,14 @@ dependencies:
|
|
282
282
|
requirements:
|
283
283
|
- - "~>"
|
284
284
|
- !ruby/object:Gem::Version
|
285
|
-
version: 4.
|
285
|
+
version: 4.3.0
|
286
286
|
type: :runtime
|
287
287
|
prerelease: false
|
288
288
|
version_requirements: !ruby/object:Gem::Requirement
|
289
289
|
requirements:
|
290
290
|
- - "~>"
|
291
291
|
- !ruby/object:Gem::Version
|
292
|
-
version: 4.
|
292
|
+
version: 4.3.0
|
293
293
|
description: Spree Developer Tools
|
294
294
|
email: we@sparksolutions.co
|
295
295
|
executables: []
|
@@ -301,6 +301,8 @@ files:
|
|
301
301
|
- Gemfile
|
302
302
|
- LICENSE
|
303
303
|
- README.md
|
304
|
+
- lib/spree/testing_support/auth_helpers.rb
|
305
|
+
- lib/spree/testing_support/checkout_helpers.rb
|
304
306
|
- lib/spree_dev_tools.rb
|
305
307
|
- lib/spree_dev_tools/rspec/spec_helper.rb
|
306
308
|
- lib/spree_dev_tools/rspec/support/authentication_helpers.rb
|