Files
music_library/backlog/tasks/ml-182.1 - Wave-1-Drop-unwrap-2-bridges-in-scrobble_live-and-scrobbled_tracks_live-index-tests.md
T
Claudio Ortolina dda700ad96 ML-182: convert 4 test files to PhoenixTest only
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", ...).
2026-05-14 23:22:02 +01:00

30 lines
995 B
Markdown

---
id: ML-182.1
title: >-
Wave 1: Drop unwrap/2 bridges in scrobble_live and scrobbled_tracks_live index
tests
status: Done
assignee: []
created_date: "2026-05-14 22:13"
labels:
- testing
- refactoring
dependencies: []
modified_files:
- test/music_library_web/live/scrobble_live/index_test.exs
- test/music_library_web/live/scrobbled_tracks_live/index_test.exs
parent_task_id: ML-182
priority: medium
ordinal: 11000
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Remove `import Phoenix.LiveViewTest` and eliminate `unwrap/2` bridge patterns in these two files. Both files used `unwrap(fn view -> form(...) |> render_submit(); render(view) end)` to drive search forms. Conversion strategy: visit with query params directly, which triggers `handle_params` and the search — same effect as form submission and simpler.
Also clean up unused module attributes and convert validation-error tests to `fill_in` + `click_button` + `assert_has`.
<!-- SECTION:DESCRIPTION:END -->