workarea-storefront 3.4.28 → 3.4.33

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: ae8b669c2fe5a70bc129d2f6a792f9e78521e9c3e20ff4f1b5cb5738e6e66eec
4
- data.tar.gz: 3aa1a3f539fdc0a5703a87a327202497f38b4667c5dfb41c37d31fcf70a919f4
3
+ metadata.gz: dcac4ee32d4ddd3db748a2c27c1fda6044368abd8e942070aa72c26d6a4918ca
4
+ data.tar.gz: d35441229e30d7b901c43b61ea4029614311a23690da09df9d88f9c68db81903
5
5
  SHA512:
6
- metadata.gz: aa3c7b3335fc41d2c298c05cdff7359a71cf6183226633e940ba5bcaa8b1a3eb72fef1b5965c5f7279f6be753239848258c591b7ea19f3699b9b640d69a9c206
7
- data.tar.gz: f10111df08b0443327a2be38ec8bdb6bf63f6f29a88a28675d48d7dc8af2b31a7f9151ca8b69da948ba171c085c2f9a1f83b6e682241837cb44eab510983fb4d
6
+ metadata.gz: 07e9ed88b98017f3cb99692d9c42ff6ad459fec2f76dcefebeb6849d438da6a0f4b386fbbfd563ad997ad39d1401b2eb023b757c286841e31bc330d1b2615192
7
+ data.tar.gz: fe288ccc2b2d9a5aad433380cdd777eb7c92fbaae6a310aa8c3ac4fd69659609843f2d2baeea2375cda947b677b287f748b3e04e9e7d2d9948302eefb232f7ab
@@ -8,7 +8,11 @@ module Workarea
8
8
 
9
9
  def edit
10
10
  reset = User::PasswordReset.find_by(token: params[:token]) rescue nil
11
- redirect_to forgot_password_path unless reset
11
+
12
+ unless reset
13
+ flash[:error] = t('workarea.storefront.flash_messages.password_reset_expired')
14
+ redirect_to forgot_password_path
15
+ end
12
16
  end
13
17
 
14
18
  def create
@@ -27,7 +27,7 @@ module Workarea
27
27
 
28
28
  def search_query
29
29
  @search_query ||= Search::CategoryBrowse.new(
30
- options.merge(
30
+ options.except(:per_page).merge(
31
31
  category_ids: [model.id],
32
32
  rules: model.product_rules,
33
33
  terms_facets: terms_facets - %w(category),
@@ -1,7 +1,7 @@
1
1
  = append_partials('storefront.fulfillment_shipped_mailer.top')
2
2
 
3
3
  - content_for :preheader_text do
4
- = t('workarea.storefront.email.order_cancellation.heading', order_id: @order.id)
4
+ = t('workarea.storefront.email.order_shipped.heading', order_id: @order.id)
5
5
 
6
6
  %tr
7
7
  %td
@@ -10,6 +10,8 @@
10
10
  .product-prices.product-prices--details{ itemprop: 'offers', itemscope: true, itemtype: 'http://schema.org/Offer' }
11
11
  = render 'workarea/storefront/products/pricing', product: product
12
12
 
13
+ = append_partials('storefront.product_pricing_details', product: product)
14
+
13
15
  - if product.description.present?
14
16
  .product-details__description
15
17
  %p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
@@ -10,6 +10,8 @@
10
10
  .product-prices.product-prices--details{ itemprop: 'offers', itemscope: true, itemtype: 'http://schema.org/Offer' }
11
11
  = render 'workarea/storefront/products/pricing', product: product
12
12
 
13
+ = append_partials('storefront.product_pricing_details', product: product)
14
+
13
15
  - if product.description.present?
14
16
  .product-details__description
15
17
  %p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
@@ -201,13 +201,14 @@ en:
201
201
  credit_card_update_error: There were errors updating your credit card.
202
202
  credit_card_removed: Your credit card has been removed.
203
203
  password_reset_expired: This password reset is expired.
204
- password_reset_email_sent: If a valid e-mail address was entered, instructions to reset your password have been sent to "%{email}"
204
+ password_reset_email_sent: If a valid email address was entered, instructions to reset your password have been sent to "%{email}"
205
205
  password_reset: Your password has been reset.
206
206
  old_password_invalid: Your old password is not valid.
207
207
  password_required: Password is required.
208
208
  items_required: You must add an item to your cart to checkout
209
209
  order_custom_pricing: Your cart has custom pricing, you cannot edit the contents of your cart.
210
- no_available_shipping_options: There are no available shipping options for your shipping adddress.
210
+ no_available_shipping_options: There are no available shipping options for your shipping address.
211
+ download_unavailable: This download is no longer available. Contact customer support for more information.
211
212
 
212
213
  forms:
213
214
  required: '*'
@@ -16,6 +16,16 @@ module Workarea
16
16
  get storefront.category_path(create_category(active: false))
17
17
  assert(response.ok?)
18
18
  end
19
+
20
+ def test_not_accepting_per_page_param
21
+ products = [create_product, create_product]
22
+ category = create_category(product_ids: products.map(&:id))
23
+
24
+ get storefront.category_path(category, page: 1, per_page: 1)
25
+ assert(response.ok?)
26
+ assert_includes(response.body, storefront.product_path(products.first))
27
+ assert_includes(response.body, storefront.product_path(products.second))
28
+ end
19
29
  end
20
30
  end
21
31
  end
@@ -123,6 +123,16 @@ module Workarea
123
123
  assert_includes(response.body, 'Foo A')
124
124
  assert_includes(response.body, 'Foo B')
125
125
  end
126
+
127
+ def test_not_accepting_per_page_param
128
+ one = create_product(name: 'Foo A')
129
+ two = create_product(name: 'Foo B')
130
+
131
+ get storefront.search_path(q: 'foo', page: 1, per_page: 1)
132
+ assert(response.ok?)
133
+ assert_includes(response.body, storefront.product_path(one))
134
+ assert_includes(response.body, storefront.product_path(two))
135
+ end
126
136
  end
127
137
  end
128
138
  end
@@ -31,6 +31,7 @@ module Workarea
31
31
 
32
32
  def test_handles_a_missing_password_reset
33
33
  get storefront.reset_password_path(token: 'foo')
34
+ assert(flash[:error].present?)
34
35
  assert_redirected_to(storefront.forgot_password_path)
35
36
  end
36
37
 
@@ -42,6 +43,24 @@ module Workarea
42
43
  assert(flash[:error].present?)
43
44
  assert(response.redirect?)
44
45
  end
46
+
47
+ def test_expired_resets
48
+ post storefront.forgot_password_path, params: { email: 'passwords@workarea.com' }
49
+ first = User::PasswordReset.desc(:created_at).first
50
+
51
+ get storefront.reset_password_path(token: first.token)
52
+ assert(response.ok?)
53
+
54
+ post storefront.forgot_password_path, params: { email: 'passwords@workarea.com' }
55
+ second = User::PasswordReset.desc(:created_at).first
56
+
57
+ get storefront.reset_password_path(token: second.token)
58
+ assert(response.ok?)
59
+
60
+ get storefront.reset_password_path(token: first.token)
61
+ assert(flash[:error].present?)
62
+ assert_redirected_to(storefront.forgot_password_path)
63
+ end
45
64
  end
46
65
  end
47
66
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-storefront
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.28
4
+ version: 3.4.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Crouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-03 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.4.28
19
+ version: 3.4.33
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.4.28
26
+ version: 3.4.33
27
27
  description: Provides user-facing ecommerce storefront functionality for the Workarea
28
28
  Commerce Platform.
29
29
  email:
@@ -736,7 +736,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
736
736
  - !ruby/object:Gem::Version
737
737
  version: '0'
738
738
  requirements: []
739
- rubygems_version: 3.0.6
739
+ rubygems_version: 3.0.3
740
740
  signing_key:
741
741
  specification_version: 4
742
742
  summary: Storefront for the Workarea Commerce Platform