The personal finance app for everyone
Chromium E2E test fixes (#2108)
Zach Gollwitzer1e01840feefc
diff --git a/db/schema.rb b/db/schema.rbindex 5bd3bb37..8c37862a 100644--- a/db/schema.rb+++ b/db/schema.rb@@ -101,7 +101,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_04_11_140604) dot.decimal "balance", precision: 19, scale: 4t.string "currency"t.boolean "is_active", default: true, null: false- t.virtual "classification", type: :string, as: "\nCASE\n WHEN ((accountable_type)::text = ANY (ARRAY[('Loan'::character varying)::text, ('CreditCard'::character varying)::text, ('OtherLiability'::character varying)::text])) THEN 'liability'::text\n ELSE 'asset'::text\nEND", stored: true+ t.virtual "classification", type: :string, as: "\nCASE\n WHEN ((accountable_type)::text = ANY ((ARRAY['Loan'::character varying, 'CreditCard'::character varying, 'OtherLiability'::character varying])::text[])) THEN 'liability'::text\n ELSE 'asset'::text\nEND", stored: truet.uuid "import_id"t.uuid "plaid_account_id"t.boolean "scheduled_for_deletion", default: falsediff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rbindex a41ff371..a65f724e 100644--- a/test/application_system_test_case.rb+++ b/test/application_system_test_case.rb@@ -13,7 +13,7 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCasevisit new_session_pathwithin "form" dofill_in "Email", with: user.email- fill_in "Password", with: "password"+ fill_in "Password", with: user_password_testclick_on "Log in"enddiff --git a/test/controllers/mfa_controller_test.rb b/test/controllers/mfa_controller_test.rbindex 28b52dee..e2e24417 100644--- a/test/controllers/mfa_controller_test.rb+++ b/test/controllers/mfa_controller_test.rb@@ -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_pathget 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.firstpost 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_entitydiff --git a/test/controllers/sessions_controller_test.rb b/test/controllers/sessions_controller_test.rbindex b0e91f62..8383ac0b 100644--- a/test/controllers/sessions_controller_test.rb+++ b/test/controllers/sessions_controller_test.rb@@ -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_pathassert_equal @user.id, session[:mfa_user_id]diff --git a/test/fixtures/users.yml b/test/fixtures/users.ymlindex ef3e7e3d..e7088ec9 100644--- a/test/fixtures/users.yml+++ b/test/fixtures/users.yml@@ -3,7 +3,7 @@ empty:first_name: Userlast_name: Oneemail: [email protected]- password_digest: $2a$12$7p8hMsoc0zSaC8eY9oewzelHbmCPdpPi.mGiyG4vdZwrXmGpRPoNK+ password_digest: $2a$12$XoNBo/cMCyzpYtvhrPAhsubG21mELX48RAcjSVCRctW8dG8wrDIlaonboarded_at: <%= 3.days.ago %>ai_enabled: true@@ -12,7 +12,7 @@ maybe_support_staff:first_name: Supportlast_name: Adminemail: [email protected]- password_digest: $2a$12$7p8hMsoc0zSaC8eY9oewzelHbmCPdpPi.mGiyG4vdZwrXmGpRPoNK+ password_digest: $2a$12$XoNBo/cMCyzpYtvhrPAhsubG21mELX48RAcjSVCRctW8dG8wrDIlarole: super_adminonboarded_at: <%= 3.days.ago %>ai_enabled: true@@ -22,7 +22,7 @@ family_admin:first_name: Boblast_name: Dylanemail: [email protected]- password_digest: $2a$12$7p8hMsoc0zSaC8eY9oewzelHbmCPdpPi.mGiyG4vdZwrXmGpRPoNK+ password_digest: $2a$12$XoNBo/cMCyzpYtvhrPAhsubG21mELX48RAcjSVCRctW8dG8wrDIlarole: adminonboarded_at: <%= 3.days.ago %>ai_enabled: true@@ -32,7 +32,7 @@ family_member:first_name: Jakoblast_name: Dylanemail: [email protected]- password_digest: $2a$12$7p8hMsoc0zSaC8eY9oewzelHbmCPdpPi.mGiyG4vdZwrXmGpRPoNK+ password_digest: $2a$12$XoNBo/cMCyzpYtvhrPAhsubG21mELX48RAcjSVCRctW8dG8wrDIlaonboarded_at: <%= 3.days.ago %>ai_enabled: true@@ -42,6 +42,6 @@ new_email:last_name: Useremail: [email protected]unconfirmed_email: [email protected]- password_digest: $2a$12$7p8hMsoc0zSaC8eY9oewzelHbmCPdpPi.mGiyG4vdZwrXmGpRPoNK+ password_digest: $2a$12$XoNBo/cMCyzpYtvhrPAhsubG21mELX48RAcjSVCRctW8dG8wrDIlaonboarded_at: <%= Time.current %>ai_enabled: true\ No newline at end of filediff --git a/test/test_helper.rb b/test/test_helper.rbindex 9e1bb2c9..40bf14c9 100644--- a/test/test_helper.rb+++ b/test/test_helper.rb@@ -49,7 +49,7 @@ module ActiveSupport# Add more helper methods to be used by all tests here...def sign_in(user)- post sessions_path, params: { email: user.email, password: "password" }+ post sessions_path, params: { email: user.email, password: user_password_test }enddef with_env_overrides(overrides = {}, &block)@@ -60,6 +60,10 @@ module ActiveSupportRails.configuration.stubs(:app_mode).returns("self_hosted".inquiry)yieldend++ def user_password_test+ "maybetestpassword817983172"+ endendend