fix: exclude tracesDir option from launchOptions fixture (#24086)

Fixes https://github.com/microsoft/playwright/issues/23645
This commit is contained in:
Andrey Lushnikov 2023-07-06 13:31:44 -07:00 committed by GitHub
parent 3536e81d77
commit 9af2b518f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 2 deletions

View file

@ -3530,7 +3530,7 @@ export interface PlaywrightWorkerOptions {
* ``` * ```
* *
*/ */
launchOptions: LaunchOptions; launchOptions: Omit<LaunchOptions, 'tracesDir'>;
/** /**
* **Usage** * **Usage**
* *

View file

@ -480,3 +480,20 @@ test('should have correct types for the config', async ({ runTSC }) => {
}); });
expect(result.exitCode).toBe(0); expect(result.exitCode).toBe(0);
}); });
test('should not allow tracesDir in launchOptions', async ({ runTSC }) => {
const result = await runTSC({
'playwright.config.ts': `
import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
launchOptions: {
tracesDir: 'foo',
},
},
});
`
});
expect(result.exitCode).not.toBe(0);
});

View file

@ -203,7 +203,7 @@ export interface PlaywrightWorkerOptions {
defaultBrowserType: BrowserName; defaultBrowserType: BrowserName;
headless: boolean; headless: boolean;
channel: BrowserChannel | undefined; channel: BrowserChannel | undefined;
launchOptions: LaunchOptions; launchOptions: Omit<LaunchOptions, 'tracesDir'>;
connectOptions: ConnectOptions | undefined; connectOptions: ConnectOptions | undefined;
screenshot: ScreenshotMode | { mode: ScreenshotMode } & Pick<PageScreenshotOptions, 'fullPage' | 'omitBackground'>; screenshot: ScreenshotMode | { mode: ScreenshotMode } & Pick<PageScreenshotOptions, 'fullPage' | 'omitBackground'>;
trace: TraceMode | /** deprecated */ 'retry-with-trace' | { mode: TraceMode, snapshots?: boolean, screenshots?: boolean, sources?: boolean, attachments?: boolean }; trace: TraceMode | /** deprecated */ 'retry-with-trace' | { mode: TraceMode, snapshots?: boolean, screenshots?: boolean, sources?: boolean, attachments?: boolean };