From b203803eb90ef1dee740aaea93301ad9e866e708 Mon Sep 17 00:00:00 2001 From: Mohamed ABDELLANI Date: Tue, 1 Nov 2022 12:10:06 +0100 Subject: [PATCH] fix test: change product_unit_value_with_description value to float (2 digits precision) --- spec/system/admin/products_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/system/admin/products_spec.rb b/spec/system/admin/products_spec.rb index 44097bbf6f..0afec0e66d 100644 --- a/spec/system/admin/products_spec.rb +++ b/spec/system/admin/products_spec.rb @@ -37,7 +37,7 @@ describe ' select @supplier.name, from: 'product_supplier_id' select "Weight (kg)", from: 'product_variant_unit_with_scale' - fill_in 'product_unit_value_with_description', with: "5 g" + fill_in 'product_unit_value_with_description', with: "5.00 g" assert_selector(:field, placeholder: "5kg g") fill_in 'product_display_as', with: "Big Box of Chocolates" select taxon.name, from: "product_primary_taxon_id" @@ -51,7 +51,7 @@ describe ' expect(page).to have_content "Name can't be blank" expect(page).to have_field 'product_supplier_id', with: @supplier.id - expect(page).to have_field 'product_unit_value_with_description', with: "5 g" + expect(page).to have_field 'product_unit_value_with_description', with: "5.00 g" expect(page).to have_field 'product_display_as', with: "Big Box of Chocolates" expect(page).to have_field 'product_primary_taxon_id', with: taxon.id expect(page).to have_field 'product_price', with: '19.99'