mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(toHaveScreenshot): fix initial screenshot time (#12576)
Instead of being taken immediately, first screenshot was actually taken after 1 second.
This commit is contained in:
parent
18e6aa3f15
commit
497b51ad8c
@ -467,7 +467,7 @@ export class Page extends SdkObject {
|
||||
if (this.isClosed())
|
||||
throw new Error('The page has closed');
|
||||
let comparatorResult: ComparatorResult | undefined;
|
||||
const screenshotTimeout = pollIntervals.shift() || 1000;
|
||||
const screenshotTimeout = pollIntervals.shift() ?? 1000;
|
||||
if (isGeneratingNewScreenshot) {
|
||||
previous = actual;
|
||||
actual = await rafrafScreenshot(progress, screenshotTimeout).catch(e => undefined);
|
||||
|
Loading…
x
Reference in New Issue
Block a user