towerops/lib/towerops_web/live/org
Graham McIntire aa7fc830e5 test: refactor LiveView tests to use HTML-aware element/form helpers
Apply patterns from testingliveview.com — replace render_click/submit/change
event-name calls with element/form-targeted equivalents that validate the
actual DOM wiring, not just handler logic. Adds stable test selectors
(id="...") to interactive elements across 10 LiveView templates.

Surfaces (and fixes) several real issues that the bypass-style tests masked:
- Removes dead regenerate_token handler in agent_live/index.ex (no UI ever
  triggered it) and its corresponding test.
- Removes dead refresh_topology test in network_map_live_test (event was
  referenced only in the test — no handler, no button, no JS anywhere).
- Corrects "shows notification tab with add device modal" — modal lives on
  the security tab; original test mounted ?tab=notifications and only
  worked because direct event calls bypassed tab gating.
- Corrects form input shape mismatches in agent_live/index_test that the
  handler's defensive case clauses had been masking.
- Expands setup data for org/settings_live_test (snmp_community,
  default_agent_token_id, multi-org membership) so the gated buttons
  actually render.

11 direct render_click/submit/change calls remain — all intentional,
documented server-side guard tests (tampered POSTs, race conditions,
defensive idempotent handlers).

Full LiveView test suite: 1300 tests, 0 failures.
2026-04-29 11:14:20 -05:00
..
gaiia_mapping_live.ex tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
gaiia_mapping_live.html.heex ux: improve navigation, tooltips, and discoverability across pages 2026-03-12 13:40:10 -05:00
gaiia_reconciliation_live.ex i18n: wrap all user-facing strings in gettext() 2026-02-14 17:44:01 -06:00
gaiia_reconciliation_live.html.heex ux: improve navigation, tooltips, and discoverability across pages 2026-03-12 13:40:10 -05:00
integrations_live.ex fix: make sidebar sticky with header and resolve all credo issues (#32) 2026-03-15 18:19:09 -05:00
integrations_live.html.heex reliability-audit-fixes (#181) 2026-03-26 14:10:36 -05:00
preseem_devices_live.ex fix/findings-medium-priority (#188) 2026-03-27 12:31:53 -05:00
preseem_devices_live.html.heex ux: overhaul Preseem devices page to match Gaiia mapping UX 2026-03-13 11:38:45 -05:00
preseem_insights_live.ex dialyzer: fix remaining 88 warnings — clean dialyzer run 2026-04-21 10:32:42 -05:00
preseem_insights_live.html.heex ux: improve navigation, tooltips, and discoverability across pages 2026-03-12 13:40:10 -05:00
settings_live.ex tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
settings_live.html.heex test: refactor LiveView tests to use HTML-aware element/form helpers 2026-04-29 11:14:20 -05:00