jiffyshirts_spree_reviews 2.3.1.1 → 2.3.1.2
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c5d9322043c8dc77bb4a18c7280421c6fd8fdea
|
4
|
+
data.tar.gz: cd762d9fe2651a3586ac5f40c98eefedd7890eb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a56b4527f5be701ecce237b67dacaa0b3c4d63f57d3668e8e7b9d87658256449a5fb5b6c945119db6927b3c71fcc2374febf79bd06c13a26d296185dbf045a5
|
7
|
+
data.tar.gz: dab437a2e5d0e4366a9e82d0ec5d0732a348e5f22c4e11f4d2021d5dddd3d6417aaa145aad9c24503bd743db9092a58dbbe7f9122b4c8c5629874386e5bcbe3b
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.platform = Gem::Platform::RUBY
|
3
3
|
s.name = 'jiffyshirts_spree_reviews'
|
4
|
-
s.version = '2.3.1.
|
4
|
+
s.version = '2.3.1.2'
|
5
5
|
s.summary = 'Basic review and ratings facility for Spree'
|
6
6
|
s.authors = ['CrowdInt']
|
7
7
|
s.description = s.summary
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jiffyshirts_spree_reviews
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.1.
|
4
|
+
version: 2.3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CrowdInt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -224,7 +224,6 @@ files:
|
|
224
224
|
- app/models/spree/review.rb
|
225
225
|
- app/models/spree/reviews_ability.rb
|
226
226
|
- app/models/spree/reviews_configuration.rb
|
227
|
-
- app/overrides/add_reviews_after_product_properties.rb
|
228
227
|
- app/overrides/add_reviews_tab_to_admin.rb
|
229
228
|
- app/overrides/add_reviews_to_admin_configuration_sidebar.rb
|
230
229
|
- app/overrides/fix_highlighting_of_products_tab.rb
|
@@ -286,7 +285,6 @@ files:
|
|
286
285
|
- spec/factories/feedback_review_factory.rb
|
287
286
|
- spec/factories/review_factory.rb
|
288
287
|
- spec/features/admin_spec.rb
|
289
|
-
- spec/features/reviews_spec.rb
|
290
288
|
- spec/helpers/review_helper_spec.rb
|
291
289
|
- spec/models/feedback_review_spec.rb
|
292
290
|
- spec/models/product_spec.rb
|
@@ -329,7 +327,6 @@ test_files:
|
|
329
327
|
- spec/factories/feedback_review_factory.rb
|
330
328
|
- spec/factories/review_factory.rb
|
331
329
|
- spec/features/admin_spec.rb
|
332
|
-
- spec/features/reviews_spec.rb
|
333
330
|
- spec/helpers/review_helper_spec.rb
|
334
331
|
- spec/models/feedback_review_spec.rb
|
335
332
|
- spec/models/product_spec.rb
|
@@ -1,106 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
feature 'Reviews', js: true do
|
4
|
-
given!(:someone) { create(:user, email: 'ryan@spree.com') }
|
5
|
-
given!(:review) { create(:review, :approved, user: someone) }
|
6
|
-
|
7
|
-
background do
|
8
|
-
Spree::Reviews::Config.include_unapproved_reviews = false
|
9
|
-
end
|
10
|
-
|
11
|
-
context 'product with no review' do
|
12
|
-
given!(:product_no_reviews) { create(:product) }
|
13
|
-
scenario 'informs that no reviews has been written yet' do
|
14
|
-
visit spree.product_path(product_no_reviews)
|
15
|
-
expect(page).to have_text Spree.t(:no_reviews_available)
|
16
|
-
end
|
17
|
-
|
18
|
-
# Regression test for #103
|
19
|
-
context "shows correct number of previews" do
|
20
|
-
background do
|
21
|
-
FactoryGirl.create_list :review, 3, product: product_no_reviews, approved: true
|
22
|
-
Spree::Reviews::Config[:preview_size] = 2
|
23
|
-
end
|
24
|
-
|
25
|
-
scenario "displayed reviews are limited by the set preview size" do
|
26
|
-
visit spree.product_path(product_no_reviews)
|
27
|
-
expect(page.all(".review").count).to eql(2)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
context 'when anonymous user' do
|
33
|
-
background do
|
34
|
-
Spree::Reviews::Config.require_login = true
|
35
|
-
end
|
36
|
-
|
37
|
-
context 'visit product with review' do
|
38
|
-
background do
|
39
|
-
visit spree.product_path(review.product)
|
40
|
-
end
|
41
|
-
|
42
|
-
scenario 'should see review title' do
|
43
|
-
expect(page).to have_text review.title
|
44
|
-
end
|
45
|
-
|
46
|
-
scenario 'can not create review' do
|
47
|
-
expect(page).not_to have_text Spree.t(:write_your_own_review)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
context 'when logged in user' do
|
53
|
-
given!(:user) { create(:user) }
|
54
|
-
|
55
|
-
background do
|
56
|
-
sign_in_as! user
|
57
|
-
end
|
58
|
-
|
59
|
-
context 'visit product with review' do
|
60
|
-
background do
|
61
|
-
visit spree.product_path(review.product)
|
62
|
-
end
|
63
|
-
|
64
|
-
scenario 'can see review title' do
|
65
|
-
expect(page).to have_text review.title
|
66
|
-
end
|
67
|
-
|
68
|
-
scenario 'can see create new review button' do
|
69
|
-
expect(page).to have_text Spree.t(:write_your_own_review)
|
70
|
-
end
|
71
|
-
|
72
|
-
scenario 'can create new review' do
|
73
|
-
click_on Spree.t(:write_your_own_review)
|
74
|
-
|
75
|
-
expect(page).to have_text Spree.t(:leave_us_a_review_for, name: review.product.name)
|
76
|
-
|
77
|
-
within '#new_review' do
|
78
|
-
click_star(3)
|
79
|
-
|
80
|
-
fill_in 'review_name', with: user.email
|
81
|
-
fill_in 'review_title', with: 'Great product!'
|
82
|
-
fill_in 'review_review', with: 'Some big review text..'
|
83
|
-
click_on 'Submit your review'
|
84
|
-
end
|
85
|
-
|
86
|
-
expect(page.find('.flash.notice', text: Spree.t(:review_successfully_submitted))).to be_truthy
|
87
|
-
expect(page).not_to have_text 'Some big review text..'
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
private
|
93
|
-
|
94
|
-
def sign_in_as!(user)
|
95
|
-
visit spree.login_path
|
96
|
-
within '#new_spree_user' do
|
97
|
-
fill_in 'Email', with: user.email
|
98
|
-
fill_in 'Password', with: user.password
|
99
|
-
end
|
100
|
-
click_button 'Login'
|
101
|
-
end
|
102
|
-
|
103
|
-
def click_star(num)
|
104
|
-
page.all(:xpath, "//a[@title='#{num} stars']")[0].click
|
105
|
-
end
|
106
|
-
end
|