import { describe, expect, it } from "vitest";
import { resolveDisplayLayout } from "./displayLayout";

describe("resolveDisplayLayout", () => {
  it("uses the top-screen-first single layout for ordinary browsers", () => {
    expect(resolveDisplayLayout({})).toBe("single");
    expect(resolveDisplayLayout({ layout: "single" })).toBe("single");
  });

  it("keeps the dual-screen hardware mockup behind an explicit preview", () => {
    expect(resolveDisplayLayout({ layout: "thor-preview" })).toBe("thor-preview");
    expect(resolveDisplayLayout({ layout: "dual" })).toBe("thor-preview");
  });

  it("never overrides a dedicated Android display surface", () => {
    expect(resolveDisplayLayout({ display: "top", layout: "single" })).toBe("dedicated");
    expect(resolveDisplayLayout({ display: "bottom", layout: "thor-preview" })).toBe("dedicated");
  });
});
