[v11.0.x] Home dashboard test (#87024)
Home dashboard test (#86961)
home dashboard test
(cherry picked from commit 8705e03d57)
Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
This commit is contained in:
co-authored by
Victor Marin
parent
452be5b172
commit
0e8622ec0a
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user