DEV: Fix flaky system spec with hardcoded username (#27619)
The auto-generated username has a sequence number after it that may be different from the hard-coded one. Use user.username instead.
This commit is contained in:
parent
8be2f0ab70
commit
2d41fece43
|
@ -22,7 +22,7 @@ describe "User preferences | Profile", type: :system do
|
|||
it "redirects to the profile page to fill up required fields" do
|
||||
visit("/")
|
||||
|
||||
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 do
|
|||
|
||||
find("#site-logo").click
|
||||
|
||||
expect(page).to have_current_path("/u/bruce0/preferences/profile")
|
||||
expect(page).to have_current_path("/u/#{user.username}/preferences/profile")
|
||||
end
|
||||
|
||||
it "allows user to fill up required fields" do
|
||||
|
|
Loading…
Reference in New Issue