solidus_backend 1.0.2 → 1.0.3
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 +4 -4
- data/CHANGELOG.md +1 -0
- data/Gemfile +6 -0
- data/Rakefile +15 -0
- data/script/rails +9 -0
- data/solidus_backend.gemspec +28 -0
- data/spec/controllers/spree/admin/base_controller_spec.rb +24 -0
- data/spec/controllers/spree/admin/cancellations_controller_spec.rb +77 -0
- data/spec/controllers/spree/admin/customer_returns_controller_spec.rb +234 -0
- data/spec/controllers/spree/admin/general_settings_controller_spec.rb +41 -0
- data/spec/controllers/spree/admin/missing_products_controller_spec.rb +18 -0
- data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +80 -0
- data/spec/controllers/spree/admin/orders_controller_spec.rb +472 -0
- data/spec/controllers/spree/admin/payment_methods_controller_spec.rb +49 -0
- data/spec/controllers/spree/admin/payments_controller_spec.rb +175 -0
- data/spec/controllers/spree/admin/products_controller_spec.rb +45 -0
- data/spec/controllers/spree/admin/promotion_actions_controller_spec.rb +21 -0
- data/spec/controllers/spree/admin/promotion_codes_controller_spec.rb +18 -0
- data/spec/controllers/spree/admin/promotion_rules_controller_spec.rb +21 -0
- data/spec/controllers/spree/admin/promotions_controller_spec.rb +122 -0
- data/spec/controllers/spree/admin/refunds_controller_spec.rb +32 -0
- data/spec/controllers/spree/admin/reimbursements_controller_spec.rb +75 -0
- data/spec/controllers/spree/admin/reports_controller_spec.rb +134 -0
- data/spec/controllers/spree/admin/resource_controller_spec.rb +166 -0
- data/spec/controllers/spree/admin/return_authorizations_controller_spec.rb +226 -0
- data/spec/controllers/spree/admin/return_items_controller_spec.rb +27 -0
- data/spec/controllers/spree/admin/root_controller_spec.rb +41 -0
- data/spec/controllers/spree/admin/search_controller_spec.rb +104 -0
- data/spec/controllers/spree/admin/shipping_methods_controller_spec.rb +14 -0
- data/spec/controllers/spree/admin/stock_items_controller_spec.rb +50 -0
- data/spec/controllers/spree/admin/stock_locations_controller_spec.rb +41 -0
- data/spec/controllers/spree/admin/stock_transfers_controller_spec.rb +331 -0
- data/spec/controllers/spree/admin/store_credits_controller_spec.rb +309 -0
- data/spec/controllers/spree/admin/users_controller_spec.rb +236 -0
- data/spec/controllers/spree/admin/variants_controller_spec.rb +32 -0
- data/spec/features/admin/configuration/analytics_tracker_spec.rb +54 -0
- data/spec/features/admin/configuration/countries_spec.rb +22 -0
- data/spec/features/admin/configuration/general_settings_spec.rb +45 -0
- data/spec/features/admin/configuration/payment_methods_spec.rb +125 -0
- data/spec/features/admin/configuration/shipping_methods_spec.rb +64 -0
- data/spec/features/admin/configuration/states_spec.rb +64 -0
- data/spec/features/admin/configuration/stock_locations_spec.rb +50 -0
- data/spec/features/admin/configuration/tax_categories_spec.rb +56 -0
- data/spec/features/admin/configuration/tax_rates_spec.rb +30 -0
- data/spec/features/admin/configuration/taxonomies_spec.rb +52 -0
- data/spec/features/admin/configuration/zones_spec.rb +39 -0
- data/spec/features/admin/homepage_spec.rb +78 -0
- data/spec/features/admin/locale_spec.rb +30 -0
- data/spec/features/admin/orders/adjustments_promotions_spec.rb +53 -0
- data/spec/features/admin/orders/adjustments_spec.rb +126 -0
- data/spec/features/admin/orders/cancelling_and_resuming_spec.rb +48 -0
- data/spec/features/admin/orders/cancelling_inventory_spec.rb +48 -0
- data/spec/features/admin/orders/customer_details_spec.rb +163 -0
- data/spec/features/admin/orders/line_items_spec.rb +50 -0
- data/spec/features/admin/orders/listing_spec.rb +130 -0
- data/spec/features/admin/orders/log_entries_spec.rb +55 -0
- data/spec/features/admin/orders/new_order_spec.rb +185 -0
- data/spec/features/admin/orders/order_details_spec.rb +533 -0
- data/spec/features/admin/orders/payments_spec.rb +228 -0
- data/spec/features/admin/orders/risk_analysis_spec.rb +47 -0
- data/spec/features/admin/orders/shipments_spec.rb +65 -0
- data/spec/features/admin/payments/store_credits_spec.rb +21 -0
- data/spec/features/admin/products/edit/images_spec.rb +87 -0
- data/spec/features/admin/products/edit/products_spec.rb +66 -0
- data/spec/features/admin/products/edit/taxons_spec.rb +43 -0
- data/spec/features/admin/products/edit/variants_spec.rb +61 -0
- data/spec/features/admin/products/option_types_spec.rb +114 -0
- data/spec/features/admin/products/products_spec.rb +392 -0
- data/spec/features/admin/products/properties_spec.rb +139 -0
- data/spec/features/admin/products/prototypes_spec.rb +110 -0
- data/spec/features/admin/products/stock_management_spec.rb +82 -0
- data/spec/features/admin/products/variant_spec.rb +51 -0
- data/spec/features/admin/promotion_adjustments_spec.rb +220 -0
- data/spec/features/admin/promotions/tiered_calculator_spec.rb +69 -0
- data/spec/features/admin/reports_spec.rb +61 -0
- data/spec/features/admin/stock_transfer_spec.rb +86 -0
- data/spec/features/admin/store_credits_spec.rb +82 -0
- data/spec/features/admin/taxons_spec.rb +31 -0
- data/spec/features/admin/users_spec.rb +270 -0
- data/spec/helpers/admin/base_helper_spec.rb +24 -0
- data/spec/helpers/admin/navigation_helper_spec.rb +73 -0
- data/spec/helpers/admin/reimbursements_helper_spec.rb +34 -0
- data/spec/helpers/admin/stock_movements_helper_spec.rb +29 -0
- data/spec/helpers/admin/store_credit_events_helper_spec.rb +95 -0
- data/spec/helpers/promotion_rules_helper_spec.rb +12 -0
- data/spec/spec_helper.rb +108 -0
- data/spec/support/appear_before_matcher.rb +8 -0
- data/spec/support/ror_ringer.jpeg +0 -0
- data/spec/test_views/spree/admin/widgets/edit.html.erb +1 -0
- data/spec/test_views/spree/admin/widgets/new.html.erb +1 -0
- metadata +95 -6
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Spree::Admin::BaseHelper, :type => :helper do
|
|
4
|
+
include Spree::Admin::BaseHelper
|
|
5
|
+
|
|
6
|
+
context "#datepicker_field_value" do
|
|
7
|
+
it "should return nil when date is empty" do
|
|
8
|
+
date = nil
|
|
9
|
+
expect(datepicker_field_value(date)).to be_nil
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
it "should return a formatted date when date is present" do
|
|
13
|
+
date = "2013-08-14".to_time
|
|
14
|
+
expect(datepicker_field_value(date)).to eq("2013/08/14")
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
context "rails environments" do
|
|
19
|
+
it "returns the existing environments" do
|
|
20
|
+
expect(rails_environments).to eql ["development","production", "test"]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# coding: UTF-8
|
|
2
|
+
require 'spec_helper'
|
|
3
|
+
|
|
4
|
+
describe Spree::Admin::NavigationHelper, :type => :helper do
|
|
5
|
+
|
|
6
|
+
describe "#tab" do
|
|
7
|
+
context "creating an admin tab" do
|
|
8
|
+
it "should capitalize the first letter of each word in the tab's label" do
|
|
9
|
+
admin_tab = helper.tab(:orders)
|
|
10
|
+
expect(admin_tab).to include("Orders")
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it "should accept options with label and capitalize each word of it" do
|
|
15
|
+
admin_tab = helper.tab(:orders, :label => "delivered orders")
|
|
16
|
+
expect(admin_tab).to include("Delivered Orders")
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
it "should capitalize words with unicode characters" do
|
|
20
|
+
# overview
|
|
21
|
+
admin_tab = helper.tab(:orders, :label => "přehled")
|
|
22
|
+
expect(admin_tab).to include("Přehled")
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
describe "selection" do
|
|
26
|
+
context "when match_path option is not supplied" do
|
|
27
|
+
subject(:tab) { helper.tab(:orders) }
|
|
28
|
+
|
|
29
|
+
it "should be selected if the controller matches" do
|
|
30
|
+
allow(controller).to receive(:controller_name).and_return("orders")
|
|
31
|
+
expect(subject).to include('class="selected"')
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it "should not be selected if the controller does not match" do
|
|
35
|
+
allow(controller).to receive(:controller_name).and_return("bonobos")
|
|
36
|
+
expect(subject).not_to include('class="selected"')
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
context "when match_path option is supplied" do
|
|
42
|
+
before do
|
|
43
|
+
allow(helper).to receive(:admin_path).and_return("/somepath")
|
|
44
|
+
allow(helper).to receive(:request).and_return(double(ActionDispatch::Request, :fullpath => "/somepath/orders/edit/1"))
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
it "should be selected if the fullpath matches" do
|
|
48
|
+
allow(controller).to receive(:controller_name).and_return("bonobos")
|
|
49
|
+
tab = helper.tab(:orders, :label => "delivered orders", :match_path => '/orders')
|
|
50
|
+
expect(tab).to include('class="selected"')
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
it "should be selected if the fullpath matches a regular expression" do
|
|
54
|
+
allow(controller).to receive(:controller_name).and_return("bonobos")
|
|
55
|
+
tab = helper.tab(:orders, :label => "delivered orders", :match_path => /orders$|orders\//)
|
|
56
|
+
expect(tab).to include('class="selected"')
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
it "should not be selected if the fullpath does not match" do
|
|
60
|
+
allow(controller).to receive(:controller_name).and_return("bonobos")
|
|
61
|
+
tab = helper.tab(:orders, :label => "delivered orders", :match_path => '/shady')
|
|
62
|
+
expect(tab).not_to include('class="selected"')
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
it "should not be selected if the fullpath does not match a regular expression" do
|
|
66
|
+
allow(controller).to receive(:controller_name).and_return("bonobos")
|
|
67
|
+
tab = helper.tab(:orders, :label => "delivered orders", :match_path => /shady$|shady\//)
|
|
68
|
+
expect(tab).not_to include('class="selected"')
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Spree::Admin::ReimbursementsHelper, type: :helper do
|
|
4
|
+
describe '.reimbursement_status_color' do
|
|
5
|
+
subject { helper.reimbursement_status_color(reimbursement) }
|
|
6
|
+
|
|
7
|
+
let(:reimbursement) do
|
|
8
|
+
Spree::Reimbursement.new(reimbursement_status: status)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
context 'when status is reimbursed' do
|
|
12
|
+
let(:status) { 'reimbursed' }
|
|
13
|
+
it { is_expected.to eq 'success'}
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
context 'when status is pending' do
|
|
17
|
+
let(:status) { 'pending' }
|
|
18
|
+
it { is_expected.to eq 'notice'}
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
context 'when status is pending' do
|
|
22
|
+
let(:status) { 'errored' }
|
|
23
|
+
it { is_expected.to eq 'error'}
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
context 'when status is not valid' do
|
|
27
|
+
let(:status) { 'noop' }
|
|
28
|
+
|
|
29
|
+
it 'should raise an error' do
|
|
30
|
+
expect{ subject }.to raise_error(RuntimeError)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Spree::Admin::StockMovementsHelper, :type => :helper do
|
|
4
|
+
|
|
5
|
+
describe "#pretty_originator" do
|
|
6
|
+
let!(:stock_location) { create(:stock_location_with_items) }
|
|
7
|
+
let!(:stock_item) { stock_location.stock_items.first }
|
|
8
|
+
let(:stock_movement) { create(:stock_movement, stock_item: stock_item, originator: originator) }
|
|
9
|
+
|
|
10
|
+
subject { helper.pretty_originator(stock_movement) }
|
|
11
|
+
|
|
12
|
+
context "originator has a number" do
|
|
13
|
+
let(:originator) { create(:order) }
|
|
14
|
+
|
|
15
|
+
it "returns the originator's number" do
|
|
16
|
+
expect(subject).to eq originator.number
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
context "originator doesn't have a number" do
|
|
21
|
+
let(:originator) { create(:user) }
|
|
22
|
+
|
|
23
|
+
it "returns an empty string" do
|
|
24
|
+
expect(subject).to eq ""
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
end
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Spree::Admin::StoreCreditEventsHelper, type: :helper do
|
|
4
|
+
describe "#store_credit_event_admin_action_name" do
|
|
5
|
+
let(:store_credit_event) { create(:store_credit_event, action: action) }
|
|
6
|
+
|
|
7
|
+
subject { store_credit_event_admin_action_name(store_credit_event) }
|
|
8
|
+
|
|
9
|
+
context "capture event" do
|
|
10
|
+
let(:action) { Spree::StoreCredit::CAPTURE_ACTION }
|
|
11
|
+
|
|
12
|
+
it "returns the action's display text" do
|
|
13
|
+
expect(subject).to eq "Used"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
context "authorize event" do
|
|
18
|
+
let(:action) { Spree::StoreCredit::AUTHORIZE_ACTION }
|
|
19
|
+
|
|
20
|
+
it "returns the action's display text" do
|
|
21
|
+
expect(subject).to eq "Authorized"
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
context "eligible event" do
|
|
26
|
+
let(:action) { Spree::StoreCredit::ELIGIBLE_ACTION }
|
|
27
|
+
|
|
28
|
+
it "returns the action's display text" do
|
|
29
|
+
expect(subject).to eq "Eligibility Verified"
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
context "allocation event" do
|
|
34
|
+
let(:action) { Spree::StoreCredit::ALLOCATION_ACTION }
|
|
35
|
+
|
|
36
|
+
it "returns the action's display text" do
|
|
37
|
+
expect(subject).to eq "Added"
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
context "void event" do
|
|
42
|
+
let(:action) { Spree::StoreCredit::VOID_ACTION }
|
|
43
|
+
|
|
44
|
+
it "returns the action's display text" do
|
|
45
|
+
expect(subject).to eq "Voided"
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
context "credit event" do
|
|
50
|
+
let(:action) { Spree::StoreCredit::CREDIT_ACTION }
|
|
51
|
+
|
|
52
|
+
it "returns the action's display text" do
|
|
53
|
+
expect(subject).to eq "Credit"
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
describe "#store_credit_event_originator_link" do
|
|
59
|
+
let(:store_credit_event) { create(:store_credit_adjustment_event, originator: originator) }
|
|
60
|
+
|
|
61
|
+
subject { store_credit_event_originator_link(store_credit_event) }
|
|
62
|
+
|
|
63
|
+
context "originator is a user" do
|
|
64
|
+
let(:originator) { create(:user) }
|
|
65
|
+
|
|
66
|
+
it "returns a link to the user's edit page" do
|
|
67
|
+
expect(subject).to eq %Q(<a target=\"_blank\" href=\"/admin/users/#{originator.id}/edit\">User - #{originator.email}</a>)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
context "originator is a payment" do
|
|
72
|
+
let(:originator) { create(:payment) }
|
|
73
|
+
|
|
74
|
+
it "returns a link to the order's payments page" do
|
|
75
|
+
expect(subject).to eq %Q(<a target=\"_blank\" href=\"/admin/orders/#{originator.order.number}/payments/#{originator.id}\">Payment - Order ##{originator.order.number}</a>)
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
context "originator is a refund" do
|
|
80
|
+
let(:originator) { create(:refund, amount: 1.0) }
|
|
81
|
+
|
|
82
|
+
it "returns a link to the order's payments page" do
|
|
83
|
+
expect(subject).to eq %Q(<a target=\"_blank\" href=\"/admin/orders/#{originator.payment.order.number}/payments\">Refund - Order ##{originator.payment.order.number}</a>)
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
context "originator is not specifically handled" do
|
|
88
|
+
let(:originator) { create(:store_credit_update_reason) }
|
|
89
|
+
|
|
90
|
+
it "raises an error" do
|
|
91
|
+
expect { subject }.to raise_error(RuntimeError)
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
module Spree
|
|
3
|
+
describe Spree::PromotionRulesHelper, :type => :helper do
|
|
4
|
+
it "does not include existing rules in options" do
|
|
5
|
+
promotion = Spree::Promotion.new
|
|
6
|
+
promotion.promotion_rules << Spree::Promotion::Rules::ItemTotal.new
|
|
7
|
+
|
|
8
|
+
options = helper.options_for_promotion_rule_types(promotion)
|
|
9
|
+
expect(options).not_to match(/ItemTotal/)
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
if ENV["COVERAGE"]
|
|
2
|
+
# Run Coverage report
|
|
3
|
+
require 'simplecov'
|
|
4
|
+
SimpleCov.start do
|
|
5
|
+
add_group 'Controllers', 'app/controllers'
|
|
6
|
+
add_group 'Helpers', 'app/helpers'
|
|
7
|
+
add_group 'Mailers', 'app/mailers'
|
|
8
|
+
add_group 'Models', 'app/models'
|
|
9
|
+
add_group 'Views', 'app/views'
|
|
10
|
+
add_group 'Libraries', 'lib'
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# This file is copied to ~/spec when you run 'ruby script/generate rspec'
|
|
15
|
+
# from the project root directory.
|
|
16
|
+
ENV["RAILS_ENV"] ||= 'test'
|
|
17
|
+
|
|
18
|
+
begin
|
|
19
|
+
require File.expand_path("../dummy/config/environment", __FILE__)
|
|
20
|
+
rescue LoadError
|
|
21
|
+
$stderr.puts "Could not load dummy application. Please ensure you have run `bundle exec rake test_app`"
|
|
22
|
+
exit 1
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
require 'rspec/rails'
|
|
26
|
+
|
|
27
|
+
# Requires supporting files with custom matchers and macros, etc,
|
|
28
|
+
# in ./support/ and its subdirectories.
|
|
29
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
|
30
|
+
|
|
31
|
+
require 'database_cleaner'
|
|
32
|
+
require 'ffaker'
|
|
33
|
+
|
|
34
|
+
require 'spree/testing_support/authorization_helpers'
|
|
35
|
+
require 'spree/testing_support/factories'
|
|
36
|
+
require 'spree/testing_support/preferences'
|
|
37
|
+
require 'spree/testing_support/controller_requests'
|
|
38
|
+
require 'spree/testing_support/flash'
|
|
39
|
+
require 'spree/testing_support/url_helpers'
|
|
40
|
+
require 'spree/testing_support/order_walkthrough'
|
|
41
|
+
require 'spree/testing_support/capybara_ext'
|
|
42
|
+
|
|
43
|
+
require 'paperclip/matchers'
|
|
44
|
+
|
|
45
|
+
require 'capybara/poltergeist'
|
|
46
|
+
Capybara.javascript_driver = :poltergeist
|
|
47
|
+
|
|
48
|
+
RSpec.configure do |config|
|
|
49
|
+
config.color = true
|
|
50
|
+
config.infer_spec_type_from_file_location!
|
|
51
|
+
config.mock_with :rspec
|
|
52
|
+
|
|
53
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
|
54
|
+
# examples within a transaction, comment the following line or assign false
|
|
55
|
+
# instead of true.
|
|
56
|
+
config.use_transactional_fixtures = false
|
|
57
|
+
|
|
58
|
+
config.before :suite do
|
|
59
|
+
Capybara.match = :prefer_exact
|
|
60
|
+
DatabaseCleaner.clean_with :truncation
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
config.before(:each) do
|
|
64
|
+
Rails.cache.clear
|
|
65
|
+
reset_spree_preferences
|
|
66
|
+
WebMock.disable!
|
|
67
|
+
if RSpec.current_example.metadata[:js] || RSpec.current_example.metadata[:truncation]
|
|
68
|
+
DatabaseCleaner.strategy = :truncation
|
|
69
|
+
else
|
|
70
|
+
DatabaseCleaner.strategy = :transaction
|
|
71
|
+
end
|
|
72
|
+
DatabaseCleaner.start
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
config.after(:each) do
|
|
76
|
+
# Ensure js requests finish processing before advancing to the next test
|
|
77
|
+
wait_for_ajax if RSpec.current_example.metadata[:js]
|
|
78
|
+
|
|
79
|
+
DatabaseCleaner.clean
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
config.after(:each, :type => :feature) do |example|
|
|
83
|
+
missing_translations = page.body.scan(/translation missing: #{I18n.locale}\.(.*?)[\s<\"&]/)
|
|
84
|
+
if missing_translations.any?
|
|
85
|
+
puts "Found missing translations: #{missing_translations.inspect}"
|
|
86
|
+
puts "In spec: #{example.location}"
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
config.include FactoryGirl::Syntax::Methods
|
|
91
|
+
|
|
92
|
+
config.include Spree::TestingSupport::Preferences
|
|
93
|
+
config.include Spree::TestingSupport::UrlHelpers
|
|
94
|
+
config.include Spree::TestingSupport::ControllerRequests, type: :controller
|
|
95
|
+
config.include Spree::TestingSupport::Flash
|
|
96
|
+
|
|
97
|
+
config.include Paperclip::Shoulda::Matchers
|
|
98
|
+
|
|
99
|
+
config.extend WithModel
|
|
100
|
+
|
|
101
|
+
config.fail_fast = ENV['FAIL_FAST'] || false
|
|
102
|
+
|
|
103
|
+
config.example_status_persistence_file_path = "./spec/examples.txt"
|
|
104
|
+
|
|
105
|
+
config.order = :random
|
|
106
|
+
|
|
107
|
+
Kernel.srand config.seed
|
|
108
|
+
end
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
edit
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
new
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solidus_backend
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Solidus Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-12-23 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: 1.0.
|
|
19
|
+
version: 1.0.3
|
|
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: 1.0.
|
|
26
|
+
version: 1.0.3
|
|
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: 1.0.
|
|
33
|
+
version: 1.0.3
|
|
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: 1.0.
|
|
40
|
+
version: 1.0.3
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: bourbon
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -100,6 +100,9 @@ executables: []
|
|
|
100
100
|
extensions: []
|
|
101
101
|
extra_rdoc_files: []
|
|
102
102
|
files:
|
|
103
|
+
- CHANGELOG.md
|
|
104
|
+
- Gemfile
|
|
105
|
+
- Rakefile
|
|
103
106
|
- app/assets/javascripts/spree/backend.js
|
|
104
107
|
- app/assets/javascripts/spree/backend/address_states.js
|
|
105
108
|
- app/assets/javascripts/spree/backend/adjustments.js.coffee
|
|
@@ -566,6 +569,92 @@ files:
|
|
|
566
569
|
- lib/spree/backend/callbacks.rb
|
|
567
570
|
- lib/spree/backend/engine.rb
|
|
568
571
|
- lib/spree_backend.rb
|
|
572
|
+
- script/rails
|
|
573
|
+
- solidus_backend.gemspec
|
|
574
|
+
- spec/controllers/spree/admin/base_controller_spec.rb
|
|
575
|
+
- spec/controllers/spree/admin/cancellations_controller_spec.rb
|
|
576
|
+
- spec/controllers/spree/admin/customer_returns_controller_spec.rb
|
|
577
|
+
- spec/controllers/spree/admin/general_settings_controller_spec.rb
|
|
578
|
+
- spec/controllers/spree/admin/missing_products_controller_spec.rb
|
|
579
|
+
- spec/controllers/spree/admin/orders/customer_details_controller_spec.rb
|
|
580
|
+
- spec/controllers/spree/admin/orders_controller_spec.rb
|
|
581
|
+
- spec/controllers/spree/admin/payment_methods_controller_spec.rb
|
|
582
|
+
- spec/controllers/spree/admin/payments_controller_spec.rb
|
|
583
|
+
- spec/controllers/spree/admin/products_controller_spec.rb
|
|
584
|
+
- spec/controllers/spree/admin/promotion_actions_controller_spec.rb
|
|
585
|
+
- spec/controllers/spree/admin/promotion_codes_controller_spec.rb
|
|
586
|
+
- spec/controllers/spree/admin/promotion_rules_controller_spec.rb
|
|
587
|
+
- spec/controllers/spree/admin/promotions_controller_spec.rb
|
|
588
|
+
- spec/controllers/spree/admin/refunds_controller_spec.rb
|
|
589
|
+
- spec/controllers/spree/admin/reimbursements_controller_spec.rb
|
|
590
|
+
- spec/controllers/spree/admin/reports_controller_spec.rb
|
|
591
|
+
- spec/controllers/spree/admin/resource_controller_spec.rb
|
|
592
|
+
- spec/controllers/spree/admin/return_authorizations_controller_spec.rb
|
|
593
|
+
- spec/controllers/spree/admin/return_items_controller_spec.rb
|
|
594
|
+
- spec/controllers/spree/admin/root_controller_spec.rb
|
|
595
|
+
- spec/controllers/spree/admin/search_controller_spec.rb
|
|
596
|
+
- spec/controllers/spree/admin/shipping_methods_controller_spec.rb
|
|
597
|
+
- spec/controllers/spree/admin/stock_items_controller_spec.rb
|
|
598
|
+
- spec/controllers/spree/admin/stock_locations_controller_spec.rb
|
|
599
|
+
- spec/controllers/spree/admin/stock_transfers_controller_spec.rb
|
|
600
|
+
- spec/controllers/spree/admin/store_credits_controller_spec.rb
|
|
601
|
+
- spec/controllers/spree/admin/users_controller_spec.rb
|
|
602
|
+
- spec/controllers/spree/admin/variants_controller_spec.rb
|
|
603
|
+
- spec/features/admin/configuration/analytics_tracker_spec.rb
|
|
604
|
+
- spec/features/admin/configuration/countries_spec.rb
|
|
605
|
+
- spec/features/admin/configuration/general_settings_spec.rb
|
|
606
|
+
- spec/features/admin/configuration/payment_methods_spec.rb
|
|
607
|
+
- spec/features/admin/configuration/shipping_methods_spec.rb
|
|
608
|
+
- spec/features/admin/configuration/states_spec.rb
|
|
609
|
+
- spec/features/admin/configuration/stock_locations_spec.rb
|
|
610
|
+
- spec/features/admin/configuration/tax_categories_spec.rb
|
|
611
|
+
- spec/features/admin/configuration/tax_rates_spec.rb
|
|
612
|
+
- spec/features/admin/configuration/taxonomies_spec.rb
|
|
613
|
+
- spec/features/admin/configuration/zones_spec.rb
|
|
614
|
+
- spec/features/admin/homepage_spec.rb
|
|
615
|
+
- spec/features/admin/locale_spec.rb
|
|
616
|
+
- spec/features/admin/orders/adjustments_promotions_spec.rb
|
|
617
|
+
- spec/features/admin/orders/adjustments_spec.rb
|
|
618
|
+
- spec/features/admin/orders/cancelling_and_resuming_spec.rb
|
|
619
|
+
- spec/features/admin/orders/cancelling_inventory_spec.rb
|
|
620
|
+
- spec/features/admin/orders/customer_details_spec.rb
|
|
621
|
+
- spec/features/admin/orders/line_items_spec.rb
|
|
622
|
+
- spec/features/admin/orders/listing_spec.rb
|
|
623
|
+
- spec/features/admin/orders/log_entries_spec.rb
|
|
624
|
+
- spec/features/admin/orders/new_order_spec.rb
|
|
625
|
+
- spec/features/admin/orders/order_details_spec.rb
|
|
626
|
+
- spec/features/admin/orders/payments_spec.rb
|
|
627
|
+
- spec/features/admin/orders/risk_analysis_spec.rb
|
|
628
|
+
- spec/features/admin/orders/shipments_spec.rb
|
|
629
|
+
- spec/features/admin/payments/store_credits_spec.rb
|
|
630
|
+
- spec/features/admin/products/edit/images_spec.rb
|
|
631
|
+
- spec/features/admin/products/edit/products_spec.rb
|
|
632
|
+
- spec/features/admin/products/edit/taxons_spec.rb
|
|
633
|
+
- spec/features/admin/products/edit/variants_spec.rb
|
|
634
|
+
- spec/features/admin/products/option_types_spec.rb
|
|
635
|
+
- spec/features/admin/products/products_spec.rb
|
|
636
|
+
- spec/features/admin/products/properties_spec.rb
|
|
637
|
+
- spec/features/admin/products/prototypes_spec.rb
|
|
638
|
+
- spec/features/admin/products/stock_management_spec.rb
|
|
639
|
+
- spec/features/admin/products/variant_spec.rb
|
|
640
|
+
- spec/features/admin/promotion_adjustments_spec.rb
|
|
641
|
+
- spec/features/admin/promotions/tiered_calculator_spec.rb
|
|
642
|
+
- spec/features/admin/reports_spec.rb
|
|
643
|
+
- spec/features/admin/stock_transfer_spec.rb
|
|
644
|
+
- spec/features/admin/store_credits_spec.rb
|
|
645
|
+
- spec/features/admin/taxons_spec.rb
|
|
646
|
+
- spec/features/admin/users_spec.rb
|
|
647
|
+
- spec/helpers/admin/base_helper_spec.rb
|
|
648
|
+
- spec/helpers/admin/navigation_helper_spec.rb
|
|
649
|
+
- spec/helpers/admin/reimbursements_helper_spec.rb
|
|
650
|
+
- spec/helpers/admin/stock_movements_helper_spec.rb
|
|
651
|
+
- spec/helpers/admin/store_credit_events_helper_spec.rb
|
|
652
|
+
- spec/helpers/promotion_rules_helper_spec.rb
|
|
653
|
+
- spec/spec_helper.rb
|
|
654
|
+
- spec/support/appear_before_matcher.rb
|
|
655
|
+
- spec/support/ror_ringer.jpeg
|
|
656
|
+
- spec/test_views/spree/admin/widgets/edit.html.erb
|
|
657
|
+
- spec/test_views/spree/admin/widgets/new.html.erb
|
|
569
658
|
- vendor/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png
|
|
570
659
|
- vendor/assets/images/jquery-ui/ui-bg_flat_0_eeeeee_40x100.png
|
|
571
660
|
- vendor/assets/images/jquery-ui/ui-bg_flat_55_ffffff_40x100.png
|