Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaitasaini committed Dec 3, 2024
1 parent d54708f commit 7494ac0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import { useStore } from "utils";

const mockCloseHandler = jest.fn();
const mockReportHandler = jest.fn();

jest.mock("utils/state/useStore");
const mockedUseStore = useStore as jest.MockedFunction<typeof useStore>;
Expand All @@ -22,6 +23,7 @@ const modalComponent = (
isOpen: true,
onClose: mockCloseHandler,
}}
reportHandler={mockReportHandler}
/>
</RouterWrappedComponent>
);
Expand All @@ -38,7 +40,7 @@ describe("Test AddEditProgramModal", () => {

test("AddEditReportModal shows the contents", () => {
expect(screen.getByText("QMS Report Name")).toBeTruthy();
expect(screen.getByText("Submit")).toBeTruthy();
expect(screen.getByText("Start new")).toBeTruthy();
});

test("AddEditReportModal top close button can be clicked", () => {
Expand Down

0 comments on commit 7494ac0

Please sign in to comment.