mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
Revert "feat(test-runner): allow parametrized tests that don't extend base (#9301)"
This reverts commit f63af830de30872f60eff7a4be22379df5bf985c.
This commit is contained in:
parent
f884103b62
commit
9dd6bb8c6a
2
packages/playwright-core/types/test.d.ts
vendored
2
packages/playwright-core/types/test.d.ts
vendored
@ -2444,7 +2444,7 @@ export type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry' |
|
|||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export interface PlaywrightTestOptions extends PlaywrightTest.ExtraUseOptions {
|
export interface PlaywrightTestOptions {
|
||||||
/**
|
/**
|
||||||
* Whether to automatically download all the attachments. Defaults to `false` where all the downloads are canceled.
|
* Whether to automatically download all the attachments. Defaults to `false` where all the downloads are canceled.
|
||||||
*/
|
*/
|
||||||
|
@ -166,11 +166,4 @@ declare global {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
|
||||||
namespace PlaywrightTest {
|
|
||||||
export interface ExtraUseOptions {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export { };
|
export { };
|
||||||
|
@ -182,29 +182,3 @@ test('config should allow void/empty options', async ({ runTSC }) => {
|
|||||||
});
|
});
|
||||||
expect(result.exitCode).toBe(0);
|
expect(result.exitCode).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('config should allow ExtraUseOptions', async ({ runTSC }) => {
|
|
||||||
const result = await runTSC({
|
|
||||||
'playwright.config.ts': `
|
|
||||||
const configs: pwt.Config[] = [];
|
|
||||||
configs.push({ use: { myParam: 'text' }});
|
|
||||||
`,
|
|
||||||
'extraUseOptions.d.ts': `
|
|
||||||
export {};
|
|
||||||
declare global {
|
|
||||||
namespace PlaywrightTest {
|
|
||||||
export interface ExtraUseOptions {
|
|
||||||
myParam: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
'a.spec.ts': `
|
|
||||||
const { test } = pwt;
|
|
||||||
test('my test', async ({ myParam }) => {
|
|
||||||
console.log(myParam);
|
|
||||||
});
|
|
||||||
`
|
|
||||||
});
|
|
||||||
expect(result.exitCode).toBe(0);
|
|
||||||
});
|
|
||||||
|
2
utils/generate_types/overrides-test.d.ts
vendored
2
utils/generate_types/overrides-test.d.ts
vendored
@ -298,7 +298,7 @@ export interface PlaywrightWorkerOptions {
|
|||||||
|
|
||||||
export type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry' | /** deprecated */ 'retry-with-video';
|
export type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry' | /** deprecated */ 'retry-with-video';
|
||||||
|
|
||||||
export interface PlaywrightTestOptions extends PlaywrightTest.ExtraUseOptions {
|
export interface PlaywrightTestOptions {
|
||||||
acceptDownloads: boolean | undefined;
|
acceptDownloads: boolean | undefined;
|
||||||
bypassCSP: boolean | undefined;
|
bypassCSP: boolean | undefined;
|
||||||
colorScheme: ColorScheme | undefined;
|
colorScheme: ColorScheme | undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user