Files
houseplan-card/test/form-shell-consumers.test.mjs
Claude 4c9e013276 fix(dialog): align HA settings form shell (#609)
Use Home Assistant's public dialog tokens for the reviewed 560 px canvas, height cap, single scroller and mobile fullscreen layout. Keep generic dialogs and the native fallback unchanged, with authentic-HA evidence and mutation witnesses.

Issue: #609
User-Visible: yes
2026-09-23 03:18:37 +03:00

19 lines
700 B
JavaScript

import test from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
const consumers = [
['space', 'src/editors/space-settings-dialog.ts'],
['settings', 'src/editors/general-settings-dialog.ts'],
['room', 'src/editors/room-settings-dialog.ts'],
['marker', 'src/editors/marker-dialog.ts'],
['onboarding', 'src/houseplan-onboarding-runtime.ts'],
];
test('#609 all five settings consumers opt into the shared form shell', () => {
for (const [kind, file] of consumers) {
const source = readFileSync(new URL(`../${file}`, import.meta.url), 'utf8');
assert.match(source, new RegExp(`data-kind=["']${kind}["'][^>]*form-shell`), file);
}
});