mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Ability to browse Random Albums
This commit is contained in:
@@ -556,9 +556,10 @@ describe("api", () => {
|
||||
{ itemType: "container", id: "artists", title: "Artists" },
|
||||
{ itemType: "container", id: "albums", title: "Albums" },
|
||||
{ itemType: "container", id: "genres", title: "Genres" },
|
||||
{ itemType: "container", id: "randomAlbums", title: "Random" },
|
||||
],
|
||||
index: 0,
|
||||
total: 3,
|
||||
total: 4,
|
||||
})
|
||||
);
|
||||
});
|
||||
@@ -889,6 +890,19 @@ describe("api", () => {
|
||||
musicService.hasArtists(artist1, artist2, artist3, artist4);
|
||||
});
|
||||
|
||||
describe("asking for random albums", () => {
|
||||
it("should return some", async () => {
|
||||
const result = await ws.getMetadataAsync({
|
||||
id: "randomAlbums",
|
||||
index: 0,
|
||||
count: 100,
|
||||
});
|
||||
expect(result[0].getMetadataResult.index).toEqual(0);
|
||||
expect(result[0].getMetadataResult.count).toEqual(6);
|
||||
expect(result[0].getMetadataResult.total).toEqual(6);
|
||||
});
|
||||
});
|
||||
|
||||
describe("asking for all albums", () => {
|
||||
it("should return them all", async () => {
|
||||
const result = await ws.getMetadataAsync({
|
||||
|
||||
Reference in New Issue
Block a user