diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.ts index 9f4959ca4d..05a29f50ba 100644 --- a/packages/playwright/types/test.d.ts +++ b/packages/playwright/types/test.d.ts @@ -4421,88 +4421,6 @@ export interface TestType boolean, description?: string): void; - /** - * You can use `test.fail.only` to focus on a specific test that is expected to fail. This is particularly useful when - * debugging a failing test or working on a specific issue. - * - * To declare a focused "failing" test: - * - `test.fail.only(title, body)` - * - `test.fail.only(title, details, body)` - * - * To conditionally focus a "failing" test: - * - `test.fail.only(condition, description)` - * - `test.fail.only(callback, description)` - * - `test.fail.only()` - * - * **Usage** - * - * You can declare a focused failing test, so that Playwright runs only this test and ensures it actually fails. - * - * ```js - * import { test, expect } from '@playwright/test'; - * - * test.fail.only('focused failing test', async ({ page }) => { - * // This test is expected to fail - * expect(1).toBe(2); - * }); - * test('not in the focused group', async ({ page }) => { - * // This test will not run - * }); - * ``` - * - * If your focused failing test fails in some configurations, but not all, you can mark it as failing based on some - * condition. We recommend passing a `description` argument in this case. - * - * ```js - * import { test, expect } from '@playwright/test'; - * - * test('fail in WebKit with focus', async ({ page, browserName }) => { - * test.fail.only(browserName === 'webkit', 'This feature is not implemented for Mac yet'); - * // ... - * }); - * ``` - * - * You can mark all tests within a file or - * [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) group as - * focused "should fail" based on some condition with a single `test.fail.only(callback, description)` call. - * - * ```js - * import { test, expect } from '@playwright/test'; - * - * test.fail.only(({ browserName }) => browserName === 'webkit', 'not implemented yet'); - * - * test('fail in WebKit 1', async ({ page }) => { - * // ... - * }); - * test('fail in WebKit 2', async ({ page }) => { - * // ... - * }); - * ``` - * - * You can also call `test.fail.only()` without arguments inside the test body to always mark the test as failed and - * focused. We recommend declaring a focused failing test with `test.fail.only(title, body)` instead. - * - * ```js - * import { test, expect } from '@playwright/test'; - * - * test('focused and always failing test', async ({ page }) => { - * test.fail.only(); - * // This test is expected to fail - * expect(1).toBe(2); - * }); - * ``` - * - * @param title Test title. - * @param details See [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) for test - * details description. - * @param body Test body that takes one or two arguments: an object with fixtures and optional - * [TestInfo](https://playwright.dev/docs/api/class-testinfo). - * @param condition Test is marked as "should fail" and focused when the condition is `true`. - * @param callback A function that returns whether to mark as "should fail" and focused, based on test fixtures. Test or tests are - * marked as "should fail" and focused when the return value is `true`. - * @param description Optional description that will be reflected in a test report. - */ - (): void; } } /** diff --git a/utils/generate_types/overrides-test.d.ts b/utils/generate_types/overrides-test.d.ts index 49ccab3998..12dca025b0 100644 --- a/utils/generate_types/overrides-test.d.ts +++ b/utils/generate_types/overrides-test.d.ts @@ -121,7 +121,6 @@ export interface TestType Promise | void): void; (condition: boolean, description?: string): void; (callback: (args: TestArgs & WorkerArgs) => boolean, description?: string): void; - (): void; } } slow(): void;