Files
codebase-memory-mcp/graph-ui/tools/call-feedback-acceptance.test.mjs
Bernhard Jackiewicz 90de5135be test(ui): acceptance G7 also measures the toolbar with the chat open (K3)
K3 asked for the acceptance check G7 to cover the open chat as well; it
measured only with the chat closed at 1600 px, where the toolbar never
wrapped. G7 now measures the scoped Galaxy toolbar with the chat closed and
then open at 1600 px (bar about 1170 px), counts rows by the centres of the
toolbar's own items, and passes only when both measurements are one row
without overflow. The chat is closed again for the checks that follow.
A small vitest guard reads the G7 section and keeps both measurements in it.

Signed-off-by: Bernhard Jackiewicz <bj@techport.io>
2026-10-04 00:38:34 +02:00

26 lines
1.2 KiB
JavaScript

/*
* 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/);
});