Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
19 lines
940 B
TypeScript
19 lines
940 B
TypeScript
import { render, screen } from "@testing-library/react";
|
|
import { describe, it, expect, vi } from "vitest";
|
|
|
|
vi.mock("next/navigation", () => ({ useRouter: () => ({ push: vi.fn() }) }));
|
|
vi.mock("@/app/lib/clientApi", () => ({ apiPost: vi.fn(), ApiError: class ApiError extends Error {} }));
|
|
vi.mock("@/app/lib/AdminAuthContext", () => ({ useAdminAuth: () => ({ refresh: vi.fn() }) }));
|
|
|
|
import ResetPasswordPage from "./page";
|
|
|
|
describe("ResetPasswordPage frame", () => {
|
|
it("uses the login two-column frame", () => {
|
|
const { container } = render(<ResetPasswordPage />);
|
|
expect(screen.getByText("Everything behind Co-Lite, in one place.")).toBeInTheDocument();
|
|
expect(container.querySelector(".giraffe-spots")).not.toBeNull();
|
|
expect(screen.getByRole("link", { name: "Containerverse Sdn. Bhd." })).toBeInTheDocument();
|
|
expect(screen.getByRole("heading", { name: "Set your password" })).toBeInTheDocument();
|
|
});
|
|
});
|