mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DashGPT: Autogenerate panel title and description on scenes (#84726)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
This commit is contained in:
@@ -5,8 +5,10 @@ import { VizPanel } from '@grafana/scenes';
|
||||
import { OptionFilter } from 'app/features/dashboard/components/PanelEditor/OptionsPaneOptions';
|
||||
|
||||
import { DashboardGridItem } from '../scene/DashboardGridItem';
|
||||
import { DashboardScene } from '../scene/DashboardScene';
|
||||
import { LibraryVizPanel } from '../scene/LibraryVizPanel';
|
||||
import { vizPanelToPanel } from '../serialization/transformSceneToSaveModel';
|
||||
import * as utils from '../utils/utils';
|
||||
|
||||
import { PanelOptions } from './PanelOptions';
|
||||
import { VizPanelManager } from './VizPanelManager';
|
||||
@@ -17,6 +19,9 @@ jest.mock('react-router-dom', () => ({
|
||||
}),
|
||||
}));
|
||||
|
||||
// Needed when the panel is not part of an DashboardScene
|
||||
jest.spyOn(utils, 'getDashboardSceneFor').mockReturnValue(new DashboardScene({}));
|
||||
|
||||
describe('PanelOptions', () => {
|
||||
it('gets library panel options when the editing a library panel', async () => {
|
||||
const panel = new VizPanel({
|
||||
|
||||
Reference in New Issue
Block a user