Name the bounded frame: fill:true on the shell, and the contract minor that ships it
CI / full-gate (push) Successful in 2m52s

This commit is contained in:
2026-09-08 17:27:21 +02:00
parent 706abf1204
commit 11ba843ab1
13 changed files with 117 additions and 39 deletions
+10
View File
@@ -95,10 +95,20 @@ test("app shell can disable the menu: no sidebar, focused single-column layout",
assert.doesNotMatch(bare, /<aside class="sidebar"/); // sidebar dropped
assert.doesNotMatch(bare, /class="hamburger"/); // and its mobile toggle
assert.match(bare, /<div class="app app-bare">/); // single-column variant
assert.doesNotMatch(bare, /app-fill/); // the document scrolls unless a page says otherwise
assert.match(bare, /<main class="content" id="main-content"/); // content still renders
assert.match(bare, /<section id="b">x<\/section>/);
});
test("app shell: fill:true bounds the viewport, for a page whose own region scrolls", async () => {
// The opt-out from document scrolling is the shell's to give — a page cannot derive the height
// without knowing the topbar's own (AGENTS.md → UI).
const filled = await render({ fill: true, title: "Board", body: "<div>x</div>", nav: "" });
assert.match(filled, /<div class="app app-fill">/);
const bothOff = await render({ fill: true, menu: false, title: "Board", body: "<div>x</div>", nav: "" });
assert.match(bothOff, /<div class="app app-bare app-fill">/);
});
test("app shell: an empty title yields no topbar <h1> so the body owns the single heading; docTitle sets <title>", async () => {
// Auth/landing pass title:"" (their card/hero is the <h1>) + an explicit docTitle for the tab.
const html = await render({ title: "", docTitle: "Sign in", brand: { name: "Acme" }, body: "<h1>Sign in</h1>" });