tests: annotate documented dwells in group-Y presence specs (determinism lint)

lint:determinism failed the staging deploy (run 33200086355) on 5 lines in
the presence specs committed 8/28: overlay-repaint dwells before settledShot,
the best-effort #canvas focus, and the sampling cadences of the two explicit
presence-eviction poll loops. All are intentional; annotate them the way
3d-viewer-*.spec.ts does so the guard accepts them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LvvARNMxQrq17vogn3REMU
This commit is contained in:
Gergő Törcsvári 2026-08-28 21:30:49 +02:00
commit f409294c77
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
3 changed files with 7 additions and 5 deletions

View file

@ -166,14 +166,16 @@ for (const kind of ["selection", "xsel"] as const) {
// WIRE1 is deleted through a real SCH_COMMIT — the same path a remote
// apply (peer deleted it) or a local menu delete takes.
expect(await removeItem(page, WIRE1)).toBe(true);
await page.waitForTimeout(1500);
// Documented interaction dwell: the overlay repaint has no observable signal
// — settledShot below compares stable frames, this only lets it queue.
await page.waitForTimeout(1500); // eslint-disable-line -- documented interaction dwell
const afterDelete = await settledShot(canvas);
// Ground truth for "what the overlay should look like now": force the
// overlay to rebuild from the SAME peer snapshot — WIRE1 no longer
// resolves, so nothing is drawn for it.
await setRemote(page, { peers: [peer] });
await page.waitForTimeout(1500);
await page.waitForTimeout(1500); // eslint-disable-line -- documented interaction dwell (overlay rebuild, no observable)
const afterRepush = await settledShot(canvas);
expect(
@ -223,7 +225,7 @@ test("local emit: keyboard Delete on the canvas does publish the empty selection
// Give the wx canvas keyboard focus with a click on empty sheet space (this
// clears any selection — the programmatic select comes after).
await page.mouse.click(box!.x + box!.width * 0.5, box!.y + box!.height * 0.95);
await page.locator("#canvas").focus().catch(() => {});
await page.locator("#canvas").focus().catch(() => {}); // documented best-effort: wx canvas may reject DOM focus after the click already focused it
const id = await page.evaluate(() =>
(window as unknown as W).Module.kicadCollabTestSelectFirst(),
);