From f7446749ffbf594feb3f94c9adbabadffa6dc03e Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 12 Aug 2024 14:37:25 +1000 Subject: [PATCH] Fix Unit price system spec --- spec/system/admin/unit_price_spec.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spec/system/admin/unit_price_spec.rb b/spec/system/admin/unit_price_spec.rb index f8682f12b6..6375af57e8 100644 --- a/spec/system/admin/unit_price_spec.rb +++ b/spec/system/admin/unit_price_spec.rb @@ -30,7 +30,10 @@ RSpec.describe ' login_as_admin visit spree.admin_product_variants_path product click_link 'New Variant' - fill_in 'Weight (g)', with: '1' + + tomselect_select "Weight (g)", from: "Unit scale" + click_on "Unit" # activate popout + fill_in "Unit value", with: "1" fill_in 'Price', with: '1' expect(find_field("Unit Price", disabled: true).value).to eq '$1,000.00 / kg' @@ -66,7 +69,10 @@ RSpec.describe ' visit spree.admin_dashboard_path(locale: 'es') visit spree.admin_product_variants_path product click_link 'Nueva Variante' - fill_in 'Peso (g)', with: '1' + + tomselect_select "Peso (g)", from: "Unit scale" + click_on "Unit" # activate popout + fill_in "Unit value", with: "1" fill_in 'Precio', with: '1,5' expect(find_field("Precio por unidad", disabled: true).value).to eq '1.500,00 $ / kg'