From a896d414c216168f94b0495b73d5247d201c724f Mon Sep 17 00:00:00 2001 From: Mohamed ABDELLANI Date: Sun, 20 Aug 2023 09:46:46 +0100 Subject: [PATCH] optimize system test --- spec/system/admin/products_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spec/system/admin/products_spec.rb b/spec/system/admin/products_spec.rb index 63fa35e624..fe1716596a 100644 --- a/spec/system/admin/products_spec.rb +++ b/spec/system/admin/products_spec.rb @@ -67,10 +67,9 @@ describe ' it "display all attributes when submitting with error: Unit Value must be grater than 0" do login_to_admin_section - click_link 'Products' - click_link 'New Product' + visit spree.new_admin_product_path - select @supplier.name, from: 'product_supplier_id' + select 'New supplier', from: 'product_supplier_id' fill_in 'product_name', with: "new product name" select "Weight (kg)", from: 'product_variant_unit_with_scale' fill_in 'product_unit_value', with: "0.00 g"