chore: updates after pr feedback

This commit is contained in:
Hugo Häggmark
2025-12-08 06:08:57 +01:00
parent 7fd2476a12
commit 86018141d0
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -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<string, AppPluginConfigGrafanaData> = {};
auth: AuthSettings = {};
minRefreshInterval = '';
@@ -19,7 +19,7 @@ jest.mock('@grafana/llm', () => ({
jest.mock('@grafana/runtime', () => ({
...jest.requireActual('@grafana/runtime'),
getAppPluginMeta: (id: string) => ({ [id]: {} }),
getAppPluginMeta: () => ({}),
}));
describe('getDashboardChanges', () => {
@@ -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 }) => (