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

View File

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