fix: align the slash foot with the rendered tree spine
Reference site / build (push) Canceled after 0s

This commit is contained in:
2026-10-10 21:22:32 +09:00
parent 3b76025e10
commit 39e1565cb9
4 changed files with 54 additions and 12 deletions
+2 -1
View File
@@ -11,7 +11,8 @@ test('home and book are usable without client JavaScript', async ({ page }, test
const spine = await page.locator('.branch-spine').first().boundingBox();
expect(root).not.toBeNull();
expect(spine).not.toBeNull();
expect(Math.abs(root!.x + root!.width / 2 - spine!.x - spine!.width / 2)).toBeLessThan(1);
const footX = await page.locator('.root-vector').evaluate((svg) => new DOMPoint(12, 60).matrixTransform((svg as SVGSVGElement).getScreenCTM()!).x);
expect(Math.abs(footX - spine!.x - spine!.width / 2)).toBeLessThan(1);
expect(Math.abs(root!.y + root!.height - spine!.y)).toBeLessThan(1);
await page.screenshot({ path: testInfo.outputPath('home.png'), fullPage: true });
await page.getByRole('link', { name: 'Book', exact: true }).click();