Waves 1-2: scrobble_live/index, scrobbled_tracks_live/index, release_group_show, release_show. Dropped unwrap/2 bridges and page_title/1 usage. Search form tests use visit with query params. page_title tests use assert_has("title", ...).
3.5 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, references, documentation, modified_files, priority, ordinal
| id | title | status | assignee | created_date | updated_date | labels | dependencies | references | documentation | modified_files | priority | ordinal | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ML-182 | Analyze and plan elimination of LiveViewTest usage in favor of PhoenixTest | In Progress | 2026-05-14 21:40 | 2026-05-14 22:15 |
|
|
|
|
medium | 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
- #1 All 17 files are classified as fully eliminable, partially eliminable, or blocked with clear rationale for each
- #2 Three blocking patterns (send_update/3, send(view.pid), live_isolated) are documented with suggested workarounds
- #3 A concrete migration order is proposed, prioritizing low-risk fully-eliminable files first
- #4 Cost estimates (effort level: low/medium/high) are assigned to each file or group of files
Implementation Notes
Key challenges discovered during execution
-
PhoenixTest can't click
<span>elements (Fluxon.badge) — only<a>(click_link) and<button>(click_button). HTML changes needed for badge-based interactions. -
Fluxon input labels using
data-part="field"wrapper without separate visible text labels don't matchfill_in. Workaround: visit with query params to triggerhandle_paramssearch. -
LiveComponent modals with
phx-targetdon't respond to URL query params — need actual form interaction, which is harder with PhoenixTest when labels are missing. -
trigger_hookin PhoenixTest expects JSON-encoded values, not Elixir maps. Different API from LiveViewTest'srender_hook. -
render_async/1is auto-imported by ConnCase — can useunwrap(&render_async/1)without any explicit import. This is the only LiveViewTest function that remains needed for async data loading.