From 2ce354635f87ae184797fe0954fb34ff66b18209 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Thu, 4 Apr 2024 16:26:17 -0700 Subject: [PATCH] fix --- .../src/test-reporter-api/class-fullconfig.md | 4 +++ .../test-reporter-api/class-fullproject.md | 24 +++++++++++++++++ packages/playwright/types/testReporter.d.ts | 26 +++++++++++++++++++ 3 files changed, 54 insertions(+) diff --git a/docs/src/test-reporter-api/class-fullconfig.md b/docs/src/test-reporter-api/class-fullconfig.md index ce4318560f..63eec0cd9a 100644 --- a/docs/src/test-reporter-api/class-fullconfig.md +++ b/docs/src/test-reporter-api/class-fullconfig.md @@ -6,6 +6,7 @@ Resolved configuration passed to [`method: Reporter.onBegin`]. ## property: FullConfig.configFile * since: v1.20 +* deprecated: Use [`property: FullProject.configFile`] instead. - type: ?<[string]> Path to the configuration file (if any) used to run the tests. @@ -36,6 +37,7 @@ See [`property: TestConfig.globalTeardown`]. ## property: FullConfig.globalTimeout * since: v1.10 +* deprecated: Use [`property: FullProject.globalTimeout`] instead. - type: <[int]> See [`property: TestConfig.globalTimeout`]. @@ -54,6 +56,7 @@ See [`property: TestConfig.grepInvert`]. ## property: FullConfig.maxFailures * since: v1.10 +* deprecated: Use [`property: FullProject.maxFailures`] instead. - type: <[int]> See [`property: TestConfig.maxFailures`]. @@ -130,6 +133,7 @@ See [`property: TestConfig.webServer`]. ## property: FullConfig.workers * since: v1.10 +* deprecated: Use [`property: FullProject.workers`] instead. - type: <[int]> See [`property: TestConfig.workers`]. diff --git a/docs/src/test-reporter-api/class-fullproject.md b/docs/src/test-reporter-api/class-fullproject.md index 9a744115df..21582f6fd3 100644 --- a/docs/src/test-reporter-api/class-fullproject.md +++ b/docs/src/test-reporter-api/class-fullproject.md @@ -7,12 +7,24 @@ to [Reporter]. It exposes some of the resolved fields declared in [TestProject]. You can get [FullProject] instance from [`property: FullConfig.projects`] or [`method: Suite.project`]. +## property: FullProject.configFile +* since: v1.44 +- type: ?<[string]> + +Path to the configuration file (if any) used to run the tests. + ## property: FullProject.dependencies * since: v1.31 - type: <[Array]<[string]>> See [`property: TestProject.dependencies`]. +## property: FullProject.globalTimeout +* since: v1.44 +- type: <[int]> + +See [`property: TestConfig.globalTimeout`]. + ## property: FullProject.grep * since: v1.10 - type: <[RegExp]|[Array]<[RegExp]>> @@ -43,6 +55,12 @@ See [`property: TestProject.name`]. See [`property: TestProject.snapshotDir`]. +## property: FullProject.maxFailures +* since: v1.44 +- type: <[int]> + +See [`property: TestConfig.maxFailures`]. + ## property: FullProject.outputDir * since: v1.10 - type: <[string]> @@ -96,3 +114,9 @@ See [`property: TestProject.timeout`]. - type: <[Fixtures]> See [`property: TestProject.use`]. + +## property: FullProject.workers +* since: v1.44 +- type: <[int]> + +Number of test workers that ran tests from this project. See [`property: TestConfig.workers`]. diff --git a/packages/playwright/types/testReporter.d.ts b/packages/playwright/types/testReporter.d.ts index 250deef694..bdbbb916a2 100644 --- a/packages/playwright/types/testReporter.d.ts +++ b/packages/playwright/types/testReporter.d.ts @@ -39,6 +39,7 @@ export interface FullConfig { webServer: ConfigInWorker['webServer']; /** * Path to the configuration file (if any) used to run the tests. + * @deprecated Use [fullProject.configFile](https://playwright.dev/docs/api/class-fullproject#full-project-config-file) instead. */ configFile?: string; @@ -64,6 +65,8 @@ export interface FullConfig { /** * See [testConfig.globalTimeout](https://playwright.dev/docs/api/class-testconfig#test-config-global-timeout). + * @deprecated Use [fullProject.globalTimeout](https://playwright.dev/docs/api/class-fullproject#full-project-global-timeout) + * instead. */ globalTimeout: number; @@ -79,6 +82,7 @@ export interface FullConfig { /** * See [testConfig.maxFailures](https://playwright.dev/docs/api/class-testconfig#test-config-max-failures). + * @deprecated Use [fullProject.maxFailures](https://playwright.dev/docs/api/class-fullproject#full-project-max-failures) instead. */ maxFailures: number; @@ -141,6 +145,7 @@ export interface FullConfig { /** * See [testConfig.workers](https://playwright.dev/docs/api/class-testconfig#test-config-workers). + * @deprecated Use [fullProject.workers](https://playwright.dev/docs/api/class-fullproject#full-project-workers) instead. */ workers: number; } @@ -156,11 +161,21 @@ export interface FullProject { * See [testProject.use](https://playwright.dev/docs/api/class-testproject#test-project-use). */ use: UseOptions; + /** + * Path to the configuration file (if any) used to run the tests. + */ + configFile?: string; + /** * See [testProject.dependencies](https://playwright.dev/docs/api/class-testproject#test-project-dependencies). */ dependencies: Array; + /** + * See [testConfig.globalTimeout](https://playwright.dev/docs/api/class-testconfig#test-config-global-timeout). + */ + globalTimeout: number; + /** * See [testProject.grep](https://playwright.dev/docs/api/class-testproject#test-project-grep). */ @@ -171,6 +186,11 @@ export interface FullProject { */ grepInvert: null|RegExp|Array; + /** + * See [testConfig.maxFailures](https://playwright.dev/docs/api/class-testconfig#test-config-max-failures). + */ + maxFailures: number; + /** * See [testProject.metadata](https://playwright.dev/docs/api/class-testproject#test-project-metadata). */ @@ -225,6 +245,12 @@ export interface FullProject { * See [testProject.timeout](https://playwright.dev/docs/api/class-testproject#test-project-timeout). */ timeout: number; + + /** + * Number of test workers that ran tests from this project. See + * [testConfig.workers](https://playwright.dev/docs/api/class-testconfig#test-config-workers). + */ + workers: number; } /**