feat(foundry): refine map application controls
This commit is contained in:
@@ -39,6 +39,34 @@ test("Map Inspector open section is controlled and included in the saved page la
|
||||
assert.match(manifestSchema, /"inspectorOpenSections"[\s\S]*?"maxItems": 1/);
|
||||
});
|
||||
|
||||
test("Map settings use a canonical trailing push panel and ApplicationPanel header actions", async () => {
|
||||
const [shell, panel, inspector, preview, catalog, styles, catalogStyles] = await Promise.all([
|
||||
readFile(new URL("../packages/ui-react/src/ApplicationShell.tsx", import.meta.url), "utf8"),
|
||||
readFile(new URL("../packages/ui-react/src/ApplicationSidePanel.tsx", import.meta.url), "utf8"),
|
||||
readFile(new URL("../packages/ui-react/src/Inspector.tsx", import.meta.url), "utf8"),
|
||||
readFile(new URL("../apps/catalog/src/MapFixturePreview.tsx", import.meta.url), "utf8"),
|
||||
readFile(new URL("../apps/catalog/src/CatalogApp.tsx", import.meta.url), "utf8"),
|
||||
readFile(new URL("../packages/ui-core/styles.css", import.meta.url), "utf8"),
|
||||
readFile(new URL("../apps/catalog/src/styles.css", import.meta.url), "utf8"),
|
||||
]);
|
||||
|
||||
assert.match(shell, /endPanelOpen\?: boolean/);
|
||||
assert.match(shell, /nodedc-app-shell__end-panel/);
|
||||
assert.match(panel, /data-placement="end"/);
|
||||
assert.doesNotMatch(panel, /pinned|onPinnedChange|Icon name="pin"/);
|
||||
assert.match(inspector, /variant\?: "default" \| "panel"/);
|
||||
assert.match(preview, /createPortal\(settingsPanel, settingsPanelHost\)/);
|
||||
assert.match(preview, /createPortal\(headerActions, headerActionsHost\)/);
|
||||
assert.match(preview, /variant="panel"/);
|
||||
assert.doesNotMatch(preview, /settingsPanelPinned|onPointerDownCapture/);
|
||||
assert.match(catalog, /endPanelOpen=\{mapSettingsPanelOpen\}/);
|
||||
assert.match(catalog, /headerTools=\{activePageTemplate\.id === "map"[\s\S]*?setMapHeaderActionsHost/);
|
||||
assert.match(styles, /data-content-expanded="true"\]\[data-end-panel-open="true"\][\s\S]*?right: calc\(/);
|
||||
assert.match(styles, /@keyframes nodedc-application-side-panel-in[\s\S]*?translateX\(1\.6rem\)/);
|
||||
assert.match(catalogStyles, /\.catalog-map-header-action\.nodedc-icon-button[\s\S]*?--nodedc-panel-action-bg/);
|
||||
assert.match(catalogStyles, /\.catalog-map-header-action\.nodedc-icon-button\[data-active="true"\][\s\S]*?--nodedc-glass-control-active/);
|
||||
});
|
||||
|
||||
test("canonical station profiles retain visible target borders while label text stays halo-free", async () => {
|
||||
const registry = JSON.parse(await readFile(
|
||||
new URL("../registry/map-presentation-profiles.json", import.meta.url),
|
||||
|
||||
Reference in New Issue
Block a user