A platform for community discussion. Free, open, simple.
DEV: Fix flaky system spec with hardcoded username (#27619)
Ted Johansson2d41fece43d8
diff --git a/spec/system/user_page/user_preferences_profile_spec.rb b/spec/system/user_page/user_preferences_profile_spec.rbindex f1ad6f8ba3d..ebe39df9569 100644--- a/spec/system/user_page/user_preferences_profile_spec.rb+++ b/spec/system/user_page/user_preferences_profile_spec.rb@@ -22,7 +22,7 @@ describe "User preferences | Profile", type: :system doit "redirects to the profile page to fill up required fields" dovisit("/")- expect(page).to have_current_path("/u/bruce0/preferences/profile")+ expect(page).to have_current_path("/u/#{user.username}/preferences/profile")expect(page).to have_selector(".alert-error",@@ -35,7 +35,7 @@ describe "User preferences | Profile", type: :system dofind("#site-logo").click- expect(page).to have_current_path("/u/bruce0/preferences/profile")+ expect(page).to have_current_path("/u/#{user.username}/preferences/profile")endit "allows user to fill up required fields" do