towerops/test/towerops_web
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
..
channels perf(tests): make AgentChannel debounce delay configurable for faster tests 2026-03-06 07:21:52 -06:00
components add row_link to table component for proper anchor tags 2026-02-11 08:46:03 -06:00
controllers security: implement comprehensive security audit fixes 2026-03-05 13:08:10 -06:00
helpers feat: add 12/24-hour time format setting with consistent timezone display 2026-02-13 15:16:29 -06:00
integration Merge remote-tracking branch 'origin/main' into feature/preseem-integration 2026-02-13 09:11:45 -06:00
live perf(tests): disable TOTP by default in fixtures for faster tests 2026-03-06 07:21:52 -06:00
plugs feat: add rate limiting to admin endpoints (100 req/min) 2026-03-05 14:11:19 -06:00
permissions_test.exs fix snmp v3 test 2026-02-06 10:21:54 -06:00
plug_exceptions_test.exs handle exceptions gracefully on api endpoints 2026-02-04 12:18:14 -06:00
user_auth_test.exs perf(tests): disable TOTP by default in fixtures for faster tests 2026-03-06 07:21:52 -06:00