Cap every page at 1920px so layouts stop stretching on ultrawide viewports.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -72,6 +72,17 @@ describe("RootLayout", () => {
|
||||
expect(container).toBeTruthy();
|
||||
});
|
||||
|
||||
test("caps the page shell at 1920px", () => {
|
||||
const tree = RootLayout({ children: <div>Test content</div> });
|
||||
const container = findDescendant(
|
||||
tree,
|
||||
(n) => n.type === "div" && n.props?.className?.includes("min-h-screen"),
|
||||
);
|
||||
expect(container.props.className).toContain("max-w-[1920px]");
|
||||
expect(container.props.className).toContain("mx-auto");
|
||||
expect(container.props.className).toContain("w-full");
|
||||
});
|
||||
|
||||
test("renders children directly inside the flex container (no <main> at root)", () => {
|
||||
const testContent = "This is test content";
|
||||
const tree = RootLayout({ children: <div>{testContent}</div> });
|
||||
|
||||
Reference in New Issue
Block a user