chore: updates after pr feedback
This commit is contained in:
@@ -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 }) => (
|
||||
|
||||
Reference in New Issue
Block a user