feat(ui): drive mobile layouts from useIsMobile
This commit is contained in:
@@ -2,12 +2,11 @@ import { describe, expect, test } from "bun:test";
|
||||
import { readFileSync } from "node:fs";
|
||||
|
||||
describe("home page hierarchy", () => {
|
||||
test("desktop layout defines aligned AI and timeline top-row sections", () => {
|
||||
test("desktop layout is selected with useIsMobile rather than Tailwind breakpoint classes", () => {
|
||||
const source = readFileSync("src/app/page.tsx", "utf8");
|
||||
|
||||
expect(source).toContain(
|
||||
"lg:grid-cols-[minmax(0,0.75fr)_minmax(0,1.25fr)]",
|
||||
);
|
||||
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");
|
||||
});
|
||||
@@ -19,10 +18,10 @@ describe("home page hierarchy", () => {
|
||||
expect(source).not.toContain("New Event</button>");
|
||||
});
|
||||
|
||||
test("mobile layout keeps capture before timeline and keeps manual create secondary", () => {
|
||||
test("mobile layout keeps capture before timeline without order utility breakpoints", () => {
|
||||
const source = readFileSync("src/app/page.tsx", "utf8");
|
||||
|
||||
expect(source).toContain("order-1 lg:order-none");
|
||||
expect(source).not.toContain("order-1 lg:order-none");
|
||||
expect(source).toContain("Import");
|
||||
expect(source).toContain("Manual create");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user