Use default for create product spec; auto-fill field

This commit is contained in:
Dan Ingenthron
2019-09-18 18:52:50 -05:00
parent b082d3301b
commit d6022062e1

View File

@@ -9,7 +9,7 @@ feature '
let!(:taxon) { create(:taxon) }
let!(:stock_location) { create(:stock_location, backorderable_default: false) }
let!(:shipping_category) { create(:shipping_category, name: 'Test Shipping Category') }
let!(:shipping_category) { DefaultShippingCategory.find_or_create }
background do
@supplier = create(:supplier_enterprise, name: 'New supplier')
@@ -81,7 +81,6 @@ feature '
fill_in 'product_on_hand', with: 0
check 'product_on_demand'
select 'Test Tax Category', from: 'product_tax_category_id'
select 'Test Shipping Category', from: 'product_shipping_category_id'
page.find("div[id^='taTextElement']").native.send_keys('In demand, and on_demand! The hottest cakes in town.')
click_button 'Create'
@@ -123,7 +122,6 @@ feature '
select 'Weight (g)', from: 'product_variant_unit_with_scale'
fill_in 'product_unit_value_with_description', with: '500'
select taxon.name, from: "product_primary_taxon_id"
select 'Test Shipping Category', from: 'product_shipping_category_id'
select 'None', from: "product_tax_category_id"
# Should only have suppliers listed which the user can manage