12705 - fix specs

This commit is contained in:
Ahmed Ejaz
2024-08-04 18:20:15 +05:00
parent 1014a50aff
commit d4e0b2ab51
2 changed files with 3 additions and 6 deletions

View File

@@ -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

View File

@@ -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