fix(map): restore subject flight and search inset
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
|
||||
import { readFile } from "node:fs/promises";
|
||||
|
||||
import { buildMapSearchIndex, searchMapSubjects } from "../apps/catalog/src/mapSearch.mjs";
|
||||
|
||||
const now = "2026-07-25T08:00:00.000Z";
|
||||
@@ -101,3 +103,12 @@ test("reference subjects remain searchable by profile labels without a provider
|
||||
assert.equal(searchMapSubjects(index, "osm.node.1").at(0)?.groupTitle, "Метро");
|
||||
assert.deepEqual(searchMapSubjects(index, "provider_note"), []);
|
||||
});
|
||||
|
||||
test("expanded search keeps the canonical toolbar inset on every edge", async () => {
|
||||
const styles = await readFile(new URL("../apps/catalog/src/styles.css", import.meta.url), "utf8");
|
||||
const baseToolbar = styles.match(/\.catalog-map-fixture__toolbar\s*\{(?<body>[\s\S]*?)\n\}/)?.groups?.body ?? "";
|
||||
const expandedToolbar = styles.match(/\.catalog-map-fixture__toolbar\[data-search-open\]\s*\{(?<body>[\s\S]*?)\n\}/)?.groups?.body ?? "";
|
||||
|
||||
assert.match(baseToolbar, /padding: 0\.4rem/);
|
||||
assert.doesNotMatch(expandedToolbar, /padding-right:\s*0/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user