Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

Revert "feat(test-runner): allow parametrized tests that don't extend base (#9301)"

Max Schmitt9dd6bb8c6a78
diff --git a/packages/playwright-core/types/test.d.ts b/packages/playwright-core/types/test.d.ts
index c08f8f12d2..d6e35e8c28 100644
--- a/packages/playwright-core/types/test.d.ts
+++ b/packages/playwright-core/types/test.d.ts
@@ -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.
*/
diff --git a/packages/playwright-core/types/testExpect.d.ts b/packages/playwright-core/types/testExpect.d.ts
index 7b0e96e5b7..a489505e1c 100644
--- a/packages/playwright-core/types/testExpect.d.ts
+++ b/packages/playwright-core/types/testExpect.d.ts
@@ -166,11 +166,4 @@ declare global {
}
}
-declare global {
- namespace PlaywrightTest {
- export interface ExtraUseOptions {
- }
- }
-}
-
export { };
diff --git a/tests/playwright-test/types.spec.ts b/tests/playwright-test/types.spec.ts
index 24f71db782..17906cd006 100644
--- a/tests/playwright-test/types.spec.ts
+++ b/tests/playwright-test/types.spec.ts
@@ -182,29 +182,3 @@ test('config should allow void/empty options', async ({ runTSC }) => {
});
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);
-});
diff --git a/utils/generate_types/overrides-test.d.ts b/utils/generate_types/overrides-test.d.ts
index 3fd3ecf708..e4b4e88bbc 100644
--- a/utils/generate_types/overrides-test.d.ts
+++ b/utils/generate_types/overrides-test.d.ts
@@ -298,7 +298,7 @@ export interface PlaywrightWorkerOptions {
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;
bypassCSP: boolean | undefined;
colorScheme: ColorScheme | undefined;