--- id: ML-182 title: Analyze and plan elimination of LiveViewTest usage in favor of PhoenixTest status: Done assignee: [] created_date: "2026-05-14 21:40" updated_date: "2026-05-23 06:17" labels: - testing - refactoring - analysis dependencies: [] references: - >- test/support/conn_case.ex (shows auto-imported LiveViewTest subset and PhoenixTest) documentation: - "https://hexdocs.pm/phoenix_test/PhoenixTest.html" - "https://hexdocs.pm/phoenix_live_view/Phoenix.LiveViewTest.html" modified_files: - test/music_library_web/components/chat_test.exs - test/music_library_web/components/release_test.exs - test/music_library_web/live/artist_live/show_test.exs - test/music_library_web/live/collection_live/index_test.exs - test/music_library_web/live/maintenance_live/index_test.exs - test/music_library_web/live/online_store_template_live/index_test.exs - test/music_library_web/live/record_set_live/index_test.exs - test/music_library_web/live/record_set_live/show_test.exs - test/music_library_web/live/scrobble_live/index_test.exs - test/music_library_web/live/scrobble_live/release_group_show_test.exs - test/music_library_web/live/scrobble_live/release_show_test.exs - test/music_library_web/live/scrobble_rules_live/index_test.exs - test/music_library_web/live/scrobbled_tracks_live/index_test.exs - test/music_library_web/live/scrobbled_tracks_live/rule_picker_test.exs - test/music_library_web/live/stats_live/top_albums_test.exs - test/music_library_web/live/wishlist_live/index_test.exs - test/music_library_web/live_helpers/record_actions_test.exs priority: medium ordinal: 10000 --- ## Description Audit all LiveView and component tests that mix LiveViewTest and PhoenixTest, and eliminate LiveViewTest usage where possible. The project's ConnCase auto-imports both frameworks, creating unnecessary dual-framework complexity. The work is broken into 6 waves by difficulty, each tracked as a subtask. ## Acceptance Criteria - [x] #1 All 17 files are classified as fully eliminable, partially eliminable, or blocked with clear rationale for each - [x] #2 Three blocking patterns (send_update/3, send(view.pid), live_isolated) are documented with suggested workarounds - [x] #3 A concrete migration order is proposed, prioritizing low-risk fully-eliminable files first - [x] #4 Cost estimates (effort level: low/medium/high) are assigned to each file or group of files ## Implementation Notes ## Key challenges discovered during execution 1. **PhoenixTest can't click `` elements** (Fluxon `.badge`) — only `` (`click_link`) and `