diff --git a/kraken-app/kraken-app-portal/src/__test__/pages/Homepage/components/ActivityDiagrams.test.tsx b/kraken-app/kraken-app-portal/src/__test__/pages/Homepage/components/ActivityDiagrams.test.tsx index 997ab9a3..48814a38 100644 --- a/kraken-app/kraken-app-portal/src/__test__/pages/Homepage/components/ActivityDiagrams.test.tsx +++ b/kraken-app/kraken-app-portal/src/__test__/pages/Homepage/components/ActivityDiagrams.test.tsx @@ -3,6 +3,7 @@ import { queryClient } from "@/utils/helpers/reactQuery"; import { QueryClientProvider } from "@tanstack/react-query"; import { fireEvent, render } from "@testing-library/react"; import { BrowserRouter } from "react-router-dom"; +import * as homepageHooks from '@/hooks/homepage' test("ActivityDiagrams test", () => { const envs = { @@ -16,6 +17,24 @@ test("ActivityDiagrams test", () => { ], }; + vi.spyOn(homepageHooks, "useGetErrorBrakedown").mockReturnValue({ + data: { + errorBreakdowns: [ + { + date: "2024-05-30T13:02:03.224486Z", + errors: { + 400: 1, + 401: 1, + 404: 1, + 500: 1, + } + }, + ], + }, + isLoading: false, + refetch: vi.fn() + } as any); + const { container, getByTestId } = render(