style: format CHRNX navigation tests
This commit is contained in:
1 file changed
+4
-7
@@ -43,19 +43,16 @@ function expectNoOverlap( boxes ) {
|
|||||||
const a = boxes[ first ];
|
const a = boxes[ first ];
|
||||||
const b = boxes[ second ];
|
const b = boxes[ second ];
|
||||||
const overlaps =
|
const overlaps =
|
||||||
a.x < b.x + b.width &&
|
a.x < b.x + b.width && a.x + a.width > b.x && a.y < b.y + b.height && a.y + a.height > b.y;
|
||||||
a.x + a.width > b.x &&
|
|
||||||
a.y < b.y + b.height &&
|
|
||||||
a.y + a.height > b.y;
|
|
||||||
expect( overlaps ).toBe( false );
|
expect( overlaps ).toBe( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function expectNoHorizontalOverflow( page, header ) {
|
async function expectNoHorizontalOverflow( page, header ) {
|
||||||
expect(
|
expect( await header.evaluate( ( element ) => element.scrollWidth <= element.clientWidth ) ).toBe(
|
||||||
await header.evaluate( ( element ) => element.scrollWidth <= element.clientWidth ),
|
true,
|
||||||
).toBe( true );
|
);
|
||||||
expect(
|
expect(
|
||||||
await page.evaluate(
|
await page.evaluate(
|
||||||
() => document.documentElement.scrollWidth <= document.documentElement.clientWidth,
|
() => document.documentElement.scrollWidth <= document.documentElement.clientWidth,
|
||||||
|
|||||||
Reference in new issue
Block a user