diff --git a/public/dashboard.png b/public/dashboard.png new file mode 100644 index 0000000..3339baa Binary files /dev/null and b/public/dashboard.png differ diff --git a/src/app/dashboard/__tests__/page.test.tsx b/src/app/dashboard/__tests__/page.test.tsx index c016bc8..e59f7a9 100644 --- a/src/app/dashboard/__tests__/page.test.tsx +++ b/src/app/dashboard/__tests__/page.test.tsx @@ -8,6 +8,13 @@ vi.mock("next/navigation", () => ({ redirect: vi.fn(), })); +// Mock next/font/google +vi.mock("next/font/google", () => ({ + Cinzel: () => ({ + className: "mocked-cinzel-font", + }), +})); + // Mock Supabase server client to return a fake authenticated user vi.mock("../../../lib/supabase/server", () => ({ createClient: vi.fn(async () => ({ @@ -36,16 +43,10 @@ describe("Dashboard Page Tests", () => { expect(screen.getByText("Dashboard")).toBeInTheDocument(); }); - it("should display the user email", async () => { - const page = await DashboardPage(); - render(page); - expect(screen.getByText("test@example.com")).toBeInTheDocument(); - }); - it("should render the home link", async () => { const page = await DashboardPage(); render(page); - expect(screen.getByRole("link", { name: /Go home/i })).toBeInTheDocument(); + expect(screen.getByRole("link", { name: /Home/i })).toBeInTheDocument(); }); it("should render the logout button", async () => { @@ -57,6 +58,12 @@ describe("Dashboard Page Tests", () => { it("should render the tutorial link", async () => { const page = await DashboardPage(); render(page); - expect(screen.getByRole("link", { name: /Hello World Tutorial/i })).toBeInTheDocument(); + expect(screen.getByRole("link", { name: /Hello World/i })).toBeInTheDocument(); + }); + + it("should render the profile button", async () => { + const page = await DashboardPage(); + render(page); + expect(screen.getByRole("link", { name: /Profile/i })).toBeInTheDocument(); }); }); diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index f38ae30..6ab4ef7 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -1,6 +1,13 @@ import { redirect } from "next/navigation"; import Link from "next/link"; import { createClient as createServerClient } from "../../lib/supabase/server"; +import { Cinzel } from 'next/font/google'; // Import Cinzel font + +//font for words +const cinzel = Cinzel({ + subsets: ["latin"], + weight: ["400", "700"], +}); async function logout() { "use server"; @@ -19,30 +26,51 @@ export default async function DashboardPage() { redirect("/login"); } + const celestialButtonClasses = "btn border-2 border-cyan-400 text-cyan-400 bg-transparent hover:bg-cyan-900/50 hover:border-cyan-200 hover:text-cyan-200 shadow-lg shadow-cyan-500/50 transition duration-300 ease-in-out w-full"; + const celestialButtonNoFullWidth = "btn border-2 border-cyan-400 text-cyan-400 bg-transparent hover:bg-cyan-900/50 hover:border-cyan-200 hover:text-cyan-200 shadow-lg shadow-cyan-500/50 transition duration-300 ease-in-out"; + + return ( -
-
-

Dashboard

- - Home - - - Profile - -
- -
-
+
+
+ +
+

+ Dashboard +

+
+ + Home + +
+
-

- You're logged in as: {user.email}. -

+ {/* profile & logout */} +
+ + Profile + +
+ +
+
+
- - Hello World Tutorial - + {/* tutorials */} +
+ + Hello World + +
); -} +} \ No newline at end of file