mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Emit AppEvent when opening Catalog and changing Catalog Category. Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com> * Add getName method to CatalogCategory Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
31 lines
762 B
TypeScript
31 lines
762 B
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
|
|
import { CatalogCategory, CatalogCategorySpec } from "../catalog";
|
|
|
|
class TestCatalogCategory extends CatalogCategory {
|
|
public readonly apiVersion = "catalog.k8slens.dev/v1alpha1";
|
|
public readonly kind = "CatalogCategory";
|
|
public metadata = {
|
|
name: "Test Category",
|
|
icon: "",
|
|
};
|
|
public spec: CatalogCategorySpec = {
|
|
group: "entity.k8slens.dev",
|
|
versions: [],
|
|
names: {
|
|
kind: "Test",
|
|
},
|
|
};
|
|
}
|
|
|
|
describe("CatalogCategory", () => {
|
|
it("returns name", () => {
|
|
const category = new TestCatalogCategory();
|
|
|
|
expect(category.getName()).toEqual("Test Category");
|
|
});
|
|
});
|