1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
Panu Horsmalahti 2021-08-31 10:41:24 +03:00
parent 8711fec4ad
commit 4c3b02561d

View File

@ -82,7 +82,7 @@ const entity2 = new WebLink({
});
const entitykc = new KubernetesCluster({
metadata: {
uid: "test2",
uid: "test3",
name: "test-link",
source: "test",
labels: {}
@ -300,12 +300,19 @@ describe("CatalogEntityRegistry", () => {
const catalog = new TestCatalogEntityRegistry(catalogCategoryRegistry);
catalog.replaceItems(source);
expect(catalog.items.length).toBe(3);
expect(catalog.filteredItems.length).toBe(3);
const d = catalog.addCatalogFilter(entity => entity.kind === KubernetesCluster.kind);
expect(catalog.items.length).toBe(1);
d();
expect(catalog.items.length).toBe(3);
expect(catalog.filteredItems.length).toBe(1);
// Remove filter
d();
expect(catalog.items.length).toBe(3);
expect(catalog.filteredItems.length).toBe(3);
});
});