-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Hello team,
When trying to create a PerformanceObserver to log layout-shift entries to the console, as is :
export async function checkCLS2(page, maxLCP=ConstUtils.maxLCP) {
const CLS = await page.evaluate(() => {
return new Promise((resolve) => {
new PerformanceObserver(entryList => {
console.log(entryList.getEntries());
}).observe({ type: "layout-shift", buffered: true });
})
})
expect(CLS).toBeLessThanOrEqual(ConstUtils.maxLCP)
}
I get a timeout. Please note that I'm using the Playwright framework. Do you spot anything I did wrong ?
Many thanks in advance,
Regards,
Johan
Metadata
Metadata
Assignees
Labels
No labels