mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-13 18:56:00 +08:00
chore: address comments
This commit is contained in:
parent
d09c4d947e
commit
8a3319cdf5
@ -214,13 +214,7 @@ describe('dashboard list page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('ensure that the export JSON popover action works correctly', async () => {
|
it('ensure that the export JSON popover action works correctly', async () => {
|
||||||
const { getByText, getAllByTestId } = render(
|
const { getByText, getAllByTestId } = render(<DashboardsList />);
|
||||||
<MemoryRouter initialEntries={['/dashbords']}>
|
|
||||||
<DashboardProvider>
|
|
||||||
<DashboardsList />
|
|
||||||
</DashboardProvider>
|
|
||||||
</MemoryRouter>,
|
|
||||||
);
|
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
const popovers = getAllByTestId('dashboard-action-icon');
|
const popovers = getAllByTestId('dashboard-action-icon');
|
||||||
@ -231,6 +225,13 @@ describe('dashboard list page', () => {
|
|||||||
const exportJsonBtn = getByText('Export JSON');
|
const exportJsonBtn = getByText('Export JSON');
|
||||||
expect(exportJsonBtn).toBeInTheDocument();
|
expect(exportJsonBtn).toBeInTheDocument();
|
||||||
fireEvent.click(exportJsonBtn);
|
fireEvent.click(exportJsonBtn);
|
||||||
expect(dashboardUtils.sanitizeDashboardData).toHaveBeenCalled();
|
const firstDashboardData = dashboardSuccessResponse.data[0];
|
||||||
|
expect(dashboardUtils.sanitizeDashboardData).toHaveBeenCalledWith(
|
||||||
|
expect.objectContaining({
|
||||||
|
id: firstDashboardData.uuid,
|
||||||
|
title: firstDashboardData.data.title,
|
||||||
|
createdAt: firstDashboardData.created_at,
|
||||||
|
}),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user