towerops/test/support/fixtures
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
..
accounts_fixtures.ex perf(tests): disable TOTP by default in fixtures for faster tests 2026-03-06 07:21:52 -06:00
accounts_fixtures_test.exs remove passkeys for now 2026-01-31 09:50:35 -06:00
agents_fixtures.ex rename equipment to device 2026-01-17 14:48:46 -06:00
agents_fixtures_test.exs make devices site optional and many test fix 2026-02-04 15:05:42 -06:00
devices_fixtures.ex fix snmp v3 test 2026-02-06 10:21:54 -06:00
integrations_fixtures.ex add integrations test fixture 2026-02-12 17:03:00 -06:00
jobs_fixtures.ex more tests and fixes 2026-02-07 11:50:18 -06:00
organizations_fixtures.ex Add comprehensive tests for API authentication and authorization 2026-02-05 16:39:01 -06:00
organizations_fixtures_test.exs Add tests for OrganizationsFixtures 2026-01-13 08:59:40 -06:00