import { render } from "@testing-library/react"; import { describe, it, expect } from "vitest"; import PhoneFrame from "./PhoneFrame"; describe("PhoneFrame", () => { it("sizes both wrappers with the dvh-safe min-height utility (not min-h-screen)", () => { const { container } = render(
content
, ); // Both the backdrop wrapper and the inner phone container must use the // fallback-safe utility so the shell tracks the dynamic mobile viewport. const safe = container.querySelectorAll(".min-h-screen-safe"); expect(safe.length).toBe(2); // The brittle 100vh utility must be gone. expect(container.querySelectorAll(".min-h-screen").length).toBe(0); }); });