diff --git a/ui/src/Components/Grid/AlertGrid/index.test.js b/ui/src/Components/Grid/AlertGrid/index.test.js index 4f3f7f3e6..8e7e5dd6e 100644 --- a/ui/src/Components/Grid/AlertGrid/index.test.js +++ b/ui/src/Components/Grid/AlertGrid/index.test.js @@ -89,6 +89,15 @@ describe("", () => { expect(instance.masonryComponentReference.ref.forcePack).toHaveBeenCalled(); }); + it("masonryRepack() doesn't crash when masonryComponentReference.ref=false`", () => { + const tree = ShallowAlertGrid(); + const instance = tree.instance(); + const repackSpy = jest.spyOn(instance, "masonryRepack"); + instance.masonryComponentReference.ref = false; + instance.componentDidUpdate(); + expect(repackSpy).toHaveBeenCalled(); + }); + it("calling storeMasonryRef() saves the ref in local store", () => { const tree = ShallowAlertGrid(); const instance = tree.instance();