Moved note to TestProject

This commit is contained in:
Adam Gastineau 2025-01-31 11:23:20 -08:00
parent fc2c320894
commit 107754555c
3 changed files with 8 additions and 4 deletions

View file

@ -183,6 +183,10 @@ Metadata that will be put directly to the test report serialized as JSON.
Project name is visible in the report and during test execution. Project name is visible in the report and during test execution.
:::warning
Playwright executes the configuration file multiple times. Do not dynamically produce non-stable values in your configuration.
:::
## property: TestProject.snapshotDir ## property: TestProject.snapshotDir
* since: v1.10 * since: v1.10
- type: ?<[string]> - type: ?<[string]>

View file

@ -68,10 +68,6 @@ export default defineConfig({
| [`property: TestConfig.webServer`] | To launch a server during the tests, use the `webServer` option | | [`property: TestConfig.webServer`] | To launch a server during the tests, use the `webServer` option |
| [`property: TestConfig.workers`] | The maximum number of concurrent worker processes to use for parallelizing tests. Can also be set as percentage of logical CPU cores, e.g. `'50%'.`. See [Parallelism](./test-parallel) and [Sharding](./test-sharding) for more details. | | [`property: TestConfig.workers`] | The maximum number of concurrent worker processes to use for parallelizing tests. Can also be set as percentage of logical CPU cores, e.g. `'50%'.`. See [Parallelism](./test-parallel) and [Sharding](./test-sharding) for more details. |
:::warning
Playwright executes the configuration file multiple times. Do not dynamically produce non-stable values in your configuration (for example, using the current datetime in [`property: TestProject.name`]).
:::
## Filtering Tests ## Filtering Tests
Filter tests by glob patterns or regular expressions. Filter tests by glob patterns or regular expressions.

View file

@ -349,6 +349,10 @@ interface TestProject<TestArgs = {}, WorkerArgs = {}> {
/** /**
* Project name is visible in the report and during test execution. * Project name is visible in the report and during test execution.
*
* **NOTE** Playwright executes the configuration file multiple times. Do not dynamically produce non-stable values in
* your configuration.
*
*/ */
name?: string; name?: string;