From 86018141d095c8ce48b43157a6abc2cc1b6e9bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=A4ggmark?= Date: Fri, 5 Dec 2025 11:58:06 +0100 Subject: [PATCH] chore: updates after pr feedback --- packages/grafana-runtime/src/config.ts | 1 + public/app/features/dashboard/components/GenAI/utils.test.ts | 2 +- .../features/plugins/extensions/usePluginComponents.test.tsx | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/grafana-runtime/src/config.ts b/packages/grafana-runtime/src/config.ts index 17fbbef447a..61ec79d23eb 100644 --- a/packages/grafana-runtime/src/config.ts +++ b/packages/grafana-runtime/src/config.ts @@ -86,6 +86,7 @@ export class GrafanaBootConfig { snapshotEnabled = true; datasources: { [str: string]: DataSourceInstanceSettings } = {}; panels: { [key: string]: PanelPluginMeta } = {}; + /** @deprecated it will be removed in a future release, use getAppPluginMetas() function instead */ apps: Record = {}; auth: AuthSettings = {}; minRefreshInterval = ''; diff --git a/public/app/features/dashboard/components/GenAI/utils.test.ts b/public/app/features/dashboard/components/GenAI/utils.test.ts index a1f0f12810a..0310e5fbfca 100644 --- a/public/app/features/dashboard/components/GenAI/utils.test.ts +++ b/public/app/features/dashboard/components/GenAI/utils.test.ts @@ -19,7 +19,7 @@ jest.mock('@grafana/llm', () => ({ jest.mock('@grafana/runtime', () => ({ ...jest.requireActual('@grafana/runtime'), - getAppPluginMeta: (id: string) => ({ [id]: {} }), + getAppPluginMeta: () => ({}), })); describe('getDashboardChanges', () => { diff --git a/public/app/features/plugins/extensions/usePluginComponents.test.tsx b/public/app/features/plugins/extensions/usePluginComponents.test.tsx index dc9750f5350..9fca0e89482 100644 --- a/public/app/features/plugins/extensions/usePluginComponents.test.tsx +++ b/public/app/features/plugins/extensions/usePluginComponents.test.tsx @@ -510,8 +510,8 @@ describe('usePluginComponents()', () => { }; // The `AddedComponentsRegistry` is validating if the link is registered in the plugin metadata. - const plugin = getAppPluginMeta(pluginId); - const config = { ...plugin, extensions: { ...plugin.extensions, addedComponents: [componentConfig] } }; + const meta = getAppPluginMeta(pluginId); + const config = { ...meta, extensions: { ...meta.extensions, addedComponents: [componentConfig] } }; setAppPluginMetas({ [pluginId]: config }); wrapper = ({ children }: { children: React.ReactNode }) => (