mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Removes test case around shipped product
This is already covered on the v3 version of the spec, under ./spec/system/admin/products_v3/products_spec.rb:452
This commit is contained in:
committed by
David Cook
parent
cda2408c69
commit
6dd4bb3e3b
@@ -278,35 +278,6 @@ RSpec.describe '
|
||||
expect(page).to have_selector "#p_#{product1.id}"
|
||||
end
|
||||
end
|
||||
|
||||
context 'a shipped product' do
|
||||
let!(:order) { create(:shipped_order, line_items_count: 1) }
|
||||
let!(:line_item) { order.reload.line_items.first }
|
||||
|
||||
context "a deleted line item from a shipped order" do
|
||||
before do
|
||||
login_as_admin
|
||||
visit spree.admin_products_path
|
||||
|
||||
within "#p_#{order.variants.first.product_id}" do
|
||||
accept_alert { page.find("[data-powertip=Remove]").click }
|
||||
end
|
||||
end
|
||||
|
||||
it 'removes it from the product list' do
|
||||
visit spree.admin_products_path
|
||||
|
||||
expect(page).to have_selector "#p_#{product1.id}"
|
||||
expect(page).not_to have_selector "#p_#{order.variants.first.product_id}"
|
||||
end
|
||||
|
||||
it 'keeps the line item on the order (admin)' do
|
||||
visit spree.edit_admin_order_path(order)
|
||||
|
||||
expect(page).to have_content(line_item.product.name.to_s)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'cloning' do
|
||||
|
||||
Reference in New Issue
Block a user