The active pane's edges: kept to the pane they are for; drawn by the pane with the curves off; tests count curves, not edges
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
9c0f4b8c02
commit
e6e4ad8d26
5 files changed
+10
-8
No files matched your search
+1
-1
@@ -52,7 +52,7 @@ const lines = (page: Page) =>
|
||||
};
|
||||
const svg = document.querySelector<SVGSVGElement>(".curves")!.getBoundingClientRect();
|
||||
const box = { left: Math.round(svg.left), top: Math.round(svg.top) };
|
||||
return [...document.querySelectorAll<SVGPathElement>(".curves path:not(.foot)")].map((p) => {
|
||||
return [...document.querySelectorAll<SVGPathElement>(".curves path:not(.foot):not(.frame)")].map((p) => {
|
||||
const pe = document.querySelector<HTMLElement>(`.pane[data-tid="${p.dataset.to}"]`)!;
|
||||
const a = p.getPointAtLength(0);
|
||||
const b = p.getPointAtLength(p.getTotalLength());
|
||||
|
||||
+2
-2
@@ -315,7 +315,7 @@ test("a curve per open edge, from where each pane was opened to its title; it fo
|
||||
// The focused branch (Two kinds of cell → Complex cells) in its own ink; the others not.
|
||||
expect(edge("Two kinds of cell", "Complex cells")[0].cls).toContain("on");
|
||||
expect(edge("Two kinds of cell", "Simple cells")[0].cls).not.toContain("on");
|
||||
expect(await page.locator(".curves path.on").first().evaluate((el) => getComputedStyle(el).stroke)).not.toBe(await page.locator(".curves path:not(.on)").first().evaluate((el) => getComputedStyle(el).stroke));
|
||||
expect(await page.locator(".curves path.on").first().evaluate((el) => getComputedStyle(el).stroke)).not.toBe(await page.locator(".curves path:not(.on):not(.frame)").first().evaluate((el) => getComputedStyle(el).stroke));
|
||||
// Scroll Eukaryote's text: the curve out of it moves with its link.
|
||||
const before = edge("Eukaryote", "Bacteria")[0].a;
|
||||
await pane(page, "Eukaryote").locator(".pane-scroll").evaluate((el) => (el.scrollTop = 40));
|
||||
@@ -402,7 +402,7 @@ test("curves down one gutter take lanes of their own, side by side, up to as man
|
||||
for (let i = 0; i < 10; i++) await keys(page, "j Enter");
|
||||
await still(page);
|
||||
const runs = await page.evaluate(() =>
|
||||
[...document.querySelectorAll<SVGPathElement>(".curves path")].map((p) => {
|
||||
[...document.querySelectorAll<SVGPathElement>(".curves path:not(.frame)")].map((p) => {
|
||||
const v = /C[^C]*?([\d.]+) [\d.]+V/.exec(p.getAttribute("d")!);
|
||||
return { lane: Number(p.dataset.lane), x: v ? Number(v[1]) : NaN };
|
||||
}),
|
||||
|
||||
+2
-2
@@ -161,7 +161,7 @@ test("every pane of a crowded column shows at least its tab, above or below the
|
||||
for (const c of centred) expect(c.off).toBeLessThanOrEqual(1.5);
|
||||
// The curve becomes a tab's line where it meets it: no stub of it before the meeting.
|
||||
const stubs = await page.evaluate(() =>
|
||||
[...document.querySelectorAll<SVGPathElement>(".curves path:not(.foot)")].filter((p) => {
|
||||
[...document.querySelectorAll<SVGPathElement>(".curves path:not(.foot):not(.frame)")].filter((p) => {
|
||||
const pe = document.querySelector<HTMLElement>(`.pane[data-tid="${p.dataset.to}"]`);
|
||||
return pe?.dataset.ruled?.includes("tab") && (p.getAttribute("d")!.match(/M/g) ?? []).length > 1;
|
||||
}).length,
|
||||
@@ -310,7 +310,7 @@ test("a dotted curve to a source out of sight in its pane turns, at its end, tow
|
||||
const lib = pane(page, "Library").locator(".pane-scroll");
|
||||
const lead = async () =>
|
||||
page.evaluate(() => {
|
||||
const p = [...document.querySelectorAll<SVGPathElement>(".curves path:not(.foot)")].find((x) => x.classList.contains("lost"));
|
||||
const p = [...document.querySelectorAll<SVGPathElement>(".curves path:not(.foot):not(.frame)")].find((x) => x.classList.contains("lost"));
|
||||
if (!p) return null;
|
||||
const a = p.getPointAtLength(0);
|
||||
const b = p.getPointAtLength(8);
|
||||
|
||||
Reference in new issue
Block a user