chore: add fail.only signature

This commit is contained in:
Pengoose 2024-10-02 00:27:23 +09:00 committed by pengoosedev
parent be1d6d3059
commit d676c5fbd5

View file

@ -3549,6 +3549,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param description Optional description that will be reflected in a test report.
*/
fixme(callback: (args: TestArgs & WorkerArgs) => boolean, description?: string): void;
fail: {
/**
* Marks a test as "should fail". Playwright runs this test and ensures that it is actually failing. This is useful
* for documentation purposes to acknowledge that some functionality is broken until it is fixed.
@ -3625,7 +3626,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* "should fail" when the return value is `true`.
* @param description Optional description that will be reflected in a test report.
*/
fail(title: string, body: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<void> | void): void;
(title: string, body: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<void> | void): void;
/**
* Marks a test as "should fail". Playwright runs this test and ensures that it is actually failing. This is useful
* for documentation purposes to acknowledge that some functionality is broken until it is fixed.
@ -3702,7 +3703,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* "should fail" when the return value is `true`.
* @param description Optional description that will be reflected in a test report.
*/
fail(title: string, details: TestDetails, body: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<void> | void): void;
(title: string, details: TestDetails, body: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<void> | void): void;
/**
* Marks a test as "should fail". Playwright runs this test and ensures that it is actually failing. This is useful
* for documentation purposes to acknowledge that some functionality is broken until it is fixed.
@ -3779,7 +3780,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* "should fail" when the return value is `true`.
* @param description Optional description that will be reflected in a test report.
*/
fail(condition: boolean, description?: string): void;
(condition: boolean, description?: string): void;
/**
* Marks a test as "should fail". Playwright runs this test and ensures that it is actually failing. This is useful
* for documentation purposes to acknowledge that some functionality is broken until it is fixed.
@ -3856,7 +3857,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* "should fail" when the return value is `true`.
* @param description Optional description that will be reflected in a test report.
*/
fail(callback: (args: TestArgs & WorkerArgs) => boolean, description?: string): void;
(callback: (args: TestArgs & WorkerArgs) => boolean, description?: string): void;
/**
* Marks a test as "should fail". Playwright runs this test and ensures that it is actually failing. This is useful
* for documentation purposes to acknowledge that some functionality is broken until it is fixed.
@ -3933,7 +3934,12 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* "should fail" when the return value is `true`.
* @param description Optional description that will be reflected in a test report.
*/
fail(): void;
(): void;
only: {
(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;
};
}
/**
* Marks a test as "slow". Slow test will be given triple the default timeout.
*