Skip to content

Commit 03fc1c1

Browse files
committed
Make CLS test faster
1 parent e4214a5 commit 03fc1c1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/e2e/onCLS-test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,11 @@ describe('onCLS()', async function() {
641641
return performance.getEntriesByType('navigation')[0].activationStart;
642642
});
643643

644+
// Wait until all images are loaded and rendered, then change to hidden.
645+
await imagesPainted();
646+
await stubVisibilityChange('hidden');
647+
648+
644649
await beaconCountIs(1);
645650
const [cls] = await getBeacons();
646651

0 commit comments

Comments
 (0)