Files
music_library/backlog/completed/ml-182.1 - Wave-1-Drop-unwrap-2-bridges-in-scrobble_live-and-scrobbled_tracks_live-index-tests.md
T
Claudio Ortolina 0881971635 Backlog cleanup
2026-05-19 09:48:55 +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 -->