towerops/test/towerops/accounts
Graham McIntire 0ea54b63db
perf(tests): disable TOTP by default in fixtures for faster tests
**Performance improvement: 52s → 33.2s test suite (35% faster)**

Changes:
- Disable TOTP by default in user_fixture (was enabled for all 7400+ tests)
- Enable TOTP only where needed (auth flows, TOTP-specific tests)
- Update ConnCase helpers to enable TOTP (required for authenticated sessions)
- Update test setups that need TOTP for LiveView authentication

Impact:
- Eliminates unnecessary TOTP secret generation + DB writes for most tests
- Reduces Argon2 password hashing overhead across test suite
- 281 tests now properly handle TOTP requirements

Files updated:
- test/support/fixtures/accounts_fixtures.ex: enable_totp default false → true only when needed
- test/support/conn_case.ex: register_and_log_in_user helpers enable TOTP
- test/towerops/accounts_test.exs: TOTP-related describe blocks enable TOTP
- test/towerops_web/user_auth_test.exs: setup enables TOTP
- test/towerops_web/live/admin/*: admin LiveView tests enable TOTP
- test/towerops_web/live/org/preseem_devices_live_test.exs: enable TOTP
2026-03-06 07:21:52 -06:00
..
browser_session_test.exs more tests and fixes 2026-01-31 16:00:07 -06:00
grant_sudo_mode_test.exs perf: optimize test suite and CI pipeline for maximum speed 2026-03-05 15:04:57 -06:00
hibp_test.exs more tests and fixes 2026-02-07 11:50:18 -06:00
login_attempt_test.exs more tests and fixes 2026-02-07 11:50:18 -06:00
policy_version_test.exs more tests and fixes 2026-02-07 11:50:18 -06:00
scope_test.exs feat: add 12/24-hour time format setting with consistent timezone display 2026-02-13 15:16:29 -06:00
user_agent_parser_test.exs fix user session controller test 2026-02-03 13:42:24 -06:00
user_consent_test.exs more tests and fixes 2026-02-07 11:50:18 -06:00
user_notifier_test.exs Add UserNotifier tests 2026-01-13 08:25:20 -06:00
user_test.exs feat: add 12/24-hour time format setting with consistent timezone display 2026-02-13 15:16:29 -06:00
verify_totp_only_test.exs perf(tests): disable TOTP by default in fixtures for faster tests 2026-03-06 07:21:52 -06:00