Show barcodes that are not found inside the results UI

Includes a refactor to extract/cleanup barcode scan logic from the
component to a separate context with a better API.
This commit is contained in:
Claudio Ortolina
2025-03-07 09:14:27 +00:00
parent 12b38ecbb2
commit fee2799d50
6 changed files with 149 additions and 70 deletions
@@ -385,6 +385,7 @@ defmodule MusicLibraryWeb.CollectionLive.IndexTest do
|> visit(~p"/collection/scan")
|> trigger_hook("#barcode-scanner", "barcode_scanned", %{"number" => barcode})
|> assert_has("h2", text: "Marbles")
|> assert_has("span", text: "New")
|> click_button("Import releases")
[record] = MusicLibrary.Repo.all(MusicLibrary.Records.Record)