Navigation, state management, create rule button integration
This commit is contained in:
@@ -1,7 +1,21 @@
|
||||
import React from "react";
|
||||
import { vi } from "vitest";
|
||||
import TopNav from "../../app/components/navigation/TopNav";
|
||||
import { componentTestSuite } from "../utils/componentTestSuite";
|
||||
|
||||
// Mock next/navigation (TopNav uses useRouter for Create Rule button and usePathname for nav state)
|
||||
vi.mock("next/navigation", () => ({
|
||||
useRouter: () => ({
|
||||
push: vi.fn(),
|
||||
replace: vi.fn(),
|
||||
prefetch: vi.fn(),
|
||||
back: vi.fn(),
|
||||
forward: vi.fn(),
|
||||
refresh: vi.fn(),
|
||||
}),
|
||||
usePathname: () => "/",
|
||||
}));
|
||||
|
||||
type TopNavProps = React.ComponentProps<typeof TopNav>;
|
||||
|
||||
// Test folderTop=false variant (standard header)
|
||||
|
||||
Reference in New Issue
Block a user