29 lines
1.0 KiB
TypeScript
29 lines
1.0 KiB
TypeScript
import { describe, expect, test } from "bun:test";
|
|
import { readFileSync } from "node:fs";
|
|
|
|
describe("home page hierarchy", () => {
|
|
test("desktop layout is selected with useIsMobile rather than Tailwind breakpoint classes", () => {
|
|
const source = readFileSync("src/app/page.tsx", "utf8");
|
|
|
|
expect(source).toContain("useIsMobile");
|
|
expect(source).toContain("grid-cols-[minmax(0,0.75fr)_minmax(0,1.25fr)]");
|
|
expect(source).toContain("AI capture");
|
|
expect(source).toContain("Event timeline");
|
|
});
|
|
|
|
test("manual create is routed through a More menu instead of a primary mobile action", () => {
|
|
const source = readFileSync("src/app/page.tsx", "utf8");
|
|
|
|
expect(source).toContain("More");
|
|
expect(source).not.toContain("New Event</button>");
|
|
});
|
|
|
|
test("mobile layout keeps capture before timeline without order utility breakpoints", () => {
|
|
const source = readFileSync("src/app/page.tsx", "utf8");
|
|
|
|
expect(source).not.toContain("order-1 lg:order-none");
|
|
expect(source).toContain("Import");
|
|
expect(source).toContain("Manual create");
|
|
});
|
|
});
|