Skip to content

Commit

Permalink
fix(portal): add test data
Browse files Browse the repository at this point in the history
  • Loading branch information
KsiBart committed Nov 15, 2024
1 parent 9056c56 commit d773b54
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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(
<QueryClientProvider client={queryClient}>
<BrowserRouter>
Expand Down

0 comments on commit d773b54

Please sign in to comment.