ML-182.5: wave 5 conversion

This commit is contained in:
Claudio Ortolina
2026-05-14 23:25:05 +01:00
parent 3cb7509a4b
commit f20a7af5d7
@@ -0,0 +1,37 @@
---
id: ML-182.5
title: "Wave 5: Files with send(view.pid) and live_isolated blockers (4 files)"
status: To Do
assignee: []
created_date: "2026-05-14 22:15"
labels:
- testing
- refactoring
dependencies: []
modified_files:
- test/music_library_web/live/collection_live/index_test.exs
- test/music_library_web/live/wishlist_live/index_test.exs
- test/music_library_web/live_helpers/record_actions_test.exs
- test/music_library_web/components/release_test.exs
parent_task_id: ML-182
priority: medium
ordinal: 15000
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Files blocked by `send(view.pid, message)` pattern for testing internal `handle_info/2` callbacks, plus `live_isolated/3` and `render_change/2` with nested LiveComponent form data.
- **collection_live/index_test.exs**: 2 PubSub tests use `send(view.pid, :records_index_changed)`. 3 cart format-change tests use `live/2` with nested `render_change/2` params. Workaround needed: trigger actual PubSub broadcasts or use alternative approach for PID message testing.
- **wishlist_live/index_test.exs**: Same PubSub pattern (2 tests). Single-item import test uses `live/2` for synchronous import flow.
- **record_actions_test.exs**: One test uses `send(view.pid, {Chat, :chats_changed})`. Rest are standard `live/2`+`render_click/3`.
- **components/release_test.exs**: `render_change/2` with nested LiveComponent form data (`%{"release" => %{"finished_at" => ...}}`). `ShowPrintTest` sub-module uses `live_isolated/3`. Workaround: test through parent LiveView page.
Blocking patterns:
1. `send(view.pid, message)` — PhoenixTest sessions don't expose LiveView PIDs
2. `live_isolated/3` — no PhoenixTest equivalent; test through parent page
3. `render_change/2` with nested params — `fill_in` works for individual fields but not bulk nested changes
<!-- SECTION:DESCRIPTION:END -->