From f404d512a1059f714212743192dd18eb94bb1bd1 Mon Sep 17 00:00:00 2001 From: Sean Perkins Date: Thu, 29 Sep 2022 21:56:46 -0400 Subject: [PATCH] chore(playwright): browser name is strictly typed (#26046) --- core/src/utils/test/playwright/playwright-declarations.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/utils/test/playwright/playwright-declarations.ts b/core/src/utils/test/playwright/playwright-declarations.ts index 6260f40647..80f65fbab6 100644 --- a/core/src/utils/test/playwright/playwright-declarations.ts +++ b/core/src/utils/test/playwright/playwright-declarations.ts @@ -96,7 +96,9 @@ export interface E2EPage extends Page { _e2eEvents: Map; } -export type BrowserNameOrCallback = string | ((browserName: string) => boolean); +type BrowserName = 'chromium' | 'firefox' | 'webkit'; + +export type BrowserNameOrCallback = BrowserName | ((browserName: BrowserName) => boolean); export interface E2ESkip { rtl: (reason?: string) => void;