import { describe, expect, it, vi } from "vitest";
import { render, screen } from "@testing-library/react";

vi.mock("@/components/auth/AuthLayout", () => ({
  default: ({ activeTab, children }: { activeTab: string; children: React.ReactNode }) => (
    <div data-tab={activeTab}>{children}</div>
  ),
}));
vi.mock("@/components/auth/LoginForm", () => ({ default: () => <form>نموذج تسجيل الدخول</form> }));
import LoginPage from "@/app/login/page";

describe("LoginPage", () => {
  it("renders the login form in the login auth layout", () => {
    render(<LoginPage />);
    expect(screen.getByText("نموذج تسجيل الدخول")).toBeInTheDocument();
    expect(screen.getByText("نموذج تسجيل الدخول").parentElement).toHaveAttribute("data-tab", "login");
  });
});
