From ff9e2a33ce4f16f0ff4616d09a996baad87a974d Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Sun, 27 Apr 2025 14:04:20 +0100 Subject: [PATCH] Reproduces bug #12933, setting the test case as pending --- spec/system/admin/product_import_spec.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/system/admin/product_import_spec.rb b/spec/system/admin/product_import_spec.rb index 62e58f6ba3..d96fdbbf05 100644 --- a/spec/system/admin/product_import_spec.rb +++ b/spec/system/admin/product_import_spec.rb @@ -240,16 +240,21 @@ RSpec.describe "Product Import" do end it "can reset product stock to zero for products not present in the CSV" do + pending("#12933") + csv_data = <<~CSV name, producer, category, on_hand, price, units, unit_type, shipping_category_id Carrots, User Enterprise, Vegetables, 500, 3.20, 500, g, #{shipping_category_id_str} CSV File.write('/tmp/test.csv', csv_data) + # setting a variant to have negative stock, with the on demand option set to true + Spree::Product.find_by(name: 'Cabbage').variants.first.on_demand = true + Spree::Product.find_by(name: 'Cabbage').variants.first.on_hand = -30 + visit main_app.admin_product_import_path attach_file 'file', '/tmp/test.csv' - check "settings_reset_all_absent" click_button 'Upload'