diff --git a/frontend/src/pages/DashboardsListPage/__tests__/DashboardListPage.test.tsx b/frontend/src/pages/DashboardsListPage/__tests__/DashboardListPage.test.tsx
index 21cfd2ae65..d075316422 100644
--- a/frontend/src/pages/DashboardsListPage/__tests__/DashboardListPage.test.tsx
+++ b/frontend/src/pages/DashboardsListPage/__tests__/DashboardListPage.test.tsx
@@ -214,13 +214,7 @@ describe('dashboard list page', () => {
});
it('ensure that the export JSON popover action works correctly', async () => {
- const { getByText, getAllByTestId } = render(
-
-
-
-
- ,
- );
+ const { getByText, getAllByTestId } = render();
await waitFor(() => {
const popovers = getAllByTestId('dashboard-action-icon');
@@ -231,6 +225,13 @@ describe('dashboard list page', () => {
const exportJsonBtn = getByText('Export JSON');
expect(exportJsonBtn).toBeInTheDocument();
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,
+ }),
+ );
});
});