DEV: Assert that user has been signed in successfully in system tests (#22892)

We have seen instances where the user has not been signed in but we need
more debugging information to know why.

Exmaple where test fails due to user not being signed in https://github.com/discourse/discourse/actions/runs/5718655343/job/15494917165
This commit is contained in:
Alan Guo Xiang Tan 2023-08-01 09:06:56 +08:00 committed by GitHub
parent a83c1d8f60
commit 18358c448c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,8 @@ module SystemHelpers
GlobalSetting.relative_url_root || "", GlobalSetting.relative_url_root || "",
"/session/#{user.encoded_username}/become.json?redirect=false", "/session/#{user.encoded_username}/become.json?redirect=false",
) )
expect(page).to have_content("Signed in to #{user.encoded_username} successfully")
end end
def sign_out def sign_out