spree_backend 3.3.0.rc1 → 3.3.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/backend/general_settings.js.coffee +12 -10
- data/app/controllers/spree/admin/orders_controller.rb +3 -4
- data/app/controllers/spree/admin/payments_controller.rb +2 -2
- data/app/controllers/spree/admin/products_controller.rb +3 -3
- data/app/controllers/spree/admin/return_authorizations_controller.rb +1 -1
- data/app/helpers/spree/admin/base_helper.rb +4 -1
- data/app/helpers/spree/admin/navigation_helper.rb +1 -1
- data/app/views/spree/admin/products/_form.html.erb +8 -8
- data/app/views/spree/admin/promotions/actions/_create_line_items.html.erb +4 -2
- data/app/views/spree/admin/shared/_translations.html.erb +1 -0
- data/spree_backend.gemspec +1 -1
- metadata +7 -98
- data/spec/controllers/spree/admin/base_controller_spec.rb +0 -46
- data/spec/controllers/spree/admin/customer_returns_controller_spec.rb +0 -185
- data/spec/controllers/spree/admin/general_settings_controller_spec.rb +0 -41
- data/spec/controllers/spree/admin/missing_products_controller_spec.rb +0 -18
- data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +0 -199
- data/spec/controllers/spree/admin/orders_controller_spec.rb +0 -296
- data/spec/controllers/spree/admin/payment_methods_controller_spec.rb +0 -64
- data/spec/controllers/spree/admin/payments_controller_spec.rb +0 -97
- data/spec/controllers/spree/admin/products_controller_spec.rb +0 -137
- data/spec/controllers/spree/admin/promotion_actions_controller_spec.rb +0 -21
- data/spec/controllers/spree/admin/promotion_rules_controller_spec.rb +0 -21
- data/spec/controllers/spree/admin/promotions_controller_spec.rb +0 -44
- data/spec/controllers/spree/admin/refunds_controller_spec.rb +0 -32
- data/spec/controllers/spree/admin/reimbursements_controller_spec.rb +0 -74
- data/spec/controllers/spree/admin/reports_controller_spec.rb +0 -42
- data/spec/controllers/spree/admin/resource_controller_spec.rb +0 -252
- data/spec/controllers/spree/admin/return_authorizations_controller_spec.rb +0 -225
- data/spec/controllers/spree/admin/return_index_controller_spec.rb +0 -37
- data/spec/controllers/spree/admin/return_items_controller_spec.rb +0 -27
- data/spec/controllers/spree/admin/shipping_methods_controller_spec.rb +0 -14
- data/spec/controllers/spree/admin/stock_items_controller_spec.rb +0 -19
- data/spec/controllers/spree/admin/stock_locations_controller_spec.rb +0 -41
- data/spec/controllers/spree/admin/stock_transfers_controller_spec.rb +0 -41
- data/spec/controllers/spree/admin/tax_categories_controller_spec.rb +0 -34
- data/spec/controllers/spree/admin/users_controller_spec.rb +0 -161
- data/spec/controllers/spree/admin/variants_controller_spec.rb +0 -32
- data/spec/features/admin/configuration/analytics_tracker_spec.rb +0 -47
- data/spec/features/admin/configuration/countries_spec.rb +0 -24
- data/spec/features/admin/configuration/general_settings_spec.rb +0 -44
- data/spec/features/admin/configuration/payment_methods_spec.rb +0 -63
- data/spec/features/admin/configuration/roles_spec.rb +0 -47
- data/spec/features/admin/configuration/shipping_methods_spec.rb +0 -62
- data/spec/features/admin/configuration/states_spec.rb +0 -68
- data/spec/features/admin/configuration/stock_locations_spec.rb +0 -48
- data/spec/features/admin/configuration/store_credit_categories_spec.rb +0 -50
- data/spec/features/admin/configuration/tax_categories_spec.rb +0 -56
- data/spec/features/admin/configuration/tax_rates_spec.rb +0 -18
- data/spec/features/admin/configuration/zones_spec.rb +0 -39
- data/spec/features/admin/homepage_spec.rb +0 -89
- data/spec/features/admin/locale_spec.rb +0 -31
- data/spec/features/admin/orders/adjustments_promotions_spec.rb +0 -53
- data/spec/features/admin/orders/adjustments_spec.rb +0 -124
- data/spec/features/admin/orders/cancelling_and_resuming_spec.rb +0 -47
- data/spec/features/admin/orders/customer_details_spec.rb +0 -154
- data/spec/features/admin/orders/line_items_spec.rb +0 -51
- data/spec/features/admin/orders/listing_spec.rb +0 -224
- data/spec/features/admin/orders/log_entries_spec.rb +0 -55
- data/spec/features/admin/orders/new_order_spec.rb +0 -186
- data/spec/features/admin/orders/order_details_spec.rb +0 -660
- data/spec/features/admin/orders/payments_spec.rb +0 -244
- data/spec/features/admin/orders/risk_analysis_spec.rb +0 -48
- data/spec/features/admin/orders/shipments_spec.rb +0 -64
- data/spec/features/admin/orders/state_changes_spec.rb +0 -21
- data/spec/features/admin/products/edit/images_spec.rb +0 -86
- data/spec/features/admin/products/edit/products_spec.rb +0 -56
- data/spec/features/admin/products/edit/taxons_spec.rb +0 -41
- data/spec/features/admin/products/edit/variants_spec.rb +0 -56
- data/spec/features/admin/products/option_types_spec.rb +0 -114
- data/spec/features/admin/products/products_spec.rb +0 -445
- data/spec/features/admin/products/properties_spec.rb +0 -147
- data/spec/features/admin/products/prototypes_spec.rb +0 -112
- data/spec/features/admin/products/stock_management_spec.rb +0 -124
- data/spec/features/admin/products/taxonomies_spec.rb +0 -52
- data/spec/features/admin/products/variant_spec.rb +0 -50
- data/spec/features/admin/promotions/adjustments_spec.rb +0 -258
- data/spec/features/admin/promotions/option_value_rule_spec.rb +0 -70
- data/spec/features/admin/promotions/tiered_calculator_spec.rb +0 -70
- data/spec/features/admin/refund_reasons/refund_reasons_spec.rb +0 -57
- data/spec/features/admin/reimbursement_type/edit_reimbursement_type_spec.rb +0 -36
- data/spec/features/admin/reimbursement_type/new_reimbursement_type_spec.rb +0 -62
- data/spec/features/admin/reports_spec.rb +0 -61
- data/spec/features/admin/return_authorization_reasons/return_authorization_reasons_spec.rb +0 -63
- data/spec/features/admin/returns/customer_returns_spec.rb +0 -80
- data/spec/features/admin/returns/return_authorizations_spec.rb +0 -152
- data/spec/features/admin/stock_transfer_spec.rb +0 -91
- data/spec/features/admin/store_credits_spec.rb +0 -93
- data/spec/features/admin/taxons_spec.rb +0 -53
- data/spec/features/admin/users_spec.rb +0 -286
- data/spec/helpers/admin/base_helper_spec.rb +0 -30
- data/spec/helpers/admin/navigation_helper_spec.rb +0 -111
- data/spec/helpers/admin/promotion_rules_helper_spec.rb +0 -12
- data/spec/helpers/admin/stock_movements_helper_spec.rb +0 -30
- data/spec/models/spree/resource_spec.rb +0 -48
- data/spec/routing/admin_path_spec.rb +0 -22
- data/spec/spec_helper.rb +0 -144
- data/spec/support/appear_before_matcher.rb +0 -8
- data/spec/support/ror_ringer.jpeg +0 -0
- data/spec/test_views/spree/admin/submodule/posts/edit.html.erb +0 -1
- data/spec/test_views/spree/admin/submodule/posts/new.html.erb +0 -1
- data/spec/test_views/spree/admin/widgets/edit.html.erb +0 -1
- data/spec/test_views/spree/admin/widgets/new.html.erb +0 -1
data/spec/spec_helper.rb
DELETED
@@ -1,144 +0,0 @@
|
|
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
|
-
puts "Could not load dummy application. Please ensure you have run `bundle exec rake test_app`"
|
22
|
-
exit
|
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
|
-
require 'timeout'
|
34
|
-
|
35
|
-
require 'spree/testing_support/authorization_helpers'
|
36
|
-
require 'spree/testing_support/factories'
|
37
|
-
require 'spree/testing_support/preferences'
|
38
|
-
require 'spree/testing_support/controller_requests'
|
39
|
-
require 'spree/testing_support/flash'
|
40
|
-
require 'spree/testing_support/url_helpers'
|
41
|
-
require 'spree/testing_support/order_walkthrough'
|
42
|
-
require 'spree/testing_support/capybara_ext'
|
43
|
-
require 'spree/testing_support/shoulda_matcher_configuration'
|
44
|
-
|
45
|
-
require 'spree/core/controller_helpers/strong_parameters'
|
46
|
-
|
47
|
-
require 'paperclip/matchers'
|
48
|
-
|
49
|
-
require 'capybara-screenshot/rspec'
|
50
|
-
Capybara.save_path = ENV['CIRCLE_ARTIFACTS'] if ENV['CIRCLE_ARTIFACTS']
|
51
|
-
|
52
|
-
require 'capybara/poltergeist'
|
53
|
-
Capybara.javascript_driver = :poltergeist
|
54
|
-
|
55
|
-
# Set timeout to something high enough to allow CI to pass
|
56
|
-
Capybara.default_max_wait_time = 30
|
57
|
-
|
58
|
-
RSpec.configure do |config|
|
59
|
-
config.color = true
|
60
|
-
config.fail_fast = ENV['FAIL_FAST'] || false
|
61
|
-
config.infer_spec_type_from_file_location!
|
62
|
-
config.mock_with :rspec
|
63
|
-
config.raise_errors_for_deprecations!
|
64
|
-
|
65
|
-
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
66
|
-
# examples within a transaction, comment the following line or assign false
|
67
|
-
# instead of true.
|
68
|
-
config.use_transactional_fixtures = false
|
69
|
-
|
70
|
-
config.before :suite do
|
71
|
-
Capybara.match = :prefer_exact
|
72
|
-
DatabaseCleaner.clean_with :truncation
|
73
|
-
end
|
74
|
-
|
75
|
-
config.before(:each) do
|
76
|
-
Rails.cache.clear
|
77
|
-
WebMock.disable!
|
78
|
-
if RSpec.current_example.metadata[:js]
|
79
|
-
DatabaseCleaner.strategy = :truncation
|
80
|
-
else
|
81
|
-
DatabaseCleaner.strategy = :transaction
|
82
|
-
end
|
83
|
-
# TODO: Find out why open_transactions ever gets below 0
|
84
|
-
# See issue #3428
|
85
|
-
if ApplicationRecord.connection.open_transactions < 0
|
86
|
-
ApplicationRecord.connection.increment_open_transactions
|
87
|
-
end
|
88
|
-
|
89
|
-
DatabaseCleaner.start
|
90
|
-
reset_spree_preferences
|
91
|
-
end
|
92
|
-
|
93
|
-
config.after(:each) do
|
94
|
-
# wait_for_ajax sometimes fails so we should clean db first to get rid of false failed specs
|
95
|
-
DatabaseCleaner.clean
|
96
|
-
|
97
|
-
# Ensure js requests finish processing before advancing to the next test
|
98
|
-
wait_for_ajax if RSpec.current_example.metadata[:js]
|
99
|
-
end
|
100
|
-
|
101
|
-
config.around do |example|
|
102
|
-
Timeout.timeout(30, &example)
|
103
|
-
end
|
104
|
-
|
105
|
-
config.after(:each, type: :feature) do |example|
|
106
|
-
missing_translations = page.body.scan(/translation missing: #{I18n.locale}\.(.*?)[\s<\"&]/)
|
107
|
-
if missing_translations.any?
|
108
|
-
puts "Found missing translations: #{missing_translations.inspect}"
|
109
|
-
puts "In spec: #{example.location}"
|
110
|
-
end
|
111
|
-
end
|
112
|
-
|
113
|
-
config.include FactoryGirl::Syntax::Methods
|
114
|
-
|
115
|
-
config.include Spree::TestingSupport::Preferences
|
116
|
-
config.include Spree::TestingSupport::UrlHelpers
|
117
|
-
config.include Spree::TestingSupport::ControllerRequests, type: :controller
|
118
|
-
config.include Spree::TestingSupport::Flash
|
119
|
-
|
120
|
-
config.include Spree::Core::ControllerHelpers::StrongParameters, type: :controller
|
121
|
-
|
122
|
-
config.include Paperclip::Shoulda::Matchers
|
123
|
-
|
124
|
-
config.extend WithModel
|
125
|
-
|
126
|
-
config.include VersionCake::TestHelpers, type: :controller
|
127
|
-
config.before(:each, type: :controller) do
|
128
|
-
set_request_version('', 1)
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
module Spree
|
133
|
-
module TestingSupport
|
134
|
-
module Flash
|
135
|
-
def assert_flash_success(flash)
|
136
|
-
flash = convert_flash(flash)
|
137
|
-
|
138
|
-
within(".alert-success") do
|
139
|
-
expect(page).to have_content(flash)
|
140
|
-
end
|
141
|
-
end
|
142
|
-
end
|
143
|
-
end
|
144
|
-
end
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
edit
|
@@ -1 +0,0 @@
|
|
1
|
-
new
|
@@ -1 +0,0 @@
|
|
1
|
-
edit
|
@@ -1 +0,0 @@
|
|
1
|
-
new
|