mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Make spec less flaky by making it wait for the Saving text to go away
This commit is contained in:
@@ -199,6 +199,9 @@ feature "
|
||||
|
||||
expect do
|
||||
click_button 'Save Changes'
|
||||
|
||||
# We need to wait_until because the save action is not fast enough for the have_content matcher
|
||||
wait_until { page.find("#status-message").text != "Saving..." }
|
||||
expect(page).to have_content "I couldn't get authorisation to save those changes, so they remain unsaved."
|
||||
end.to change(VariantOverride, :count).by(0)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user