workarea-usaepay 1.0.22 → 1.0.23

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: cd74aabd2817a36fc049cc39de11dccf99bc3c5f454e875bff188ba6f9b025e2
4
- data.tar.gz: 4884322299c4c860bdd41a15bdc7fde298c17a2491ba148b5a27ae5ae3400900
3
+ metadata.gz: 9a9838bb33de37fbad345fa70f4a4a79e38608b22688a8de616a8a307226902b
4
+ data.tar.gz: c4dc0075368f4b7eecbc8dceeafee0600167a422fbd73c6f500527f328549db2
5
5
  SHA512:
6
- metadata.gz: 331216b24e79bdf8c3c756e5452642e6701359c25324e30d35ff335ee57348fb9278502e89c1f5497055c9dec0a9538ddc20c3f5c6be8ae95ffb214612db0666
7
- data.tar.gz: d5d0f182935bd9f05f958818caf8437f8cfd4adcb6d2ef5883ab6be8394e69d37a0539652dce516a19a9eee6d5b59e02ec2a45105076a85dc78d26faf44fdda9
6
+ metadata.gz: 46431e7b62b228a9294d65487594ffd7f2c68956e2d2500292fcdbbd360a3a8aa78861beb77e583080d37a86056fbdb72693a00fa1d06e4c5a2f394ca8c65445
7
+ data.tar.gz: 4b06d211e3785331926550978aa356f42399bd21c64542bf826d425ce9631e488e4c4b9bc95782c832c81b7d58d153835dae74b31c54ca40d042a5ed0cefce8a
@@ -1,5 +1,5 @@
1
1
  module Workarea
2
2
  module Usaepay
3
- VERSION = "1.0.22".freeze
3
+ VERSION = "1.0.23".freeze
4
4
  end
5
5
  end
@@ -0,0 +1,64 @@
1
+ require 'test_helper'
2
+
3
+ module Workarea
4
+ decorate Storefront::CreditCardsSystemTest, with: :murals_your_way do
5
+ def test_managing_credit_cards
6
+ visit storefront.login_path
7
+
8
+ within '#login_form' do
9
+ fill_in 'email', with: 'bcrouse@workarea.com'
10
+ fill_in 'password', with: 'W3bl1nc!'
11
+ click_button t('workarea.storefront.users.login')
12
+ end
13
+
14
+ visit storefront.new_users_credit_card_path
15
+
16
+ within '#credit_card_form' do
17
+ fill_in 'credit_card[number]', with: '4111111111111111'
18
+ fill_in 'credit_card[first_name]', with: 'Ben'
19
+ fill_in 'credit_card[last_name]', with: 'Crouse'
20
+ select '1', from: 'credit_card[month]'
21
+ select @year, from: 'credit_card[year]'
22
+ fill_in 'credit_card[cvv]', with: '999'
23
+ click_button t('workarea.storefront.forms.save')
24
+ end
25
+
26
+ assert(page.has_content?('Success'))
27
+ assert(page.has_content?('ending in 1111'))
28
+ assert(page.has_content?('1'))
29
+ assert(page.has_content?(@year))
30
+
31
+ click_link t('workarea.storefront.forms.edit')
32
+
33
+ within '#credit_card_form' do
34
+ select '2', from: 'credit_card[month]'
35
+ fill_in 'credit_card[cvv]', with: '999'
36
+ click_button t('workarea.storefront.forms.save')
37
+ end
38
+
39
+ assert(page.has_content?('Success'))
40
+ assert(page.has_content?('ending in 1111'))
41
+ assert(page.has_content?('2'))
42
+ assert(page.has_content?(@year))
43
+
44
+ click_button t('workarea.storefront.forms.delete')
45
+
46
+ assert(page.has_no_content?('ending in 1111'))
47
+
48
+ visit storefront.new_users_credit_card_path
49
+
50
+ within '#credit_card_form' do
51
+ fill_in 'credit_card[number]', with: '40120000333304'
52
+ fill_in 'credit_card[first_name]', with: 'Ben'
53
+ fill_in 'credit_card[last_name]', with: 'Crouse'
54
+ select '1', from: 'credit_card[month]'
55
+ select @year, from: 'credit_card[year]'
56
+ fill_in 'credit_card[cvv]', with: '999'
57
+ click_button t('workarea.storefront.forms.save')
58
+ end
59
+
60
+ refute(page.has_content?('Success'))
61
+ assert(page.has_content?(I18n.t('workarea.payment.store_credit_card_failure')))
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,64 @@
1
+ require 'test_helper'
2
+
3
+ module Workarea
4
+ decorate Storefront::DownloadSystemTest, with: :murals_your_way do
5
+ def test_checking_out_with_downloadable_product
6
+ setup_checkout_specs
7
+
8
+ Order.first.items.delete_all
9
+
10
+ product = create_product(
11
+ name: 'Digital Product',
12
+ variants: [
13
+ { sku: 'SKU1', regular: 10.to_m, tax_code: '001' },
14
+ { sku: 'SKU2', regular: 15.to_m, tax_code: '001' }
15
+ ]
16
+ )
17
+
18
+ create_fulfillment_sku(id: 'SKU1', policy: :download, file: product_image_file)
19
+ create_fulfillment_sku(id: 'SKU2', policy: :download, file: product_image_file)
20
+
21
+ visit storefront.product_path(product)
22
+
23
+ within '.product-details__add-to-cart-form' do
24
+ select product.skus.first, from: 'sku'
25
+ click_button t('workarea.storefront.products.add_to_cart')
26
+ end
27
+
28
+ assert(page.has_content?('Success'))
29
+
30
+ start_guest_checkout
31
+
32
+ assert_current_path(storefront.checkout_addresses_path)
33
+
34
+ fill_in_email
35
+ fill_in_billing_address
36
+ click_button t('workarea.storefront.checkouts.continue_to_payment')
37
+
38
+ assert_current_path(storefront.checkout_payment_path)
39
+ assert(page.has_content?('Success'))
40
+
41
+ fill_in_credit_card
42
+ click_button t('workarea.storefront.checkouts.place_order')
43
+
44
+ assert_current_path(storefront.checkout_confirmation_path)
45
+ assert(page.has_content?('Success'))
46
+ assert(page.has_content?(t('workarea.storefront.flash_messages.order_placed')))
47
+ assert(page.has_content?(Order.first.id))
48
+
49
+ assert(page.has_content?('1019 S. 47th St.'))
50
+ assert(page.has_content?('Philadelphia'))
51
+ assert(page.has_content?('PA'))
52
+ assert(page.has_content?('19143'))
53
+
54
+ assert(page.has_content?('Visa'))
55
+ assert(page.has_content?('1111'))
56
+
57
+ assert(page.has_content?('Digital Product'))
58
+ assert(page.has_content?('10.00'))
59
+ assert(page.has_content?('0.70'))
60
+ assert(page.has_content?('10.70'))
61
+ assert(page.has_content?(t('workarea.storefront.orders.download')))
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,38 @@
1
+ require 'test_helper'
2
+
3
+ module Workarea
4
+ decorate Storefront::GuestCheckoutSystemTest, with: :murals_your_way do
5
+ def test_creating_an_account
6
+ assert_current_path(storefront.checkout_addresses_path)
7
+ fill_in_email
8
+ fill_in_shipping_address
9
+ uncheck 'same_as_shipping'
10
+ fill_in_billing_address
11
+ click_button t('workarea.storefront.checkouts.continue_to_shipping')
12
+
13
+ assert_current_path(storefront.checkout_shipping_path)
14
+ assert(page.has_content?('Success'))
15
+ click_button t('workarea.storefront.checkouts.continue_to_payment')
16
+
17
+ assert_current_path(storefront.checkout_payment_path)
18
+ assert(page.has_content?('Success'))
19
+ fill_in_credit_card
20
+ click_button t('workarea.storefront.checkouts.place_order')
21
+
22
+ assert_current_path(storefront.checkout_confirmation_path)
23
+ fill_in 'password', with: 'W3bl1nc!'
24
+ check 'email_signup'
25
+ click_button t('workarea.storefront.users.create_account')
26
+
27
+ assert_current_path(storefront.users_account_path)
28
+
29
+ assert(page.has_content?('Success'))
30
+ assert(page.has_content?('Ben'))
31
+ assert(page.has_content?('Crouse'))
32
+ assert(page.has_content?(Order.first.id))
33
+ assert(page.has_content?('22 S. 3rd St.'))
34
+ assert(page.has_content?('1019 S. 47th St.'))
35
+ assert(page.has_content?('1111'))
36
+ end
37
+ end
38
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-usaepay
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.22
4
+ version: 1.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gunasekaran.Raja
@@ -104,7 +104,10 @@ files:
104
104
  - test/models/workarea/payment/credit_card_integration_test.decorator
105
105
  - test/support/workarea/usaepay_transaction_vcr_gateway.rb
106
106
  - test/system/workarea/admin/payment_transactions_system_test.decorator
107
- - test/system/workarea/storefront/account/credit_cards_system_test.decorator
107
+ - test/system/workarea/storefront/accounts/credit_cards_system_test.decorator
108
+ - test/system/workarea/storefront/credit_cards_system_test.decorator
109
+ - test/system/workarea/storefront/download_system_test.decorator
110
+ - test/system/workarea/storefront/guest_checkout_system_test.decorator
108
111
  - test/teaspoon_env.rb
109
112
  - test/test_helper.rb
110
113
  - workarea-usaepay.gemspec