Files
openclaw/src/boards/sqlite-board-codec.test.ts
Peter Steinberger 67a15e63e2 feat(dashboard): widget presentation contract, shared frame inset, and intrinsic auto height (#111977)
* feat(boards): widget presentation contract and height mode in protocol, store, and show_widget

* feat(dashboard): card inset, full-bleed and frameless presentations plus intrinsic auto height

* fix(boards): preserve frame prefs on re-pin, pin legacy resizes, reserve touch chrome in auto height

* fix(dashboard): pass pointer events through the overlay bar to widget content

* fix(dashboard): re-layout auto-height rows when pointer capability changes

* refactor(dashboard): extract widget sizing policy module and split oversized board tests

* test(dashboard): complete frame lifecycle host stubs for content-height callback

* fix(dashboard): fold sizing into grid module, scope bar interactivity, drop useless fixture escape

* fix(dashboard): inline widget-size literal and drop orphan sizing module for startup budget
2026-07-20 20:18:27 -07:00

30 lines
881 B
TypeScript

import { describe, expect, it } from "vitest";
import {
parseManifest,
serializeManifest,
updateManifestHeightMode,
} from "./sqlite-board-codec.js";
describe("board widget manifest codec", () => {
it("round-trips presentation and height mode", () => {
const serialized = serializeManifest(undefined, "none", undefined, {
presentation: "full-bleed",
heightMode: "auto",
});
expect(parseManifest(serialized)).toMatchObject({
presentation: "full-bleed",
heightMode: "auto",
});
expect(parseManifest(updateManifestHeightMode(serialized, "fixed"))).toMatchObject({
presentation: "full-bleed",
heightMode: "fixed",
});
});
it("ignores invalid persisted frame preferences", () => {
expect(
parseManifest(JSON.stringify({ presentation: "floating", heightMode: "elastic" })),
).toEqual({});
});
});