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:
1 parent
52cb7c2065
commit
dbbe3effac
18 files changed
+176
-297
No files matched your search
+1
-8
@@ -6,16 +6,9 @@
|
||||
* store call to the painted frame. Runs last: it fills the shared library.
|
||||
*/
|
||||
import { expect, test, type Page } from "@playwright/test";
|
||||
import { autoLayout, idle, state, synced, writeReport, type Sample, visit } from "./helpers";
|
||||
import { autoLayout, idle, paced, state, synced, type Sample, visit, writeReport } from "./helpers";
|
||||
|
||||
const ready = (page: Page) => page.waitForFunction(() => (globalThis as any).__ie?.ready === true, undefined, { timeout: 30_000 });
|
||||
/** One keystroke per frame, as in the other latency tests. */
|
||||
const paced = async (page: Page, seq: string) => {
|
||||
for (const k of seq.split(" ")) {
|
||||
await page.keyboard.press(k);
|
||||
await page.evaluate(() => new Promise((r) => requestAnimationFrame(() => r(null))));
|
||||
}
|
||||
};
|
||||
const SENTENCE = "This sentence is about something that matters here. Another follows it, with a few more words. ";
|
||||
|
||||
/** Edit a leaf's body through the store, and time it to the painted frame. */
|
||||
|
||||
Reference in new issue
Block a user