Skip to content

Commit

Permalink
test: vitest for external transfer page
Browse files Browse the repository at this point in the history
  • Loading branch information
BCerki committed Jan 17, 2025
1 parent ce2f30e commit 8c02816
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { render, screen } from "@testing-library/react";
import ExternalTransferPage from "@/administration/app/components/transfers/ExternalTransferPage";

describe("ExternalTransferPage component", () => {
beforeEach(async () => {
vi.resetAllMocks();
});

it("renders the external transfers apge", async () => {
render(await ExternalTransferPage());
expect(
screen.getByRole("heading", { name: /Report Transfers and Closures/i }),
).toBeVisible();
// Note component
expect(
screen.getByRole("link", { name: "Report an Event" }),
).toHaveAttribute(
"href",
"https://submit.digital.gov.bc.ca/app/form/submit?f=d26fb011-2846-44ed-9f5c-26e2756a758f",
);

expect(
screen.getByRole("link", { name: "[email protected]" }),
).toHaveAttribute("href", "mailto:[email protected]");
});
});

0 comments on commit 8c02816

Please sign in to comment.