chore: remove unused signature(fail.only)
This commit is contained in:
parent
ea033dbb3e
commit
bd3f2d5cc5
248
packages/playwright/types/test.d.ts
vendored
248
packages/playwright/types/test.d.ts
vendored
|
|
@ -4019,10 +4019,6 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
|
||||||
* - `test.fail.only(title, body)`
|
* - `test.fail.only(title, body)`
|
||||||
* - `test.fail.only(title, details, body)`
|
* - `test.fail.only(title, details, body)`
|
||||||
*
|
*
|
||||||
* To conditionally focus a "failing" test:
|
|
||||||
* - `test.fail.only(condition, description)`
|
|
||||||
* - `test.fail.only(callback, description)`
|
|
||||||
*
|
|
||||||
* **Usage**
|
* **Usage**
|
||||||
*
|
*
|
||||||
* You can declare a focused failing test, so that Playwright runs only this test and ensures it actually fails.
|
* You can declare a focused failing test, so that Playwright runs only this test and ensures it actually fails.
|
||||||
|
|
@ -4038,255 +4034,13 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
|
||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* 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 }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* test('fail in WebKit 2', async ({ page }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param title Test title.
|
* @param title Test title.
|
||||||
* @param details See [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) for test
|
* @param details See [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) for test
|
||||||
* details description.
|
* details description.
|
||||||
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
* @param body Test body that takes one or two arguments: an object with fixtures and optional
|
||||||
* [TestInfo](https://playwright.dev/docs/api/class-testinfo).
|
* [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.
|
|
||||||
*/
|
*/
|
||||||
only: {
|
only: TestFunction<TestArgs & WorkerArgs>;
|
||||||
/**
|
|
||||||
* 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)`
|
|
||||||
*
|
|
||||||
* **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
|
|
||||||
* });
|
|
||||||
* test('not in the focused group', async ({ page }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* 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 }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* test('fail in WebKit 2', async ({ page }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @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.
|
|
||||||
*/
|
|
||||||
(title: string, body: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<void> | void): 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)`
|
|
||||||
*
|
|
||||||
* **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
|
|
||||||
* });
|
|
||||||
* test('not in the focused group', async ({ page }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* 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 }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* test('fail in WebKit 2', async ({ page }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @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.
|
|
||||||
*/
|
|
||||||
(title: string, details: TestDetails, body: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<void> | void): 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)`
|
|
||||||
*
|
|
||||||
* **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
|
|
||||||
* });
|
|
||||||
* test('not in the focused group', async ({ page }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* 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 }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* test('fail in WebKit 2', async ({ page }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @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.
|
|
||||||
*/
|
|
||||||
(condition: 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)`
|
|
||||||
*
|
|
||||||
* **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
|
|
||||||
* });
|
|
||||||
* test('not in the focused group', async ({ page }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* 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 }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* test('fail in WebKit 2', async ({ page }) => {
|
|
||||||
* // This test will not run
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @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.
|
|
||||||
*/
|
|
||||||
(callback: (args: TestArgs & WorkerArgs) => boolean, description?: string): void;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Marks a test as "slow". Slow test will be given triple the default timeout.
|
* Marks a test as "slow". Slow test will be given triple the default timeout.
|
||||||
|
|
|
||||||
7
utils/generate_types/overrides-test.d.ts
vendored
7
utils/generate_types/overrides-test.d.ts
vendored
|
|
@ -116,12 +116,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
|
||||||
(condition: boolean, description?: string): void;
|
(condition: boolean, description?: string): void;
|
||||||
(callback: (args: TestArgs & WorkerArgs) => boolean, description?: string): void;
|
(callback: (args: TestArgs & WorkerArgs) => boolean, description?: string): void;
|
||||||
(): void;
|
(): void;
|
||||||
only: {
|
only: TestFunction<TestArgs & WorkerArgs>;
|
||||||
(title: string, body: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<void> | void): void;
|
|
||||||
(title: string, details: TestDetails, body: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<void> | void): void;
|
|
||||||
(condition: boolean, description?: string): void;
|
|
||||||
(callback: (args: TestArgs & WorkerArgs) => boolean, description?: string): void;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
slow(): void;
|
slow(): void;
|
||||||
slow(condition: boolean, description?: string): void;
|
slow(condition: boolean, description?: string): void;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue