Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
test(ui): acceptance G7 also measures the toolbar with the chat open (K3)
Bernhard Jackiewicz90de5135be5d
diff --git a/graph-ui/tools/call-feedback-acceptance.mjs b/graph-ui/tools/call-feedback-acceptance.mjsindex 54911464a..d991bb6e7 100644--- a/graph-ui/tools/call-feedback-acceptance.mjs+++ b/graph-ui/tools/call-feedback-acceptance.mjs@@ -255,16 +255,31 @@ async function galaxyChecks(page) {root !== null && offset !== null && offset < 0.2 && expanded.outside === 0,{ rootMarker: root, offsetFromCentre: offset === null ? null : Number(offset.toFixed(3)), outside: expanded.outside, inside: expanded.inside }, expandImages.slice(-1));- // G7: die Werkzeugleiste bleibt eine Zeile.- const rows = await page.evaluate(() => {- const bar = document.querySelector('.atlas-graph-exploration');- if (!bar) return null;- const tops = [...bar.querySelectorAll('button, select, input, summary, label, span')].filter((el) => el.offsetParent !== null && el.getBoundingClientRect().height > 0)- .map((el) => Math.round(el.getBoundingClientRect().top / 12));- return [...new Set(tops)].length;- });- const barBox = await page.locator('.atlas-graph-exploration').first().boundingBox().catch(() => null);- check('G7', 'Galaxie-Werkzeugleiste bricht bei 1600 px nicht um', barBox !== null && barBox.height < 70, { toolbarHeight: barBox?.height ?? null, rowBuckets: rows });+ // G7: die Werkzeugleiste bleibt eine Zeile, bei geschlossenem und (Handtest K3) bei offenem Chat.+ const toolbarRows = async (chat) => {+ const measured = await page.evaluate(() => {+ const bar = document.querySelector('.atlas-graph-exploration');+ if (!bar) return null;+ // Eine Zeile je Mitte der Kinder der Leiste; die Kinder ihrer Kinder (Text in Knoepfen) zaehlen nicht extra.+ const items = [...bar.children].filter((el) => el.getBoundingClientRect().height > 0);+ const centres = items.map((el) => { const r = el.getBoundingClientRect(); return Math.round((r.top + r.bottom) / 2 / 16); });+ const box = bar.getBoundingClientRect();+ return { rows: [...new Set(centres)].length, width: Math.round(box.width), height: Math.round(box.height), overflow: bar.scrollWidth > bar.clientWidth + 1, fit: bar.dataset.fit ?? null };+ });+ return { chat, ...measured };+ };+ const toolbar = [await toolbarRows('closed')];+ const g7Images = [await shot(page, 'g7-chat-zu')];+ await page.getByRole('button', { name: 'Open chat' }).first().click().catch(() => {});+ await page.waitForSelector('.cbm-chat-input-row', { timeout: 10000 }).catch(() => {});+ await wait(1500);+ toolbar.push(await toolbarRows('open'));+ g7Images.push(await shot(page, 'g7-chat-offen'));+ await page.getByRole('button', { name: 'Hide chat' }).first().click().catch(() => {});+ await wait(1200);+ check('G7', 'Galaxie-Werkzeugleiste bricht bei 1600 px nicht um, mit geschlossenem und mit offenem Chat',+ toolbar.length === 2 && toolbar.every((row) => row.rows === 1 && row.height < 70 && !row.overflow) && toolbar[1].width < toolbar[0].width,+ { toolbar }, g7Images);// G3: Mausrad zoomt zum Zeiger.const zoomImages = [];diff --git a/graph-ui/tools/call-feedback-acceptance.test.mjs b/graph-ui/tools/call-feedback-acceptance.test.mjsnew file mode 100644index 000000000..1b82c44c1--- /dev/null+++ b/graph-ui/tools/call-feedback-acceptance.test.mjs@@ -0,0 +1,25 @@+/*+ * Handtest K3: die Abnahme G7 mass die Leiste eines Ausschnitts nur bei+ * geschlossenem Chat, und genau dort brach sie nicht um. Diese Pruefung haelt+ * fest, dass G7 auch mit offenem Chat bei 1600 px misst und dort eine Zeile+ * verlangt. Das Skript selbst startet einen Browser; hier wird nur sein+ * G7-Abschnitt gelesen.+ */+import { readFileSync } from 'node:fs';+import { fileURLToPath } from 'node:url';+import { expect, it } from 'vitest';++const source = readFileSync(fileURLToPath(new URL('./call-feedback-acceptance.mjs', import.meta.url)), 'utf8');+const g7 = source.slice(source.indexOf('// G7'), source.indexOf('// G3'));++it('K3: acceptance G7 measures the scoped toolbar with the chat closed and open at 1600 px and wants one row in both', () => {+ expect(g7.length).toBeGreaterThan(0);+ expect(g7).toContain("name: 'Open chat'");+ expect(g7).toContain("name: 'Hide chat'");+ // A measurement with the chat closed and one with it open, both in the result.+ expect(g7).toMatch(/\('closed'\)/);+ expect(g7).toMatch(/\('open'\)/);+ // One row for each measurement, not only for the first.+ expect(g7).toMatch(/\.every\(/);+ expect(g7).toMatch(/rows\s*===\s*1/);+});