Skip to content

Timeout on CLS evaluation #120

@MehseinJohan

Description

@MehseinJohan

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions