Users with BO_DASHBOARD get period presets, capture and win tiles, the status funnel, a captures/wins trend and breakdowns by event, salesperson and interest; everyone else keeps the welcome. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
15 lines
545 B
TypeScript
15 lines
545 B
TypeScript
import { render, screen } from "@testing-library/react";
|
|
import { describe, it, expect, vi } from "vitest";
|
|
|
|
vi.mock("@/app/lib/AdminAuthContext", () => ({ useAdminAuth: () => ({ name: "Alice", hasModule: () => false }) }));
|
|
|
|
import HomePage from "./page";
|
|
|
|
describe("HomePage", () => {
|
|
it("shows the Co-Lite heading and welcomes the user by name", () => {
|
|
render(<HomePage />);
|
|
expect(screen.getByRole("heading", { name: "Co-Lite" })).toBeInTheDocument();
|
|
expect(screen.getByText("Welcome, Alice")).toBeInTheDocument();
|
|
});
|
|
});
|