mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Adding one more test case
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
b8b7c304e6
commit
70fe7be1a0
@ -207,6 +207,21 @@ describe("HotbarStore", () => {
|
|||||||
expect(hotbarStore.getActive().items[0].entity.uid).toEqual("test");
|
expect(hotbarStore.getActive().items[0].entity.uid).toEqual("test");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("new items takes first empty cell", () => {
|
||||||
|
const hotbarStore = HotbarStore.createInstance();
|
||||||
|
const test = new CatalogEntityItem(testCluster);
|
||||||
|
const minikube = new CatalogEntityItem(minikubeCluster);
|
||||||
|
const aws = new CatalogEntityItem(awsCluster);
|
||||||
|
|
||||||
|
hotbarStore.load();
|
||||||
|
hotbarStore.addToHotbar(test);
|
||||||
|
hotbarStore.addToHotbar(aws);
|
||||||
|
hotbarStore.restackItems(0, 3);
|
||||||
|
hotbarStore.addToHotbar(minikube);
|
||||||
|
|
||||||
|
expect(hotbarStore.getActive().items[0].entity.uid).toEqual("minikube");
|
||||||
|
});
|
||||||
|
|
||||||
it("throws if invalid arguments provided", () => {
|
it("throws if invalid arguments provided", () => {
|
||||||
// Prevent writing to stderr during this render.
|
// Prevent writing to stderr during this render.
|
||||||
const err = console.error;
|
const err = console.error;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user