mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
Chromium E2E test fixes (#2108)
* Change test password to avoid chromium conflicts * Update integration tests * Centralize all test password references * Remove unrelated schema changes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user