feat(sp6): Inbox page + useInboxLanes hook

This commit is contained in:
Tyler
2026-06-20 18:41:44 -06:00
parent 610e580844
commit b607e4c459
4 changed files with 162 additions and 6 deletions
+33
View File
@@ -0,0 +1,33 @@
// @vitest-environment happy-dom
import { afterEach, describe, expect, it, vi } from "vitest";
import { cleanup, render, waitFor } from "@testing-library/react";
import Inbox from "./Inbox";
afterEach(() => {
cleanup();
vi.unstubAllGlobals();
});
describe("Inbox page", () => {
it("renders the four lane headers", async () => {
vi.stubGlobal(
"fetch",
vi.fn().mockResolvedValue({
ok: true,
json: async () => ({
rejected: [],
candidates: [],
unmatched: [],
done_today: [],
}),
}),
);
const { container } = render(<Inbox />);
await waitFor(() => {
expect(container.textContent).toContain("REJECTED");
expect(container.textContent).toContain("CANDIDATES");
expect(container.textContent).toContain("UNMATCHED");
expect(container.textContent).toContain("DONE");
});
});
});