1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 13:19:39 +02:00

Chromium E2E test fixes (#2108)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions

* Change test password to avoid chromium conflicts

* Update integration tests

* Centralize all test password references

* Remove unrelated schema changes
This commit is contained in:
Zach Gollwitzer 2025-04-14 08:41:49 -04:00 committed by GitHub
parent 48c8499b70
commit 1e01840fee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 17 additions and 13 deletions

View file

@ -54,7 +54,7 @@ class MfaControllerTest < ActionDispatch::IntegrationTest
@user.enable_mfa!
sign_out
post sessions_path, params: { email: @user.email, password: "password" }
post sessions_path, params: { email: @user.email, password: user_password_test }
assert_redirected_to verify_mfa_path
get verify_mfa_path
@ -67,7 +67,7 @@ class MfaControllerTest < ActionDispatch::IntegrationTest
@user.enable_mfa!
sign_out
post sessions_path, params: { email: @user.email, password: "password" }
post sessions_path, params: { email: @user.email, password: user_password_test }
totp = ROTP::TOTP.new(@user.otp_secret, issuer: "Maybe")
post verify_mfa_path, params: { code: totp.now }
@ -81,7 +81,7 @@ class MfaControllerTest < ActionDispatch::IntegrationTest
@user.enable_mfa!
sign_out
post sessions_path, params: { email: @user.email, password: "password" }
post sessions_path, params: { email: @user.email, password: user_password_test }
backup_code = @user.otp_backup_codes.first
post verify_mfa_path, params: { code: backup_code }
@ -96,7 +96,7 @@ class MfaControllerTest < ActionDispatch::IntegrationTest
@user.enable_mfa!
sign_out
post sessions_path, params: { email: @user.email, password: "password" }
post sessions_path, params: { email: @user.email, password: user_password_test }
post verify_mfa_path, params: { code: "invalid" }
assert_response :unprocessable_entity

View file

@ -42,7 +42,7 @@ class SessionsControllerTest < ActionDispatch::IntegrationTest
@user.enable_mfa!
@user.sessions.destroy_all # Clean up any existing sessions
post sessions_path, params: { email: @user.email, password: "password" }
post sessions_path, params: { email: @user.email, password: user_password_test }
assert_redirected_to verify_mfa_path
assert_equal @user.id, session[:mfa_user_id]