From dcdc4e3f6c077d94568c32b45c26f0d0e3ca9f59 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 16 Apr 2024 10:23:48 -0700 Subject: [PATCH] Address comments --- packages/playwright-core/src/utils/zones.ts | 2 -- packages/playwright/src/matchers/toMatchSnapshot.ts | 9 --------- 2 files changed, 11 deletions(-) diff --git a/packages/playwright-core/src/utils/zones.ts b/packages/playwright-core/src/utils/zones.ts index a0d93cc848..a9cfed13bb 100644 --- a/packages/playwright-core/src/utils/zones.ts +++ b/packages/playwright-core/src/utils/zones.ts @@ -55,13 +55,11 @@ class ZoneManager { class Zone { readonly type: ZoneType; readonly data: T; - readonly wallTime: number; readonly previous: Zone | undefined; constructor(previous: Zone | undefined, type: ZoneType, data: T) { this.type = type; this.data = data; - this.wallTime = Date.now(); this.previous = previous; } } diff --git a/packages/playwright/src/matchers/toMatchSnapshot.ts b/packages/playwright/src/matchers/toMatchSnapshot.ts index 500ab42d69..b0114bd2f6 100644 --- a/packages/playwright/src/matchers/toMatchSnapshot.ts +++ b/packages/playwright/src/matchers/toMatchSnapshot.ts @@ -368,15 +368,6 @@ export async function toHaveScreenshot( throw new Error(`Screenshot name "${path.basename(helper.snapshotPath)}" must have '.png' extension`); expectTypes(pageOrLocator, ['Page', 'Locator'], 'toHaveScreenshot'); const style = await loadScreenshotStyles(helper.options.stylePath); - return toHaveScreenshotContinuation.call(this, helper, page, locator, style); -} - -async function toHaveScreenshotContinuation( - this: ExpectMatcherContext, - helper: SnapshotHelper, - page: PageEx, - locator: Locator | undefined, - style?: string) { const expectScreenshotOptions: ExpectScreenshotOptions = { locator, animations: helper.options.animations ?? 'disabled',