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 b = boxes[ second ];
|
||||
const overlaps =
|
||||
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 < b.x + b.width && a.x + a.width > b.x && a.y < b.y + b.height && a.y + a.height > b.y;
|
||||
expect( overlaps ).toBe( false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function expectNoHorizontalOverflow( page, header ) {
|
||||
expect(
|
||||
await header.evaluate( ( element ) => element.scrollWidth <= element.clientWidth ),
|
||||
).toBe( true );
|
||||
expect( await header.evaluate( ( element ) => element.scrollWidth <= element.clientWidth ) ).toBe(
|
||||
true,
|
||||
);
|
||||
expect(
|
||||
await page.evaluate(
|
||||
() => document.documentElement.scrollWidth <= document.documentElement.clientWidth,
|
||||
|
||||
Reference in new issue
Block a user