mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Adding all fields to new admin product spec
This commit is contained in:
@@ -15,7 +15,7 @@ feature %q{
|
||||
end
|
||||
|
||||
describe "creating a product" do
|
||||
scenario "assigning a important attributes" do
|
||||
scenario "assigning a important attributes", js: true do
|
||||
login_to_admin_section
|
||||
|
||||
click_link 'Products'
|
||||
@@ -23,8 +23,8 @@ feature %q{
|
||||
|
||||
select 'New supplier', from: 'product_supplier_id'
|
||||
fill_in 'product_name', with: 'A new product !!!'
|
||||
# select "Weight (kg)", from: 'product_variant_unit_with_scale'
|
||||
# fill_in 'product_unit_value_with_description', with: 5
|
||||
select "Weight (kg)", from: 'product_variant_unit_with_scale'
|
||||
fill_in 'product_unit_value_with_description', with: 5
|
||||
select taxon.name, from: "product_primary_taxon_id"
|
||||
fill_in 'product_price', with: '19.99'
|
||||
fill_in 'product_on_hand', with: 5
|
||||
@@ -35,11 +35,11 @@ feature %q{
|
||||
flash_message.should == 'Product "A new product !!!" has been successfully created!'
|
||||
product = Spree::Product.find_by_name('A new product !!!')
|
||||
product.supplier.should == @supplier
|
||||
#product.variant_unit.should == 'weight'
|
||||
#product.variant_unit_scale.should == 1000
|
||||
#product.unit_value.should == 5
|
||||
#product.unit_value_description.should == ""
|
||||
#product.unit_name.should == ""
|
||||
product.variant_unit.should == 'weight'
|
||||
product.variant_unit_scale.should == 1000
|
||||
product.unit_value.should == 5000
|
||||
product.unit_description.should == ""
|
||||
product.variant_unit_name.should == ""
|
||||
product.primary_taxon_id.should == taxon.id
|
||||
product.price.to_s.should == '19.99'
|
||||
product.on_hand.should == 5
|
||||
@@ -50,9 +50,9 @@ feature %q{
|
||||
visit spree.product_distributions_admin_product_path(product)
|
||||
|
||||
check @distributors[0].name
|
||||
select @enterprise_fees[0].name, :from => 'product_product_distributions_attributes_0_enterprise_fee_id'
|
||||
select2_select @enterprise_fees[0].name, :from => 'product_product_distributions_attributes_0_enterprise_fee_id'
|
||||
check @distributors[2].name
|
||||
select @enterprise_fees[2].name, :from => 'product_product_distributions_attributes_2_enterprise_fee_id'
|
||||
select2_select @enterprise_fees[2].name, :from => 'product_product_distributions_attributes_2_enterprise_fee_id'
|
||||
|
||||
click_button 'Update'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user