mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
12705 - fix specs
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user