Browser tests: nodes instead of documents; addresses by node id; /linkhere and /linkall
menu.spec.ts becomes nodes.spec.ts: standing on the library root, /n/<id> addresses through a reload, Back and Forward (and an old /doc/ address), the jump box, a file imported into a node two levels down with a link relative to its top, exported back the same and copied just after itself, Move under… by key and by the menu (never under itself; the root offered first), history's f and r on the node the reader is on, the offline round trip, the node routes over HTTP, and panes and phone width. The other specs open a tree by its titles (helpers openAt, openPage, visit: /n/<id>, hoisted in the column as /doc/ was), make top-level sections from the library page instead of /new, scan with /linkhere (and check its scope against /linkall's), and expect a section's head on every pane but the first. 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
bed47c0c7a
commit
c4d6856649
17 files changed
+584
-490
No files matched your search
+4
-4
@@ -6,7 +6,7 @@
|
||||
* 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 } from "./helpers";
|
||||
import { autoLayout, idle, state, synced, writeReport, type Sample, visit } 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. */
|
||||
@@ -91,7 +91,7 @@ test("a library of over 5,000 nodes in 100 more documents: keypress → paint an
|
||||
await paced(page, "O");
|
||||
const column = stats(await keySamples(page));
|
||||
// A body edit inside a document deep in the library.
|
||||
await page.goto("/doc/scale-document-97");
|
||||
await visit(page, "Scale document 97");
|
||||
await ready(page);
|
||||
await paced(page, "j l j");
|
||||
const columnEdit = stats(await editTimes(page, 15));
|
||||
@@ -110,7 +110,7 @@ test("a library of over 5,000 nodes in 100 more documents: keypress → paint an
|
||||
// ---- forks: four documents opened side by side from the library pane, each three panes deep (document, part, leaf) ----
|
||||
// A fresh view: the panes opened above stay open (opens go beside), and would be restored here.
|
||||
await page.evaluate(() => localStorage.clear());
|
||||
await page.goto("/doc/scale-document-90");
|
||||
await visit(page, "Scale document 90");
|
||||
await ready(page);
|
||||
await paced(page, "l l l l");
|
||||
for (let d = 1; d < 4; d++) await paced(page, "h h j Enter l l l l");
|
||||
@@ -126,7 +126,7 @@ test("a library of over 5,000 nodes in 100 more documents: keypress → paint an
|
||||
await page.evaluate(() => ((globalThis as any).__ie.samples.length = 0));
|
||||
for (let i = 0; i < 8; i++) await paced(page, "[ [ [ ] ] ]");
|
||||
const forks = stats(await keySamples(page));
|
||||
await page.goto("/doc/scale-document-98");
|
||||
await visit(page, "Scale document 98");
|
||||
await ready(page);
|
||||
await paced(page, "l l j");
|
||||
const panesEdit = stats(await editTimes(page, 15));
|
||||
|
||||
Reference in new issue
Block a user