chore: config tests for featureToggle

This commit is contained in:
Alex Spencer
2025-11-26 13:28:15 -08:00
parent 7f30ecb494
commit 3d6deb4656
6 changed files with 30 additions and 0 deletions
@@ -121,6 +121,11 @@ jest.mock('@grafana/runtime', () => ({
getInstanceSettings: () => {},
}),
usePluginLinks: jest.fn(() => ({ links: [] })),
config: {
featureToggles: {
correlationsExploreEditor: false,
},
},
}));
jest.mock('app/core/services/context_srv', () => ({
@@ -12,6 +12,11 @@ const testEventBus = new EventBusSrv();
jest.mock('@grafana/runtime', () => ({
...jest.requireActual('@grafana/runtime'),
getAppEvents: () => testEventBus,
config: {
featureToggles: {
correlationsExploreEditor: false,
},
},
}));
jest.mock('react-virtualized-auto-sizer', () => {
@@ -13,6 +13,11 @@ const testEventBus = new EventBusSrv();
jest.mock('@grafana/runtime', () => ({
...jest.requireActual('@grafana/runtime'),
getAppEvents: () => testEventBus,
config: {
featureToggles: {
correlationsExploreEditor: false,
},
},
}));
jest.mock('app/core/services/context_srv', () => ({
@@ -11,6 +11,11 @@ const testEventBus = new EventBusSrv();
jest.mock('@grafana/runtime', () => ({
...jest.requireActual('@grafana/runtime'),
getAppEvents: () => testEventBus,
config: {
featureToggles: {
correlationsExploreEditor: false,
},
},
}));
jest.mock('react-virtualized-auto-sizer', () => {
@@ -48,6 +48,11 @@ jest.mock('@grafana/runtime', () => ({
},
getAppEvents: () => testEventBus,
usePluginLinks: jest.fn().mockReturnValue({ links: [] }),
config: {
featureToggles: {
correlationsExploreEditor: false,
},
},
}));
jest.mock('app/core/services/context_srv', () => ({
@@ -43,6 +43,11 @@ jest.mock('react-virtualized-auto-sizer', () => {
jest.mock('@grafana/runtime', () => ({
...jest.requireActual('@grafana/runtime'),
getAppEvents: () => testEventBus,
config: {
featureToggles: {
correlationsExploreEditor: false,
},
},
}));
jest.mock('../hooks/useExplorePageTitle', () => ({