Tests: shared helpers once in helpers.ts, not copied into each spec

- The panes view's pane, tid, frames, still, library, clickOpen and
  noFaults were copied into colours, panes3, panes4 (and partly forks,
  libraries, phone) with identical bodies; wide() into annotate and
  links; linksHere into review and reviewer; the one-key-per-frame loop
  of the latency tests into six specs (paced). They live in helpers.ts.
  The specs whose own still() or open() differ keep theirs.
- `:` + type + Enter written out where command() does the same, the
  newDoc alias of addTop, nodes' copy of focusedTitle, forks.test's four
  isStr guards, an unused fixture and `void request`, Math.max(x, x).
- panes3 and panes4 no longer call themselves rounds three and four.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
thalladaandClaude Opus 5.5 committed 2026-11-17 16:25:27 -05:00
1 parent 52cb7c2065
commit dbbe3effac
18 files changed
+176 -297

No files matched your search

+1 -2
View File
@@ -10,7 +10,7 @@
* at the end: the other specs share the first.
*/
import { expect, test, type Page } from "@playwright/test";
import { autoLayout, command, curveFaults, keys, libraryId, settle, state } from "./helpers";
import { autoLayout, command, curveFaults, frames, keys, libraryId, settle, state } from "./helpers";
const ready = (page: Page) => page.waitForFunction(() => (globalThis as any).__ie?.ready);
const status = (page: Page) => page.locator(".status .message");
@@ -120,7 +120,6 @@ const rows = (page: Page) => panel(page).locator(".lib-row[data-lib]");
const row = (page: Page, title: string) => panel(page).locator(".lib-row[data-lib]", { has: page.locator(".lib-t", { hasText: title }) });
const titles = (page: Page) => rows(page).locator(".lib-t").allTextContents();
const loaded = (page: Page) => expect(panel(page)).not.toHaveAttribute("data-loading", /./);
const frames = (page: Page) => page.evaluate(() => new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r))));
/** Until the strip and its panes have stopped scrolling (a pane opened slides into view), then two frames for the curves. */
async function still(page: Page) {
await page.waitForFunction(