mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-04 23:51:35 +00:00
* 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
30 lines
881 B
TypeScript
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({});
|
|
});
|
|
});
|