From ec17982eff2fc8a5aed80296e31a16104dac39cf Mon Sep 17 00:00:00 2001 From: Dominik Prokop Date: Tue, 9 Apr 2024 23:35:31 +0200 Subject: [PATCH] Fix PanelOptionsTest --- .../dashboard-scene/panel-edit/PanelOptions.test.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx b/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx index 973d6a433fb..e8d70ee76d7 100644 --- a/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx +++ b/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx @@ -22,6 +22,13 @@ jest.mock('react-router-dom', () => ({ }), })); +jest.mock('@grafana/runtime', () => ({ + ...jest.requireActual('@grafana/runtime'), + getPluginImportUtils: () => ({ + getPanelPluginFromCache: jest.fn(), + }), +})); + // Needed when the panel is not part of an DashboardScene jest.spyOn(utils, 'getDashboardSceneFor').mockReturnValue(new DashboardScene({}));