Skip to content

A platform for community discussion. Free, open, simple.

DEV: Fix flaky profile spec by waiting for request to finish (#28573)

Ted Johanssonac5964c4026d
diff --git a/spec/system/user_page/user_preferences_profile_spec.rb b/spec/system/user_page/user_preferences_profile_spec.rb
index 2b29bd3335d..d109a271540 100644
--- a/spec/system/user_page/user_preferences_profile_spec.rb
+++ b/spec/system/user_page/user_preferences_profile_spec.rb
@@ -71,6 +71,8 @@ describe "User preferences | Profile", type: :system do
find(".user-field-favourite-pokemon input").fill_in(with: "Mudkip")
find(".save-button .btn-primary").click
+ expect(page).to have_selector(".pref-bio")
+
visit("/")
expect(page).to have_current_path("/")