Fix bug where menu item dropped from root container (#68)

This commit is contained in:
Simon J
2021-10-27 08:28:06 +11:00
committed by GitHub
parent b6963cbb8c
commit e58dae5eb9
2 changed files with 156 additions and 158 deletions

View File

@@ -652,8 +652,6 @@ function bindSmapiSoapServiceToExpress(
itemType: "albumList", itemType: "albumList",
}, },
], ],
index: 0,
total: 9,
}); });
case "search": case "search":
return getMetadataResult({ return getMetadataResult({
@@ -674,8 +672,6 @@ function bindSmapiSoapServiceToExpress(
title: lang("tracks"), title: lang("tracks"),
}, },
], ],
index: 0,
total: 3,
}); });
case "artists": case "artists":
return musicLibrary.artists(paging).then((result) => { return musicLibrary.artists(paging).then((result) => {

View File

@@ -950,9 +950,7 @@ describe("api", () => {
index: 0, index: 0,
count: 100, count: 100,
}); });
expect(root[0]).toEqual( const mediaCollection = [
getMetadataResult({
mediaCollection: [
{ {
id: "artists", id: "artists",
title: "Artists", title: "Artists",
@@ -1027,9 +1025,12 @@ describe("api", () => {
).href(), ).href(),
itemType: "albumList", itemType: "albumList",
}, },
], ];
expect(root[0]).toEqual(
getMetadataResult({
mediaCollection,
index: 0, index: 0,
total: 9, total: mediaCollection.length,
}) })
); );
}); });
@@ -1043,9 +1044,7 @@ describe("api", () => {
index: 0, index: 0,
count: 100, count: 100,
}); });
expect(root[0]).toEqual( const mediaCollection = [
getMetadataResult({
mediaCollection: [
{ {
id: "artists", id: "artists",
title: "Artiesten", title: "Artiesten",
@@ -1120,9 +1119,12 @@ describe("api", () => {
).href(), ).href(),
itemType: "albumList", itemType: "albumList",
}, },
], ];
expect(root[0]).toEqual(
getMetadataResult({
mediaCollection,
index: 0, index: 0,
total: 9, total: mediaCollection.length,
}) })
); );
}); });