solidus_frontend 2.5.0.beta2 → 2.5.0.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_frontend might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4d6733bbc6df7e5eb0f70e4cfdec6e6a932cc59665d9babf9e6b2fdf2bf26c9
4
- data.tar.gz: 38a552d07ee3008213d1be66b4b3c63575d60bdf21d692dded95201e4f662971
3
+ metadata.gz: afcc84b1a77998f966e9566e8d59f26970b0f5ef04298f2f14110eecf20f249d
4
+ data.tar.gz: 551753a14ed1cbc435237a065aa43697fd249582c2b6d5f821d9300ead4b1e60
5
5
  SHA512:
6
- metadata.gz: 259293d584c19a0dc31e43b840e6427904c0ebdce0eb5c072dba9472d912683e1dae9234623b913475bfb2e71085c7dcd33ea011e79b8e83d0823b8299b91b68
7
- data.tar.gz: 5bf2a1a6ff188e7b7e48ce9bb8206e316ab9134921d1513132ce1474e60d1c871dea9fe46a5908c9b28c27f1ccad465922ca10895187f42b5b98f61a6e2c720c
6
+ metadata.gz: 88e80456f440c19062e49df87c7cbd963dca27e546a6fb69bf1b9c07036d69732e31c508883733acbd3eb8600f7509e73a02e6983bb392726bfddff66654a71f
7
+ data.tar.gz: 1fde497b602c484be15d6e8cf0c3a11b008c64c629ce37651db7e490cef080f2f6a053d6c41711407f640143849badc2aadadf832dec43154bed3e8e560c1a3f
@@ -32,9 +32,11 @@
32
32
  </div>
33
33
  <%= link_to truncate(product.name, length: 50), url, class: 'info', itemprop: "name", title: product.name %>
34
34
  <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
35
- <span class="price selling" itemprop="price" content="<%= product.price_for(current_pricing_options).to_d %>">
36
- <%= display_price(product) %>
37
- </span>
35
+ <% if price = product.price_for(current_pricing_options) %>
36
+ <span class="price selling" itemprop="price" content="<%= price.to_d %>">
37
+ <%= price.to_html %>
38
+ </span>
39
+ <% end %>
38
40
  <span itemprop="priceCurrency" content="<%= current_pricing_options.currency %>"></span>
39
41
  </span>
40
42
  <% end %>
@@ -269,6 +269,14 @@ describe "Visiting Products", type: :feature, inaccessible: true do
269
269
  expect(page).not_to have_content "add-to-cart-button"
270
270
  end
271
271
 
272
+ it "should be able to list products without a price" do
273
+ product = FactoryBot.create(:base_product, description: nil, name: 'Sample', price: '19.99')
274
+ Spree::Config.currency = "CAN"
275
+ Spree::Config.show_products_without_price = true
276
+ visit spree.products_path
277
+ expect(page).to have_content(product.name)
278
+ end
279
+
272
280
  it "should return the correct title when displaying a single product" do
273
281
  product = Spree::Product.find_by(name: "Ruby on Rails Baseball Jersey")
274
282
  click_link product.name
@@ -132,4 +132,25 @@ describe "viewing products", type: :feature, inaccessible: true do
132
132
  expect(tmp.sort!).to eq(["Ruby on Rails Bag", "Ruby on Rails Tote"])
133
133
  end
134
134
  end
135
+
136
+ # Regression test for https://github.com/solidusio/solidus/issues/2602
137
+ context "root taxon page" do
138
+ it "shows taxon previews" do
139
+ visit spree.nested_taxons_path(taxonomy.root)
140
+
141
+ expect(page).to have_css('ul.product-listing li', count: 2)
142
+ expect(page).to have_content("Superman T-Shirt", count: 2)
143
+ end
144
+
145
+ context "with prices in other currency" do
146
+ before { Spree::Price.update_all(currency: "CAD") }
147
+
148
+ it "shows no products" do
149
+ visit spree.nested_taxons_path(taxonomy.root)
150
+
151
+ expect(page).to have_css('ul.product-listing li', count: 0)
152
+ expect(page).to have_no_content("Superman T-Shirt")
153
+ end
154
+ end
155
+ end
135
156
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0.beta2
4
+ version: 2.5.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-20 00:00:00.000000000 Z
11
+ date: 2018-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.5.0.beta2
19
+ version: 2.5.0.rc1
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: 2.5.0.beta2
26
+ version: 2.5.0.rc1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: solidus_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 2.5.0.beta2
33
+ version: 2.5.0.rc1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 2.5.0.beta2
40
+ version: 2.5.0.rc1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: canonical-rails
43
43
  requirement: !ruby/object:Gem::Requirement