mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix minor differences in local env and CI
This commit is contained in:
@@ -527,8 +527,10 @@ RSpec.describe 'As an enterprise user, I can update my products' do
|
||||
# Client side validation
|
||||
click_button "Save changes"
|
||||
within new_variant_row do
|
||||
# In CI we get "Please fill out this field." and locally we get
|
||||
# "Please fill in this field."
|
||||
expect_browser_validation('input[aria-label="Unit value"]',
|
||||
"Please fill in this field.")
|
||||
/Please fill (in|out) this field./)
|
||||
end
|
||||
|
||||
# Fix error
|
||||
@@ -749,6 +751,6 @@ RSpec.describe 'As an enterprise user, I can update my products' do
|
||||
|
||||
def expect_browser_validation(selector, message)
|
||||
browser_message = page.find(selector)["validationMessage"]
|
||||
expect(browser_message).to eq message
|
||||
expect(browser_message).to match message
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user