From cefa3ef7aae199d13997547ff2d2f38454628f19 Mon Sep 17 00:00:00 2001 From: Melvin Ragusa Date: Sat, 24 Jan 2026 13:50:39 +0100 Subject: [PATCH] feat: implement Navbar styling with responsive design and add localStorage mock to Navbar tests. --- src/components/layout/Navbar.module.css | 2 +- src/components/layout/Navbar.test.tsx | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/layout/Navbar.module.css b/src/components/layout/Navbar.module.css index 97eca89..5c3e8f4 100644 --- a/src/components/layout/Navbar.module.css +++ b/src/components/layout/Navbar.module.css @@ -172,7 +172,7 @@ flex-direction: column; gap: 0; padding: var(--space-lg); - background-color: rgba(15, 20, 16, 0.98); + background-color: rgba(15, 20, 16, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--md-sys-color-outline-variant); transform: translateY(-100%); diff --git a/src/components/layout/Navbar.test.tsx b/src/components/layout/Navbar.test.tsx index ba028bf..9052fd7 100644 --- a/src/components/layout/Navbar.test.tsx +++ b/src/components/layout/Navbar.test.tsx @@ -16,6 +16,18 @@ describe('Navbar Performance', () => { configurable: true, get: scrollYGetterSpy as any, }); + + // Mock localStorage + Object.defineProperty(window, 'localStorage', { + value: { + getItem: vi.fn(), + setItem: vi.fn(), + removeItem: vi.fn(), + clear: vi.fn(), + }, + writable: true, + }); + vi.useFakeTimers(); });