fix: align the slash foot with the rendered tree spine
Reference site / build (push) Canceled after 0s
Reference site / build (push) Canceled after 0s
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user