solidusio / solidus

🛒 Solidus, the open-source eCommerce framework for industry trailblazers.
https://solidus.io
Other
4.97k stars 1.29k forks source link

Items on Back Order when Track Inventory is false #2817

Closed brettallred closed 1 year ago

brettallred commented 6 years ago

Steps to reproduce

Expected behavior

Actual behavior

System configuration

Solidus Version: 2.6.0

Extensions in use:

gem 'solidus' 
gem 'solidus_auth_devise'
gem 'deface'
gem 'solidus_wishlist', github: 'boomerdigital/solidus_wishlist', branch: 'master'
gem 'solidus_reviews', github: 'solidusio-contrib/solidus_reviews'
gem "searchkick", github: "ankane/searchkick"
gem 'solidus_cmd'

https://gist.github.com/brettallred/fe054c6dd4df820b0a510cbb4872f610

jacobherrington commented 5 years ago

This exists in Solidus 2.7.0

aitbw commented 5 years ago

Let me have a look at this one

aitbw commented 5 years ago

Haven't figured this one yet but here's a spec to reproduce the bug without needing to build the sandbox; copy the following snippet between these two lines, and it should fail as expected.

context 'when inventory levels are not being tracked' do
  before do
    Spree::Config[:track_inventory_levels] = false
  end

  after do
    Spree::Config[:track_inventory_levels] = true
  end

  # Regression for https://github.com/solidusio/solidus/issues/2817
  it "should allow me to ship an order's items" do
    visit spree.edit_admin_order_path(order)

    within('tr', text: line_item.sku) { click_icon 'arrows-h' }
    complete_split_to(stock_location2)

    expect(page).to have_css('.shipment', count: 2)
    expect(order.shipments.count).to eq(2)
    expect(page).not_to have_content('Backordered')
    expect(page).to have_content('On hand', count: 2)
  end
end
nspinazz89 commented 4 years ago

I'm able to reproduce this on master and am going to work on knocking this out.