diff --git a/ui/components/auth/oss/auth-layout.test.tsx b/ui/components/auth/oss/auth-layout.test.tsx index baf504cc58..452b423d12 100644 --- a/ui/components/auth/oss/auth-layout.test.tsx +++ b/ui/components/auth/oss/auth-layout.test.tsx @@ -5,11 +5,13 @@ import { AuthLayout } from "./auth-layout"; import { PublicAuthShell } from "./public-auth-shell"; vi.mock("@/components/ThemeSwitch", () => ({ - ThemeSwitch: () => , + ThemeSwitch: ({ "aria-label": ariaLabel }: { "aria-label"?: string }) => ( + + ), })); describe("AuthLayout", () => { - it("renders the auth card title and content without the theme toggle", () => { + it("renders the auth card title and content", () => { // Given const title = "Sign in to Prowler"; @@ -23,9 +25,6 @@ describe("AuthLayout", () => { // Then expect(screen.getByText(title)).toBeVisible(); expect(screen.getByRole("form", { name: "Sign in form" })).toBeVisible(); - expect( - screen.queryByRole("button", { name: "Auth card theme toggle" }), - ).not.toBeInTheDocument(); }); it("renders the brand in the centered auth layout flow above the card", () => { diff --git a/ui/components/auth/oss/auth-layout.tsx b/ui/components/auth/oss/auth-layout.tsx index c03695dba9..1b970f8865 100644 --- a/ui/components/auth/oss/auth-layout.tsx +++ b/ui/components/auth/oss/auth-layout.tsx @@ -1,6 +1,7 @@ import { ReactNode } from "react"; import { ProwlerBrand } from "@/components/icons"; +import { ThemeSwitch } from "@/components/ThemeSwitch"; interface AuthLayoutProps { title: string; @@ -26,8 +27,11 @@ export const AuthLayout = ({ title, children }: AuthLayoutProps) => { {/* Auth Form Container */}
{title}
+ {/* Header with Title and Theme Toggle */} +{title}
+