Files
canina/frontend/application/app/login/page.test.tsx
T
devops 5380bb66bb
Deploy Canina / deploy (push) Successful in 2m46s
test(ux): add frontend quality gates
2026-10-16 20:31:32 +00:00

17 lines
621 B
TypeScript

import React from "react";
import { describe, expect, it, vi } from "vitest";
import { render, screen } from "@testing-library/react";
import LoginPage from "./page";
vi.mock("../../components/AuthModal", () => ({
default: ({ isOpen }: { isOpen: boolean }) => isOpen ? <div role="dialog">ورود به حساب</div> : null,
}));
vi.mock("next/navigation", () => ({ useRouter: () => ({ push: vi.fn() }) }));
describe("/login route", () => {
it("renders the authentication experience instead of a missing-page route", () => {
render(<LoginPage />);
expect(screen.getByRole("dialog")).toBeTruthy();
});
});