Remove overrides
This commit is contained in:
parent
a44dd67bea
commit
5e292cca6b
|
|
@ -46,7 +46,7 @@ Parent suite, missing for the root suite.
|
||||||
|
|
||||||
## method: Suite.project
|
## method: Suite.project
|
||||||
* since: v1.10
|
* since: v1.10
|
||||||
- returns: ?<[FullProject]>
|
- returns: <[FullProject]|[undefined]>
|
||||||
|
|
||||||
Configuration of the project this suite belongs to, or [void] for the root suite.
|
Configuration of the project this suite belongs to, or [void] for the root suite.
|
||||||
|
|
||||||
|
|
|
||||||
212
packages/playwright/types/test.d.ts
vendored
212
packages/playwright/types/test.d.ts
vendored
|
|
@ -116,67 +116,79 @@ export interface Project<TestArgs = {}, WorkerArgs = {}> extends TestProject {
|
||||||
* [workerInfo.project](https://playwright.dev/docs/api/class-workerinfo#worker-info-project).
|
* [workerInfo.project](https://playwright.dev/docs/api/class-workerinfo#worker-info-project).
|
||||||
*/
|
*/
|
||||||
export interface ProjectInWorker<TestArgs = {}, WorkerArgs = {}> {
|
export interface ProjectInWorker<TestArgs = {}, WorkerArgs = {}> {
|
||||||
|
/**
|
||||||
|
* See [testProject.use](https://playwright.dev/docs/api/class-testproject#test-project-use).
|
||||||
|
*/
|
||||||
|
use: UseOptions<PlaywrightTestOptions & TestArgs, PlaywrightWorkerOptions & WorkerArgs>;
|
||||||
|
/**
|
||||||
|
* See [testProject.dependencies](https://playwright.dev/docs/api/class-testproject#test-project-dependencies).
|
||||||
|
*/
|
||||||
|
dependencies: Array<string>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.grep](https://playwright.dev/docs/api/class-testproject#test-project-grep).
|
* See [testProject.grep](https://playwright.dev/docs/api/class-testproject#test-project-grep).
|
||||||
*/
|
*/
|
||||||
grep: RegExp | RegExp[];
|
grep: RegExp|Array<RegExp>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.grepInvert](https://playwright.dev/docs/api/class-testproject#test-project-grep-invert).
|
* See [testProject.grepInvert](https://playwright.dev/docs/api/class-testproject#test-project-grep-invert).
|
||||||
*/
|
*/
|
||||||
grepInvert: RegExp | RegExp[] | null;
|
grepInvert: null|RegExp|Array<RegExp>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.metadata](https://playwright.dev/docs/api/class-testproject#test-project-metadata).
|
* See [testProject.metadata](https://playwright.dev/docs/api/class-testproject#test-project-metadata).
|
||||||
*/
|
*/
|
||||||
metadata: Metadata;
|
metadata: Metadata;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.name](https://playwright.dev/docs/api/class-testproject#test-project-name).
|
* See [testProject.name](https://playwright.dev/docs/api/class-testproject#test-project-name).
|
||||||
*/
|
*/
|
||||||
name: string;
|
name: string;
|
||||||
/**
|
|
||||||
* See [testProject.dependencies](https://playwright.dev/docs/api/class-testproject#test-project-dependencies).
|
|
||||||
*/
|
|
||||||
dependencies: string[];
|
|
||||||
/**
|
|
||||||
* See [testProject.snapshotDir](https://playwright.dev/docs/api/class-testproject#test-project-snapshot-dir).
|
|
||||||
*/
|
|
||||||
snapshotDir: string;
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.outputDir](https://playwright.dev/docs/api/class-testproject#test-project-output-dir).
|
* See [testProject.outputDir](https://playwright.dev/docs/api/class-testproject#test-project-output-dir).
|
||||||
*/
|
*/
|
||||||
outputDir: string;
|
outputDir: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.repeatEach](https://playwright.dev/docs/api/class-testproject#test-project-repeat-each).
|
* See [testProject.repeatEach](https://playwright.dev/docs/api/class-testproject#test-project-repeat-each).
|
||||||
*/
|
*/
|
||||||
repeatEach: number;
|
repeatEach: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.retries](https://playwright.dev/docs/api/class-testproject#test-project-retries).
|
* See [testProject.retries](https://playwright.dev/docs/api/class-testproject#test-project-retries).
|
||||||
*/
|
*/
|
||||||
retries: number;
|
retries: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testProject.snapshotDir](https://playwright.dev/docs/api/class-testproject#test-project-snapshot-dir).
|
||||||
|
*/
|
||||||
|
snapshotDir: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.teardown](https://playwright.dev/docs/api/class-testproject#test-project-teardown).
|
* See [testProject.teardown](https://playwright.dev/docs/api/class-testproject#test-project-teardown).
|
||||||
*/
|
*/
|
||||||
teardown?: string;
|
teardown?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.testDir](https://playwright.dev/docs/api/class-testproject#test-project-test-dir).
|
* See [testProject.testDir](https://playwright.dev/docs/api/class-testproject#test-project-test-dir).
|
||||||
*/
|
*/
|
||||||
testDir: string;
|
testDir: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.testIgnore](https://playwright.dev/docs/api/class-testproject#test-project-test-ignore).
|
* See [testProject.testIgnore](https://playwright.dev/docs/api/class-testproject#test-project-test-ignore).
|
||||||
*/
|
*/
|
||||||
testIgnore: string | RegExp | (string | RegExp)[];
|
testIgnore: string|RegExp|Array<string|RegExp>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.testMatch](https://playwright.dev/docs/api/class-testproject#test-project-test-match).
|
* See [testProject.testMatch](https://playwright.dev/docs/api/class-testproject#test-project-test-match).
|
||||||
*/
|
*/
|
||||||
testMatch: string | RegExp | (string | RegExp)[];
|
testMatch: string|RegExp|Array<string|RegExp>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.timeout](https://playwright.dev/docs/api/class-testproject#test-project-timeout).
|
* See [testProject.timeout](https://playwright.dev/docs/api/class-testproject#test-project-timeout).
|
||||||
*/
|
*/
|
||||||
timeout: number;
|
timeout: number;
|
||||||
/**
|
|
||||||
* See [testProject.use](https://playwright.dev/docs/api/class-testproject#test-project-use).
|
|
||||||
*/
|
|
||||||
use: UseOptions<PlaywrightTestOptions & TestArgs, PlaywrightWorkerOptions & WorkerArgs>;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type LiteralUnion<T extends U, U = string> = T | (U & { zz_IGNORE_ME?: never });
|
type LiteralUnion<T extends U, U = string> = T | (U & { zz_IGNORE_ME?: never });
|
||||||
|
|
@ -1186,50 +1198,6 @@ export type Metadata = { [key: string]: any };
|
||||||
* [workerInfo.config](https://playwright.dev/docs/api/class-workerinfo#worker-info-config).
|
* [workerInfo.config](https://playwright.dev/docs/api/class-workerinfo#worker-info-config).
|
||||||
*/
|
*/
|
||||||
export interface ConfigInWorker<TestArgs = {}, WorkerArgs = {}> {
|
export interface ConfigInWorker<TestArgs = {}, WorkerArgs = {}> {
|
||||||
/**
|
|
||||||
* See [testConfig.forbidOnly](https://playwright.dev/docs/api/class-testconfig#test-config-forbid-only).
|
|
||||||
*/
|
|
||||||
forbidOnly: boolean;
|
|
||||||
/**
|
|
||||||
* See [testConfig.fullyParallel](https://playwright.dev/docs/api/class-testconfig#test-config-fully-parallel).
|
|
||||||
*/
|
|
||||||
fullyParallel: boolean;
|
|
||||||
/**
|
|
||||||
* See [testConfig.globalSetup](https://playwright.dev/docs/api/class-testconfig#test-config-global-setup).
|
|
||||||
*/
|
|
||||||
globalSetup: string | null;
|
|
||||||
/**
|
|
||||||
* See [testConfig.globalTeardown](https://playwright.dev/docs/api/class-testconfig#test-config-global-teardown).
|
|
||||||
*/
|
|
||||||
globalTeardown: string | null;
|
|
||||||
/**
|
|
||||||
* See [testConfig.globalTimeout](https://playwright.dev/docs/api/class-testconfig#test-config-global-timeout).
|
|
||||||
*/
|
|
||||||
globalTimeout: number;
|
|
||||||
/**
|
|
||||||
* See [testConfig.grep](https://playwright.dev/docs/api/class-testconfig#test-config-grep).
|
|
||||||
*/
|
|
||||||
grep: RegExp | RegExp[];
|
|
||||||
/**
|
|
||||||
* See [testConfig.grepInvert](https://playwright.dev/docs/api/class-testconfig#test-config-grep-invert).
|
|
||||||
*/
|
|
||||||
grepInvert: RegExp | RegExp[] | null;
|
|
||||||
/**
|
|
||||||
* See [testConfig.maxFailures](https://playwright.dev/docs/api/class-testconfig#test-config-max-failures).
|
|
||||||
*/
|
|
||||||
maxFailures: number;
|
|
||||||
/**
|
|
||||||
* See [testConfig.metadata](https://playwright.dev/docs/api/class-testconfig#test-config-metadata).
|
|
||||||
*/
|
|
||||||
metadata: Metadata;
|
|
||||||
/**
|
|
||||||
* Playwright version.
|
|
||||||
*/
|
|
||||||
version: string;
|
|
||||||
/**
|
|
||||||
* See [testConfig.preserveOutput](https://playwright.dev/docs/api/class-testconfig#test-config-preserve-output).
|
|
||||||
*/
|
|
||||||
preserveOutput: 'always' | 'never' | 'failures-only';
|
|
||||||
/**
|
/**
|
||||||
* List of resolved projects.
|
* List of resolved projects.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1238,27 +1206,6 @@ export interface ConfigInWorker<TestArgs = {}, WorkerArgs = {}> {
|
||||||
* See [testConfig.reporter](https://playwright.dev/docs/api/class-testconfig#test-config-reporter).
|
* See [testConfig.reporter](https://playwright.dev/docs/api/class-testconfig#test-config-reporter).
|
||||||
*/
|
*/
|
||||||
reporter: ReporterDescription[];
|
reporter: ReporterDescription[];
|
||||||
/**
|
|
||||||
* See [testConfig.reportSlowTests](https://playwright.dev/docs/api/class-testconfig#test-config-report-slow-tests).
|
|
||||||
*/
|
|
||||||
reportSlowTests: { max: number, threshold: number } | null;
|
|
||||||
rootDir: string;
|
|
||||||
/**
|
|
||||||
* See [testConfig.quiet](https://playwright.dev/docs/api/class-testconfig#test-config-quiet).
|
|
||||||
*/
|
|
||||||
quiet: boolean;
|
|
||||||
/**
|
|
||||||
* See [testConfig.shard](https://playwright.dev/docs/api/class-testconfig#test-config-shard).
|
|
||||||
*/
|
|
||||||
shard: { total: number, current: number } | null;
|
|
||||||
/**
|
|
||||||
* See [testConfig.updateSnapshots](https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots).
|
|
||||||
*/
|
|
||||||
updateSnapshots: 'all' | 'none' | 'missing';
|
|
||||||
/**
|
|
||||||
* See [testConfig.workers](https://playwright.dev/docs/api/class-testconfig#test-config-workers).
|
|
||||||
*/
|
|
||||||
workers: number;
|
|
||||||
/**
|
/**
|
||||||
* See [testConfig.webServer](https://playwright.dev/docs/api/class-testconfig#test-config-web-server).
|
* See [testConfig.webServer](https://playwright.dev/docs/api/class-testconfig#test-config-web-server).
|
||||||
*/
|
*/
|
||||||
|
|
@ -1268,6 +1215,107 @@ export interface ConfigInWorker<TestArgs = {}, WorkerArgs = {}> {
|
||||||
*/
|
*/
|
||||||
configFile?: string;
|
configFile?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.forbidOnly](https://playwright.dev/docs/api/class-testconfig#test-config-forbid-only).
|
||||||
|
*/
|
||||||
|
forbidOnly: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.fullyParallel](https://playwright.dev/docs/api/class-testconfig#test-config-fully-parallel).
|
||||||
|
*/
|
||||||
|
fullyParallel: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.globalSetup](https://playwright.dev/docs/api/class-testconfig#test-config-global-setup).
|
||||||
|
*/
|
||||||
|
globalSetup: null|string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.globalTeardown](https://playwright.dev/docs/api/class-testconfig#test-config-global-teardown).
|
||||||
|
*/
|
||||||
|
globalTeardown: null|string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.globalTimeout](https://playwright.dev/docs/api/class-testconfig#test-config-global-timeout).
|
||||||
|
*/
|
||||||
|
globalTimeout: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.grep](https://playwright.dev/docs/api/class-testconfig#test-config-grep).
|
||||||
|
*/
|
||||||
|
grep: RegExp|Array<RegExp>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.grepInvert](https://playwright.dev/docs/api/class-testconfig#test-config-grep-invert).
|
||||||
|
*/
|
||||||
|
grepInvert: null|RegExp|Array<RegExp>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.maxFailures](https://playwright.dev/docs/api/class-testconfig#test-config-max-failures).
|
||||||
|
*/
|
||||||
|
maxFailures: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.metadata](https://playwright.dev/docs/api/class-testconfig#test-config-metadata).
|
||||||
|
*/
|
||||||
|
metadata: Metadata;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.preserveOutput](https://playwright.dev/docs/api/class-testconfig#test-config-preserve-output).
|
||||||
|
*/
|
||||||
|
preserveOutput: "always"|"never"|"failures-only";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.quiet](https://playwright.dev/docs/api/class-testconfig#test-config-quiet).
|
||||||
|
*/
|
||||||
|
quiet: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.reportSlowTests](https://playwright.dev/docs/api/class-testconfig#test-config-report-slow-tests).
|
||||||
|
*/
|
||||||
|
reportSlowTests: null|{
|
||||||
|
/**
|
||||||
|
* The maximum number of slow test files to report. Defaults to `5`.
|
||||||
|
*/
|
||||||
|
max: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test duration in milliseconds that is considered slow. Defaults to 15 seconds.
|
||||||
|
*/
|
||||||
|
threshold: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
rootDir: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.shard](https://playwright.dev/docs/api/class-testconfig#test-config-shard).
|
||||||
|
*/
|
||||||
|
shard: null|{
|
||||||
|
/**
|
||||||
|
* The total number of shards.
|
||||||
|
*/
|
||||||
|
total: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The index of the shard to execute, one-based.
|
||||||
|
*/
|
||||||
|
current: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.updateSnapshots](https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots).
|
||||||
|
*/
|
||||||
|
updateSnapshots: "all"|"none"|"missing";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Playwright version.
|
||||||
|
*/
|
||||||
|
version: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.workers](https://playwright.dev/docs/api/class-testconfig#test-config-workers).
|
||||||
|
*/
|
||||||
|
workers: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TestStatus = 'passed' | 'failed' | 'timedOut' | 'skipped' | 'interrupted';
|
export type TestStatus = 'passed' | 'failed' | 'timedOut' | 'skipped' | 'interrupted';
|
||||||
|
|
|
||||||
239
packages/playwright/types/testReporter.d.ts
vendored
239
packages/playwright/types/testReporter.d.ts
vendored
|
|
@ -25,50 +25,6 @@ type UseOptions<TestArgs, WorkerArgs> = Partial<WorkerArgs> & Partial<TestArgs>;
|
||||||
* [reporter.onBegin(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-on-begin).
|
* [reporter.onBegin(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-on-begin).
|
||||||
*/
|
*/
|
||||||
export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
|
export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
|
||||||
/**
|
|
||||||
* See [testConfig.forbidOnly](https://playwright.dev/docs/api/class-testconfig#test-config-forbid-only).
|
|
||||||
*/
|
|
||||||
forbidOnly: boolean;
|
|
||||||
/**
|
|
||||||
* See [testConfig.fullyParallel](https://playwright.dev/docs/api/class-testconfig#test-config-fully-parallel).
|
|
||||||
*/
|
|
||||||
fullyParallel: boolean;
|
|
||||||
/**
|
|
||||||
* See [testConfig.globalSetup](https://playwright.dev/docs/api/class-testconfig#test-config-global-setup).
|
|
||||||
*/
|
|
||||||
globalSetup: string | null;
|
|
||||||
/**
|
|
||||||
* See [testConfig.globalTeardown](https://playwright.dev/docs/api/class-testconfig#test-config-global-teardown).
|
|
||||||
*/
|
|
||||||
globalTeardown: string | null;
|
|
||||||
/**
|
|
||||||
* See [testConfig.globalTimeout](https://playwright.dev/docs/api/class-testconfig#test-config-global-timeout).
|
|
||||||
*/
|
|
||||||
globalTimeout: number;
|
|
||||||
/**
|
|
||||||
* See [testConfig.grep](https://playwright.dev/docs/api/class-testconfig#test-config-grep).
|
|
||||||
*/
|
|
||||||
grep: RegExp | RegExp[];
|
|
||||||
/**
|
|
||||||
* See [testConfig.grepInvert](https://playwright.dev/docs/api/class-testconfig#test-config-grep-invert).
|
|
||||||
*/
|
|
||||||
grepInvert: RegExp | RegExp[] | null;
|
|
||||||
/**
|
|
||||||
* See [testConfig.maxFailures](https://playwright.dev/docs/api/class-testconfig#test-config-max-failures).
|
|
||||||
*/
|
|
||||||
maxFailures: number;
|
|
||||||
/**
|
|
||||||
* See [testConfig.metadata](https://playwright.dev/docs/api/class-testconfig#test-config-metadata).
|
|
||||||
*/
|
|
||||||
metadata: Metadata;
|
|
||||||
/**
|
|
||||||
* Playwright version.
|
|
||||||
*/
|
|
||||||
version: string;
|
|
||||||
/**
|
|
||||||
* See [testConfig.preserveOutput](https://playwright.dev/docs/api/class-testconfig#test-config-preserve-output).
|
|
||||||
*/
|
|
||||||
preserveOutput: 'always' | 'never' | 'failures-only';
|
|
||||||
/**
|
/**
|
||||||
* List of resolved projects.
|
* List of resolved projects.
|
||||||
*/
|
*/
|
||||||
|
|
@ -77,38 +33,117 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
|
||||||
* See [testConfig.reporter](https://playwright.dev/docs/api/class-testconfig#test-config-reporter).
|
* See [testConfig.reporter](https://playwright.dev/docs/api/class-testconfig#test-config-reporter).
|
||||||
*/
|
*/
|
||||||
reporter: ReporterDescription[];
|
reporter: ReporterDescription[];
|
||||||
/**
|
|
||||||
* See [testConfig.reportSlowTests](https://playwright.dev/docs/api/class-testconfig#test-config-report-slow-tests).
|
|
||||||
*/
|
|
||||||
reportSlowTests: { max: number, threshold: number } | null;
|
|
||||||
rootDir: string;
|
|
||||||
/**
|
|
||||||
* See [testConfig.quiet](https://playwright.dev/docs/api/class-testconfig#test-config-quiet).
|
|
||||||
*/
|
|
||||||
quiet: boolean;
|
|
||||||
/**
|
|
||||||
* See [testConfig.shard](https://playwright.dev/docs/api/class-testconfig#test-config-shard).
|
|
||||||
*/
|
|
||||||
shard: { total: number, current: number } | null;
|
|
||||||
/**
|
|
||||||
* See [testConfig.updateSnapshots](https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots).
|
|
||||||
*/
|
|
||||||
updateSnapshots: 'all' | 'none' | 'missing';
|
|
||||||
/**
|
|
||||||
* See [testConfig.workers](https://playwright.dev/docs/api/class-testconfig#test-config-workers).
|
|
||||||
*/
|
|
||||||
workers: number;
|
|
||||||
/**
|
/**
|
||||||
* See [testConfig.webServer](https://playwright.dev/docs/api/class-testconfig#test-config-web-server).
|
* See [testConfig.webServer](https://playwright.dev/docs/api/class-testconfig#test-config-web-server).
|
||||||
*/
|
*/
|
||||||
webServer: NonNullable<ConfigInWorker['webServer']>|null;
|
webServer: ConfigInWorker['webServer'];
|
||||||
/**
|
/**
|
||||||
* Path to the configuration file (if any) used to run the tests.
|
* Path to the configuration file (if any) used to run the tests.
|
||||||
*/
|
*/
|
||||||
configFile?: string;
|
configFile?: string;
|
||||||
|
|
||||||
}
|
/**
|
||||||
|
* See [testConfig.forbidOnly](https://playwright.dev/docs/api/class-testconfig#test-config-forbid-only).
|
||||||
|
*/
|
||||||
|
forbidOnly: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.fullyParallel](https://playwright.dev/docs/api/class-testconfig#test-config-fully-parallel).
|
||||||
|
*/
|
||||||
|
fullyParallel: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.globalSetup](https://playwright.dev/docs/api/class-testconfig#test-config-global-setup).
|
||||||
|
*/
|
||||||
|
globalSetup: null|string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.globalTeardown](https://playwright.dev/docs/api/class-testconfig#test-config-global-teardown).
|
||||||
|
*/
|
||||||
|
globalTeardown: null|string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.globalTimeout](https://playwright.dev/docs/api/class-testconfig#test-config-global-timeout).
|
||||||
|
*/
|
||||||
|
globalTimeout: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.grep](https://playwright.dev/docs/api/class-testconfig#test-config-grep).
|
||||||
|
*/
|
||||||
|
grep: RegExp|Array<RegExp>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.grepInvert](https://playwright.dev/docs/api/class-testconfig#test-config-grep-invert).
|
||||||
|
*/
|
||||||
|
grepInvert: null|RegExp|Array<RegExp>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.maxFailures](https://playwright.dev/docs/api/class-testconfig#test-config-max-failures).
|
||||||
|
*/
|
||||||
|
maxFailures: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.metadata](https://playwright.dev/docs/api/class-testconfig#test-config-metadata).
|
||||||
|
*/
|
||||||
|
metadata: Metadata;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.preserveOutput](https://playwright.dev/docs/api/class-testconfig#test-config-preserve-output).
|
||||||
|
*/
|
||||||
|
preserveOutput: "always"|"never"|"failures-only";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.quiet](https://playwright.dev/docs/api/class-testconfig#test-config-quiet).
|
||||||
|
*/
|
||||||
|
quiet: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.reportSlowTests](https://playwright.dev/docs/api/class-testconfig#test-config-report-slow-tests).
|
||||||
|
*/
|
||||||
|
reportSlowTests: null|{
|
||||||
|
/**
|
||||||
|
* The maximum number of slow test files to report. Defaults to `5`.
|
||||||
|
*/
|
||||||
|
max: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test duration in milliseconds that is considered slow. Defaults to 15 seconds.
|
||||||
|
*/
|
||||||
|
threshold: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
rootDir: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.shard](https://playwright.dev/docs/api/class-testconfig#test-config-shard).
|
||||||
|
*/
|
||||||
|
shard: null|{
|
||||||
|
/**
|
||||||
|
* The total number of shards.
|
||||||
|
*/
|
||||||
|
total: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The index of the shard to execute, one-based.
|
||||||
|
*/
|
||||||
|
current: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.updateSnapshots](https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots).
|
||||||
|
*/
|
||||||
|
updateSnapshots: "all"|"none"|"missing";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Playwright version.
|
||||||
|
*/
|
||||||
|
version: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testConfig.workers](https://playwright.dev/docs/api/class-testconfig#test-config-workers).
|
||||||
|
*/
|
||||||
|
workers: number;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runtime representation of the test project configuration that is passed to {@link Reporter}. It exposes some of the
|
* Runtime representation of the test project configuration that is passed to {@link Reporter}. It exposes some of the
|
||||||
|
|
@ -117,67 +152,79 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
|
||||||
* [suite.project()](https://playwright.dev/docs/api/class-suite#suite-project).
|
* [suite.project()](https://playwright.dev/docs/api/class-suite#suite-project).
|
||||||
*/
|
*/
|
||||||
export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
|
export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
|
||||||
|
/**
|
||||||
|
* See [testProject.use](https://playwright.dev/docs/api/class-testproject#test-project-use).
|
||||||
|
*/
|
||||||
|
use: UseOptions<PlaywrightTestOptions & TestArgs, PlaywrightWorkerOptions & WorkerArgs>;
|
||||||
|
/**
|
||||||
|
* See [testProject.dependencies](https://playwright.dev/docs/api/class-testproject#test-project-dependencies).
|
||||||
|
*/
|
||||||
|
dependencies: Array<string>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.grep](https://playwright.dev/docs/api/class-testproject#test-project-grep).
|
* See [testProject.grep](https://playwright.dev/docs/api/class-testproject#test-project-grep).
|
||||||
*/
|
*/
|
||||||
grep: RegExp | RegExp[];
|
grep: RegExp|Array<RegExp>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.grepInvert](https://playwright.dev/docs/api/class-testproject#test-project-grep-invert).
|
* See [testProject.grepInvert](https://playwright.dev/docs/api/class-testproject#test-project-grep-invert).
|
||||||
*/
|
*/
|
||||||
grepInvert: RegExp | RegExp[] | null;
|
grepInvert: null|RegExp|Array<RegExp>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.metadata](https://playwright.dev/docs/api/class-testproject#test-project-metadata).
|
* See [testProject.metadata](https://playwright.dev/docs/api/class-testproject#test-project-metadata).
|
||||||
*/
|
*/
|
||||||
metadata: Metadata;
|
metadata: Metadata;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.name](https://playwright.dev/docs/api/class-testproject#test-project-name).
|
* See [testProject.name](https://playwright.dev/docs/api/class-testproject#test-project-name).
|
||||||
*/
|
*/
|
||||||
name: string;
|
name: string;
|
||||||
/**
|
|
||||||
* See [testProject.dependencies](https://playwright.dev/docs/api/class-testproject#test-project-dependencies).
|
|
||||||
*/
|
|
||||||
dependencies: string[];
|
|
||||||
/**
|
|
||||||
* See [testProject.snapshotDir](https://playwright.dev/docs/api/class-testproject#test-project-snapshot-dir).
|
|
||||||
*/
|
|
||||||
snapshotDir: string;
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.outputDir](https://playwright.dev/docs/api/class-testproject#test-project-output-dir).
|
* See [testProject.outputDir](https://playwright.dev/docs/api/class-testproject#test-project-output-dir).
|
||||||
*/
|
*/
|
||||||
outputDir: string;
|
outputDir: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.repeatEach](https://playwright.dev/docs/api/class-testproject#test-project-repeat-each).
|
* See [testProject.repeatEach](https://playwright.dev/docs/api/class-testproject#test-project-repeat-each).
|
||||||
*/
|
*/
|
||||||
repeatEach: number;
|
repeatEach: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.retries](https://playwright.dev/docs/api/class-testproject#test-project-retries).
|
* See [testProject.retries](https://playwright.dev/docs/api/class-testproject#test-project-retries).
|
||||||
*/
|
*/
|
||||||
retries: number;
|
retries: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See [testProject.snapshotDir](https://playwright.dev/docs/api/class-testproject#test-project-snapshot-dir).
|
||||||
|
*/
|
||||||
|
snapshotDir: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.teardown](https://playwright.dev/docs/api/class-testproject#test-project-teardown).
|
* See [testProject.teardown](https://playwright.dev/docs/api/class-testproject#test-project-teardown).
|
||||||
*/
|
*/
|
||||||
teardown?: string;
|
teardown?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.testDir](https://playwright.dev/docs/api/class-testproject#test-project-test-dir).
|
* See [testProject.testDir](https://playwright.dev/docs/api/class-testproject#test-project-test-dir).
|
||||||
*/
|
*/
|
||||||
testDir: string;
|
testDir: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.testIgnore](https://playwright.dev/docs/api/class-testproject#test-project-test-ignore).
|
* See [testProject.testIgnore](https://playwright.dev/docs/api/class-testproject#test-project-test-ignore).
|
||||||
*/
|
*/
|
||||||
testIgnore: string | RegExp | (string | RegExp)[];
|
testIgnore: string|RegExp|Array<string|RegExp>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.testMatch](https://playwright.dev/docs/api/class-testproject#test-project-test-match).
|
* See [testProject.testMatch](https://playwright.dev/docs/api/class-testproject#test-project-test-match).
|
||||||
*/
|
*/
|
||||||
testMatch: string | RegExp | (string | RegExp)[];
|
testMatch: string|RegExp|Array<string|RegExp>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See [testProject.timeout](https://playwright.dev/docs/api/class-testproject#test-project-timeout).
|
* See [testProject.timeout](https://playwright.dev/docs/api/class-testproject#test-project-timeout).
|
||||||
*/
|
*/
|
||||||
timeout: number;
|
timeout: number;
|
||||||
/**
|
|
||||||
* See [testProject.use](https://playwright.dev/docs/api/class-testproject#test-project-use).
|
|
||||||
*/
|
|
||||||
use: UseOptions<PlaywrightTestOptions & TestArgs, PlaywrightWorkerOptions & WorkerArgs>;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -207,10 +254,6 @@ export interface Suite {
|
||||||
* -> ...`describe` -> `test`.
|
* -> ...`describe` -> `test`.
|
||||||
*/
|
*/
|
||||||
type: 'root' | 'project' | 'file' | 'describe';
|
type: 'root' | 'project' | 'file' | 'describe';
|
||||||
/**
|
|
||||||
* Configuration of the project this suite belongs to, or [void] for the root suite.
|
|
||||||
*/
|
|
||||||
project(): FullProject | undefined;
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of all test cases in this suite and its descendants, as opposite to
|
* Returns the list of all test cases in this suite and its descendants, as opposite to
|
||||||
* [suite.tests](https://playwright.dev/docs/api/class-suite#suite-tests).
|
* [suite.tests](https://playwright.dev/docs/api/class-suite#suite-tests).
|
||||||
|
|
@ -225,6 +268,11 @@ export interface Suite {
|
||||||
*/
|
*/
|
||||||
entries(): Array<TestCase|Suite>;
|
entries(): Array<TestCase|Suite>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration of the project this suite belongs to, or [void] for the root suite.
|
||||||
|
*/
|
||||||
|
project(): FullProject|undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of titles from the root down to this suite.
|
* Returns a list of titles from the root down to this suite.
|
||||||
*/
|
*/
|
||||||
|
|
@ -605,13 +653,6 @@ export interface FullResult {
|
||||||
* to enhance user experience.
|
* to enhance user experience.
|
||||||
*/
|
*/
|
||||||
export interface Reporter {
|
export interface Reporter {
|
||||||
/**
|
|
||||||
* Called once before running tests. All tests have been already discovered and put into a hierarchy of {@link
|
|
||||||
* Suite}s.
|
|
||||||
* @param config Resolved configuration.
|
|
||||||
* @param suite The root suite that contains all projects, files and test cases.
|
|
||||||
*/
|
|
||||||
onBegin?(config: FullConfig, suite: Suite): void;
|
|
||||||
/**
|
/**
|
||||||
* Called after all tests have been run, or testing has been interrupted. Note that this method may return a [Promise]
|
* Called after all tests have been run, or testing has been interrupted. Note that this method may return a [Promise]
|
||||||
* and Playwright Test will await it. Reporter is allowed to override the status and hence affect the exit code of the
|
* and Playwright Test will await it. Reporter is allowed to override the status and hence affect the exit code of the
|
||||||
|
|
@ -625,6 +666,14 @@ export interface Reporter {
|
||||||
* - `'interrupted'` - Interrupted by the user.
|
* - `'interrupted'` - Interrupted by the user.
|
||||||
*/
|
*/
|
||||||
onEnd?(result: FullResult): Promise<{ status?: FullResult['status'] } | undefined | void> | void;
|
onEnd?(result: FullResult): Promise<{ status?: FullResult['status'] } | undefined | void> | void;
|
||||||
|
/**
|
||||||
|
* Called once before running tests. All tests have been already discovered and put into a hierarchy of {@link
|
||||||
|
* Suite}s.
|
||||||
|
* @param config Resolved configuration.
|
||||||
|
* @param suite The root suite that contains all projects, files and test cases.
|
||||||
|
*/
|
||||||
|
onBegin?(config: FullConfig, suite: Suite): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called on some global error, for example unhandled exception in the worker process.
|
* Called on some global error, for example unhandled exception in the worker process.
|
||||||
* @param error The error.
|
* @param error The error.
|
||||||
|
|
|
||||||
40
utils/generate_types/overrides-test.d.ts
vendored
40
utils/generate_types/overrides-test.d.ts
vendored
|
|
@ -35,27 +35,9 @@ export interface Project<TestArgs = {}, WorkerArgs = {}> extends TestProject {
|
||||||
use?: UseOptions<TestArgs, WorkerArgs>;
|
use?: UseOptions<TestArgs, WorkerArgs>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [internal] !!! DO NOT ADD TO THIS !!!
|
|
||||||
// [internal] It is part of the public API and is computed from the user's config.
|
|
||||||
// [internal] If you need new fields internally, add them to FullProjectInternal instead.
|
|
||||||
export interface ProjectInWorker<TestArgs = {}, WorkerArgs = {}> {
|
export interface ProjectInWorker<TestArgs = {}, WorkerArgs = {}> {
|
||||||
grep: RegExp | RegExp[];
|
|
||||||
grepInvert: RegExp | RegExp[] | null;
|
|
||||||
metadata: Metadata;
|
|
||||||
name: string;
|
|
||||||
dependencies: string[];
|
|
||||||
snapshotDir: string;
|
|
||||||
outputDir: string;
|
|
||||||
repeatEach: number;
|
|
||||||
retries: number;
|
|
||||||
teardown?: string;
|
|
||||||
testDir: string;
|
|
||||||
testIgnore: string | RegExp | (string | RegExp)[];
|
|
||||||
testMatch: string | RegExp | (string | RegExp)[];
|
|
||||||
timeout: number;
|
|
||||||
use: UseOptions<PlaywrightTestOptions & TestArgs, PlaywrightWorkerOptions & WorkerArgs>;
|
use: UseOptions<PlaywrightTestOptions & TestArgs, PlaywrightWorkerOptions & WorkerArgs>;
|
||||||
}
|
}
|
||||||
// [internal] !!! DO NOT ADD TO THIS !!! See prior note.
|
|
||||||
|
|
||||||
type LiteralUnion<T extends U, U = string> = T | (U & { zz_IGNORE_ME?: never });
|
type LiteralUnion<T extends U, U = string> = T | (U & { zz_IGNORE_ME?: never });
|
||||||
|
|
||||||
|
|
@ -71,32 +53,10 @@ export interface Config<TestArgs = {}, WorkerArgs = {}> extends TestConfig {
|
||||||
|
|
||||||
export type Metadata = { [key: string]: any };
|
export type Metadata = { [key: string]: any };
|
||||||
|
|
||||||
// [internal] !!! DO NOT ADD TO THIS !!!
|
|
||||||
// [internal] It is part of the public API and is computed from the user's config.
|
|
||||||
// [internal] If you need new fields internally, add them to FullConfigInternal instead.
|
|
||||||
export interface ConfigInWorker<TestArgs = {}, WorkerArgs = {}> {
|
export interface ConfigInWorker<TestArgs = {}, WorkerArgs = {}> {
|
||||||
forbidOnly: boolean;
|
|
||||||
fullyParallel: boolean;
|
|
||||||
globalSetup: string | null;
|
|
||||||
globalTeardown: string | null;
|
|
||||||
globalTimeout: number;
|
|
||||||
grep: RegExp | RegExp[];
|
|
||||||
grepInvert: RegExp | RegExp[] | null;
|
|
||||||
maxFailures: number;
|
|
||||||
metadata: Metadata;
|
|
||||||
version: string;
|
|
||||||
preserveOutput: 'always' | 'never' | 'failures-only';
|
|
||||||
projects: ProjectInWorker<TestArgs, WorkerArgs>[];
|
projects: ProjectInWorker<TestArgs, WorkerArgs>[];
|
||||||
reporter: ReporterDescription[];
|
reporter: ReporterDescription[];
|
||||||
reportSlowTests: { max: number, threshold: number } | null;
|
|
||||||
rootDir: string;
|
|
||||||
quiet: boolean;
|
|
||||||
shard: { total: number, current: number } | null;
|
|
||||||
updateSnapshots: 'all' | 'none' | 'missing';
|
|
||||||
workers: number;
|
|
||||||
webServer: TestConfigWebServer | null;
|
webServer: TestConfigWebServer | null;
|
||||||
configFile?: string;
|
|
||||||
// [internal] !!! DO NOT ADD TO THIS !!! See prior note.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TestStatus = 'passed' | 'failed' | 'timedOut' | 'skipped' | 'interrupted';
|
export type TestStatus = 'passed' | 'failed' | 'timedOut' | 'skipped' | 'interrupted';
|
||||||
|
|
|
||||||
45
utils/generate_types/overrides-testReporter.d.ts
vendored
45
utils/generate_types/overrides-testReporter.d.ts
vendored
|
|
@ -19,60 +19,18 @@ export type { TestStatus } from './test';
|
||||||
|
|
||||||
type UseOptions<TestArgs, WorkerArgs> = Partial<WorkerArgs> & Partial<TestArgs>;
|
type UseOptions<TestArgs, WorkerArgs> = Partial<WorkerArgs> & Partial<TestArgs>;
|
||||||
|
|
||||||
// [internal] !!! DO NOT ADD TO THIS !!!
|
|
||||||
// [internal] It is part of the public API and is computed from the user's config.
|
|
||||||
// [internal] If you need new fields internally, add them to FullConfigInternal instead.
|
|
||||||
export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
|
export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
|
||||||
forbidOnly: boolean;
|
|
||||||
fullyParallel: boolean;
|
|
||||||
globalSetup: string | null;
|
|
||||||
globalTeardown: string | null;
|
|
||||||
globalTimeout: number;
|
|
||||||
grep: RegExp | RegExp[];
|
|
||||||
grepInvert: RegExp | RegExp[] | null;
|
|
||||||
maxFailures: number;
|
|
||||||
metadata: Metadata;
|
|
||||||
version: string;
|
|
||||||
preserveOutput: 'always' | 'never' | 'failures-only';
|
|
||||||
projects: FullProject<TestArgs, WorkerArgs>[];
|
projects: FullProject<TestArgs, WorkerArgs>[];
|
||||||
reporter: ReporterDescription[];
|
reporter: ReporterDescription[];
|
||||||
reportSlowTests: { max: number, threshold: number } | null;
|
webServer: ConfigInWorker['webServer'];
|
||||||
rootDir: string;
|
|
||||||
quiet: boolean;
|
|
||||||
shard: { total: number, current: number } | null;
|
|
||||||
updateSnapshots: 'all' | 'none' | 'missing';
|
|
||||||
workers: number;
|
|
||||||
webServer: NonNullable<ConfigInWorker['webServer']>|null;
|
|
||||||
configFile?: string;
|
|
||||||
}
|
}
|
||||||
// [internal] !!! DO NOT ADD TO THIS !!! See prior note.
|
|
||||||
|
|
||||||
|
|
||||||
// [internal] !!! DO NOT ADD TO THIS !!!
|
|
||||||
// [internal] It is part of the public API and is computed from the user's config.
|
|
||||||
// [internal] If you need new fields internally, add them to FullProjectInternal instead.
|
|
||||||
export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
|
export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
|
||||||
grep: RegExp | RegExp[];
|
|
||||||
grepInvert: RegExp | RegExp[] | null;
|
|
||||||
metadata: Metadata;
|
|
||||||
name: string;
|
|
||||||
dependencies: string[];
|
|
||||||
snapshotDir: string;
|
|
||||||
outputDir: string;
|
|
||||||
repeatEach: number;
|
|
||||||
retries: number;
|
|
||||||
teardown?: string;
|
|
||||||
testDir: string;
|
|
||||||
testIgnore: string | RegExp | (string | RegExp)[];
|
|
||||||
testMatch: string | RegExp | (string | RegExp)[];
|
|
||||||
timeout: number;
|
|
||||||
use: UseOptions<PlaywrightTestOptions & TestArgs, PlaywrightWorkerOptions & WorkerArgs>;
|
use: UseOptions<PlaywrightTestOptions & TestArgs, PlaywrightWorkerOptions & WorkerArgs>;
|
||||||
}
|
}
|
||||||
// [internal] !!! DO NOT ADD TO THIS !!! See prior note.
|
|
||||||
|
|
||||||
export interface Suite {
|
export interface Suite {
|
||||||
type: 'root' | 'project' | 'file' | 'describe';
|
type: 'root' | 'project' | 'file' | 'describe';
|
||||||
project(): FullProject | undefined;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TestCase {
|
export interface TestCase {
|
||||||
|
|
@ -109,7 +67,6 @@ export interface FullResult {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Reporter {
|
export interface Reporter {
|
||||||
onBegin?(config: FullConfig, suite: Suite): void;
|
|
||||||
onEnd?(result: FullResult): Promise<{ status?: FullResult['status'] } | undefined | void> | void;
|
onEnd?(result: FullResult): Promise<{ status?: FullResult['status'] } | undefined | void> | void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue