From 977b6e6c2aeca1be63fbaf539b21eb6bdd7ac5c3 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 12 Aug 2024 14:45:16 +1000 Subject: [PATCH] Fix minor differences in local env and CI --- spec/system/admin/products_v3/update_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/system/admin/products_v3/update_spec.rb b/spec/system/admin/products_v3/update_spec.rb index 98f73fc15e..2d6bd09acc 100644 --- a/spec/system/admin/products_v3/update_spec.rb +++ b/spec/system/admin/products_v3/update_spec.rb @@ -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