diff --git a/cypress/e2e/dark-mode.cy.ts b/cypress/e2e/dark-mode.cy.ts new file mode 100644 index 0000000..3ee7a16 --- /dev/null +++ b/cypress/e2e/dark-mode.cy.ts @@ -0,0 +1,13 @@ +describe("dark mode", () => { + it("verify a user can toggle between light and dark mode", () => { + cy.visit("/"); + cy.get('[data-testid="moon-icon"]').click(); + cy.get('[data-testid="light-toggle"]').click(); + cy.get('[data-testid="moon-icon"]').should("not.be.visible"); + cy.get('[data-testid="sun-icon"]').should("be.visible"); + + cy.get('[data-testid="dark-toggle"]').click(); + cy.get('[data-testid="moon-icon"]').should("be.visible"); + cy.get('[data-testid="sun-icon"]').should("not.be.visible"); + }); +}); diff --git a/src/app/header.tsx b/src/app/header.tsx index 05cd2c5..2e1172a 100644 --- a/src/app/header.tsx +++ b/src/app/header.tsx @@ -12,7 +12,7 @@ export async function Header() { return (
-
+ pantry tracker logo{" "} PantryTracker -
+
{user && ( diff --git a/src/app/page.tsx b/src/app/page.tsx index d0f593d..e87f71c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,9 +1,27 @@ +import Link from "next/link"; + export default async function Page() { return (
-

Pantry Tracker

- -

Add landing page at one point

+
+
+

+ Streamline Your Kitchen Inventory with Ease +

+

+ Effortless Pantry Management for Smart Food Tracking and Worry-Free + Meal Planning +

+
+ + Get started + +
+
+
); } diff --git a/src/app/theme-toggle.tsx b/src/app/theme-toggle.tsx index 9264016..4a90c1d 100644 --- a/src/app/theme-toggle.tsx +++ b/src/app/theme-toggle.tsx @@ -19,16 +19,28 @@ export function ModeToggle() { - setTheme("light")}> + setTheme("light")} + > Light - setTheme("dark")}> + setTheme("dark")} + > Dark setTheme("system")}>