diff --git a/public/app/features/dashboard/dashgrid/PanelStateWrapper.test.tsx b/public/app/features/dashboard/dashgrid/PanelStateWrapper.test.tsx index 6f2c92d5f8a..8b6be6c4b98 100644 --- a/public/app/features/dashboard/dashgrid/PanelStateWrapper.test.tsx +++ b/public/app/features/dashboard/dashgrid/PanelStateWrapper.test.tsx @@ -137,70 +137,6 @@ describe('PanelStateWrapper', () => { }); }); }); - - describe('Panel row', () => { - it('should call query runner when it is not a row panel', async () => { - const subject: ReplaySubject = new ReplaySubject(); - - const panelQueryRunner = { - getData: () => subject, - run: jest.fn(), - } as unknown as PanelQueryRunner; - - const options = { - panel: new PanelModel({ - id: 123, - events: new EventBusSrv(), - getQueryRunner: () => panelQueryRunner, - getOptions: jest.fn(), - getDisplayTitle: jest.fn(), - }), - dashboard: { - panelInitialized: (panel: PanelModel) => panel.refresh(), - getTimezone: () => 'browser', - events: new EventBusSrv(), - canAddAnnotations: jest.fn(), - canEditAnnotations: jest.fn(), - canDeleteAnnotations: jest.fn(), - } as unknown as DashboardModel, - isInView: true, - }; - const { props } = setupTestContext(options); - - expect(props.panel.getQueryRunner().run).toHaveBeenCalled(); - }); - it('should not call query runner when it is a row panel', async () => { - const subject: ReplaySubject = new ReplaySubject(); - - const panelQueryRunner = { - getData: () => subject, - run: jest.fn(), - } as unknown as PanelQueryRunner; - - const options = { - panel: new PanelModel({ - id: 123, - events: new EventBusSrv(), - getQueryRunner: () => panelQueryRunner, - getOptions: jest.fn(), - getDisplayTitle: jest.fn(), - type: 'row', - }), - dashboard: { - panelInitialized: (panel: PanelModel) => panel.refresh(), - getTimezone: () => 'browser', - events: new EventBusSrv(), - canAddAnnotations: jest.fn(), - canEditAnnotations: jest.fn(), - canDeleteAnnotations: jest.fn(), - } as unknown as DashboardModel, - isInView: true, - }; - const { props } = setupTestContext(options); - - expect(props.panel.getQueryRunner().run).not.toHaveBeenCalled(); - }); - }); }); const TestPanelComponent = () =>
Plugin Panel to Render
;