mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
parent
500558bb72
commit
8705e03d57
@ -1,4 +1,4 @@
|
||||
import { act, fireEvent, render, screen } from '@testing-library/react';
|
||||
import { act, fireEvent, render, screen, waitFor } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import React from 'react';
|
||||
@ -253,6 +253,18 @@ describe('DashboardScenePage', () => {
|
||||
const editMenuItem = await screen.findAllByText('Edit');
|
||||
expect(editMenuItem).toHaveLength(1);
|
||||
});
|
||||
|
||||
describe('home page', () => {
|
||||
it('should not show controls', async () => {
|
||||
getDashboardScenePageStateManager().clearDashboardCache();
|
||||
loadDashboardMock.mockClear();
|
||||
loadDashboardMock.mockResolvedValue({ dashboard: { panels: [] }, meta: {} });
|
||||
|
||||
setup();
|
||||
|
||||
await waitFor(() => expect(screen.queryByText('Refresh')).not.toBeInTheDocument());
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
interface VizOptions {
|
||||
|
Loading…
Reference in New Issue
Block a user