fix: exclude tracesDir option from launchOptions fixture (#24086)
Fixes https://github.com/microsoft/playwright/issues/23645
This commit is contained in:
parent
3536e81d77
commit
9af2b518f2
2
packages/playwright-test/types/test.d.ts
vendored
2
packages/playwright-test/types/test.d.ts
vendored
|
|
@ -3530,7 +3530,7 @@ export interface PlaywrightWorkerOptions {
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
launchOptions: LaunchOptions;
|
launchOptions: Omit<LaunchOptions, 'tracesDir'>;
|
||||||
/**
|
/**
|
||||||
* **Usage**
|
* **Usage**
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
});
|
||||||
|
|
|
||||||
2
utils/generate_types/overrides-test.d.ts
vendored
2
utils/generate_types/overrides-test.d.ts
vendored
|
|
@ -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 };
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue