Files
govoplan-approvals/webui/tests/workspace-layout-ui-structure.test.mjs
T

15 lines
954 B
JavaScript

import assert from "node:assert/strict";
import fs from "node:fs";
const page = fs.readFileSync("src/features/approvals/ApprovalsPage.tsx", "utf8");
const styles = fs.readFileSync("src/styles/approvals.css", "utf8");
assert.ok(page.includes("<WorkspaceLayout"), "Approvals must use the shared workspace shell");
assert.ok(page.includes('variant="split"'), "Approvals must use the shared split-pane geometry");
assert.ok(page.includes('primarySize="compact"'), "The request list uses the bounded compact pane width");
assert.ok(page.includes("primaryScrollable={false}"), "The request list delegates scrolling to its contained viewport");
assert.ok(page.includes("contentScrollable={false}"), "The detail pane delegates scrolling to its contained viewport");
assert.ok(!styles.includes(".approvals-shell { display: grid"), "Approvals must not redefine the shared split-pane grid");
console.log("Approval workspace layout structural contract passed.");