ML-142: Improve scrobble UI in the release component
- Sticky bar for easier track-based scrobbling - Support setting custom finish time
This commit is contained in:
@@ -83,7 +83,7 @@ defmodule MusicLibraryWeb.CollectionLive.ShowTest do
|
||||
|> visit(~p"/collection/#{record.id}")
|
||||
|> assert_has("button", "Show Tracks")
|
||||
|> unwrap(&render_async/1)
|
||||
|> assert_has("a", "Connect your Last.fm account")
|
||||
|> assert_has("a", "Connect Last.fm")
|
||||
|
||||
release =
|
||||
MusicBrainz.Release.from_api_response(release_response)
|
||||
|
||||
@@ -112,6 +112,23 @@ defmodule MusicLibraryWeb.ScrobbleLive.ShowTest do
|
||||
|> assert_has("#toast-group", "Disc scrobbled successfully")
|
||||
end
|
||||
|
||||
test "scrobble single medium still works with tracks selected elsewhere", %{conn: conn} do
|
||||
track_id = first_track_id()
|
||||
session = visit(conn, ~p"/scrobble/#{@release_id}")
|
||||
|
||||
session
|
||||
|> unwrap(fn view ->
|
||||
# Select a track first — AC#3 regression: medium scrobble must not be
|
||||
# blocked just because something is ticked.
|
||||
view
|
||||
|> element("#scrobble-release-form")
|
||||
|> render_change(%{"release" => %{"selected_tracks" => [track_id]}})
|
||||
|
||||
render_click(view, "scrobble_medium", %{"number" => "1"})
|
||||
end)
|
||||
|> assert_has("#toast-group", "Disc scrobbled successfully")
|
||||
end
|
||||
|
||||
test "toggle track on and off changes button label", %{conn: conn} do
|
||||
track_id = first_track_id()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user