diff --git a/app/models/spree/shipment_decorator.rb b/app/models/spree/shipment_decorator.rb index 6a21c07..1595413 100644 --- a/app/models/spree/shipment_decorator.rb +++ b/app/models/spree/shipment_decorator.rb @@ -8,6 +8,8 @@ delegate :supplier, to: :stock_location + self.whitelisted_ransackable_attributes = %w(number state) + def display_final_price_with_items Spree::Money.new final_price_with_items end diff --git a/spec/features/admin/stock_management_spec.rb b/spec/features/admin/stock_management_spec.rb index 85fa6eb..24e20aa 100644 --- a/spec/features/admin/stock_management_spec.rb +++ b/spec/features/admin/stock_management_spec.rb @@ -24,8 +24,9 @@ @v.stock_items.first.update_column(:count_on_hand, 10) @secondary.stock_item(@v).destroy click_link "Products" + sleep(1) within '#sidebar-product' do - click_link 'Products' + click_link "Products" end click_link @product.name within '[data-hook=admin_product_tabs]' do @@ -111,6 +112,7 @@ v.stock_items.first.update_column(:count_on_hand, 30) click_link "Products" + sleep(1) within '#sidebar-product' do click_link 'Products' end @@ -138,6 +140,7 @@ @product.variants.create!(sku: 'FOOBAR') Spree::StockLocation.delete_all click_link "Products" + sleep(1) within '#sidebar-product' do click_link 'Products' end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 20d7397..bfc787e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -77,3 +77,10 @@ config.color = true config.infer_spec_type_from_file_location! end + +Shoulda::Matchers.configure do |config| + config.integrate do |with| + with.test_framework :rspec + with.library :rails + end +end diff --git a/spree_drop_ship.gemspec b/spree_drop_ship.gemspec index 2cf8015..18d4cdc 100644 --- a/spree_drop_ship.gemspec +++ b/spree_drop_ship.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'ffaker' s.add_development_dependency 'launchy' s.add_development_dependency 'rspec-rails', '~> 2.99' - s.add_development_dependency 'sass-rails', '~> 4.0.2' + s.add_development_dependency 'sass-rails', '~> 5.0.0.beta1' s.add_development_dependency 'selenium-webdriver' s.add_development_dependency 'shoulda-matchers' s.add_development_dependency 'spree_auth_devise'