Detail panes: poster top right, title and facts left, plot below; sextant rendering
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,8 +28,11 @@ func TestMovieDetails(t *testing.T) {
|
||||
ID: 1, Title: "Alien", Year: 1979, Runtime: 117, Genres: []string{"Horror", "Sci-Fi"},
|
||||
Overview: "In space...", Ratings: radarr.Ratings{IMDB: &radarr.Rating{Value: 8.5}},
|
||||
})
|
||||
if got.plot != "In space..." || strings.Contains(got.head, "In space") {
|
||||
t.Errorf("plot belongs below the head: head=%q plot=%q", got.head, got.plot)
|
||||
}
|
||||
for _, want := range []string{"Alien (1979)", "★ 8.5", "1h57m", "Horror, Sci-Fi", "In library, not downloaded", "In space..."} {
|
||||
if !strings.Contains(got, want) {
|
||||
if !strings.Contains(got.String(), want) {
|
||||
t.Errorf("details missing %q:\n%s", want, got)
|
||||
}
|
||||
}
|
||||
@@ -56,7 +59,7 @@ func TestSeriesLabelAndDetails(t *testing.T) {
|
||||
if got := seriesLabel(s); got != "Breaking Bad (2008)" {
|
||||
t.Errorf("label = %q", got)
|
||||
}
|
||||
got := seriesDetails(s)
|
||||
got := seriesDetails(s).String()
|
||||
for _, want := range []string{"Breaking Bad (2008)", "★ 9.3", "1 season ·", "47 min", "Network: AMC", "Status: ended"} {
|
||||
if !strings.Contains(got, want) {
|
||||
t.Errorf("details missing %q:\n%s", want, got)
|
||||
@@ -65,11 +68,11 @@ func TestSeriesLabelAndDetails(t *testing.T) {
|
||||
|
||||
s.ID = 1
|
||||
s.Statistics = sonarr.Statistics{EpisodeCount: 10, EpisodeFileCount: 4}
|
||||
if got := seriesDetails(s); !strings.Contains(got, "4/10 episodes") {
|
||||
if got := seriesDetails(s).String(); !strings.Contains(got, "4/10 episodes") {
|
||||
t.Errorf("progress missing:\n%s", got)
|
||||
}
|
||||
s.Statistics.EpisodeFileCount = 10
|
||||
if got := seriesDetails(s); !strings.Contains(got, "all episodes downloaded") {
|
||||
if got := seriesDetails(s).String(); !strings.Contains(got, "all episodes downloaded") {
|
||||
t.Errorf("complete marker missing:\n%s", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user