Removes product creation test

This is already covered some lines above and on e22bec014b/spec/system/admin/products_spec.rb (L29)
This commit is contained in:
filipefurtad0
2024-06-13 12:15:24 -06:00
parent 9e5c21f7cd
commit 9cd1977cf8

View File

@@ -1446,34 +1446,6 @@ RSpec.describe 'As an enterprise user, I can manage my products', feature: :admi
expect(page).to have_selector row_containing_name(product_supplied_inactive.name)
end
it "allows me to create a product" do
taxon = create(:taxon, name: 'Fruit')
shipping_category = create(:shipping_category)
visit spree.admin_products_path
click_link "New Product"
expect(page).to have_content "New Product"
expect(page).to have_select 'product_supplier_id',
with_options: [supplier_managed1.name, supplier_managed2.name,
supplier_permitted.name]
within 'fieldset#new_product' do
fill_in 'product_name', with: 'Big Bag Of Apples'
select supplier_permitted.name, from: 'product_supplier_id'
select 'Weight (g)', from: 'product_variant_unit_with_scale'
fill_in 'product_unit_value', with: '100'
fill_in 'product_price', with: '10.00'
select taxon.name, from: 'product_primary_taxon_id'
select shipping_category.name, from: 'product_shipping_category_id'
end
click_button 'Create'
expect(URI.parse(current_url).path).to eq spree.admin_products_path
expect(flash_message).to eq 'Product "Big Bag Of Apples" has been successfully created!'
expect(page).to have_selector row_containing_name('Big Bag Of Apples')
end
it "allows me to update a product" do
visit spree.admin_products_path