From d4e0b2ab51d36bd71b5dce4800221efecb679468 Mon Sep 17 00:00:00 2001 From: Ahmed Ejaz Date: Sun, 4 Aug 2024 18:20:15 +0500 Subject: [PATCH] 12705 - fix specs --- spec/system/admin/products_v3/create_spec.rb | 6 +++--- spec/system/admin/products_v3/update_spec.rb | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/spec/system/admin/products_v3/create_spec.rb b/spec/system/admin/products_v3/create_spec.rb index e30dfba18c..43e0370ed4 100644 --- a/spec/system/admin/products_v3/create_spec.rb +++ b/spec/system/admin/products_v3/create_spec.rb @@ -45,15 +45,15 @@ RSpec.describe 'As an enterprise user, I can manage my products' do expect(page).to have_content "New variant" end - it "has the 1 unit value for the new variant display_as by default" do + it "has the empty unit value for the new variant display_as by default" do new_variant_button.click within new_variant_row do unit_button = find('button[aria-label="Unit"]') - expect(unit_button.text.strip).to eq('1kg') + expect(unit_button.text.strip).to eq('') unit_button.click - expect(page).to have_field "Display unit as", placeholder: "1kg" + expect(page).to have_field "Display unit as", placeholder: "" end end diff --git a/spec/system/admin/products_v3/update_spec.rb b/spec/system/admin/products_v3/update_spec.rb index ea0bfcb6bf..76b18aec69 100644 --- a/spec/system/admin/products_v3/update_spec.rb +++ b/spec/system/admin/products_v3/update_spec.rb @@ -58,9 +58,6 @@ RSpec.describe 'As an enterprise user, I can update my products' do end # Unit popout - fill_in "Unit value", with: "" - click_button "Save changes" # attempt to save or close the popout - expect(page).to have_field "Unit value", with: "" # popout is still open fill_in "Unit value", with: "500.1" within row_containing_name("Medium box") do