backport node 18 test fix
This commit is contained in:
+2
-1
@@ -75,6 +75,7 @@ beforeEach(() => {
|
|||||||
|
|
||||||
mockPanel = new PanelModel({
|
mockPanel = new PanelModel({
|
||||||
id: 'mockPanelId',
|
id: 'mockPanelId',
|
||||||
|
timezone: 'utc',
|
||||||
});
|
});
|
||||||
|
|
||||||
jest.spyOn(contextSrv, 'hasAccess').mockReturnValue(true);
|
jest.spyOn(contextSrv, 'hasAccess').mockReturnValue(true);
|
||||||
@@ -145,7 +146,7 @@ describe('SharePublic', () => {
|
|||||||
await renderSharePublicDashboard({ panel: mockPanel, dashboard: mockDashboard, onDismiss: () => {} });
|
await renderSharePublicDashboard({ panel: mockPanel, dashboard: mockDashboard, onDismiss: () => {} });
|
||||||
|
|
||||||
await screen.findByText('Welcome to Grafana public dashboards alpha!');
|
await screen.findByText('Welcome to Grafana public dashboards alpha!');
|
||||||
expect(screen.getByText('2022-08-30 00:00:00 to 2022-09-04 01:59:59')).toBeInTheDocument();
|
expect(screen.getByText('2022-08-30 00:00:00 to 2022-09-04 00:59:59')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
it('when modal is opened, then loader spinner appears and inputs are disabled', async () => {
|
it('when modal is opened, then loader spinner appears and inputs are disabled', async () => {
|
||||||
mockDashboard.meta.hasPublicDashboard = true;
|
mockDashboard.meta.hasPublicDashboard = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user