* FullConfig split into FullConfig and ConfigInWorker
* FullProject split into FullProject and ProjectInWorker
* Tests can only access {Config, Project}InWorker, while reporters can
only access Full{Config,Project}. This will allow in the future to
change the reporter API independently from the tests.
* Added documentation for the 4 classes.
Fixes#30040
# Context
In the `playwright.config` file, we can custom the default `timeout`
property for `expect.toPass` by the property:
```ts title='playwright.config.ts'
export default defineConfig({
// ...
expect: {
toPass: {
timeout: 60_000,
},
},
});
```
However, we can't customize the `intervals` option. So the default value
is always `[100, 250, 500, 1000]`.
# Goal
Add the possibility to customize the intervals option from the
`playwright.config` file.
```ts title='playwright.config.ts'
export default defineConfig({
// ...
expect: {
toPass: {
timeout: 60_000,
intervals: [1000, 2000, 3000]
},
},
});
```
* Add `Suite.entries` that returns tests and suites in their declaration
order
* Exposed `Suite.type` and `TestCase.type` for discriminating between
different entry types.
* Blob report format is updated to store entries instead of separate
lists for suites and tests.
* Bumped blob format version to 2, added modernizer.
Fixes https://github.com/microsoft/playwright/issues/29984
This brings up the question that we would show the tag name twice if its
a tag in a title. This would be aligned to how HTML report is doing it.
Fixes https://github.com/microsoft/playwright/issues/29927
---------
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
With the recent change that gave after hooks a separate timeout, fixture
teardown does not imply that "test finished successfully, but fixture
teardown was slow".
This was historically done to make `console.log()` have colors. However,
this makes any other code that checks `process.stdout.isTTY` incorrectly
assume real TTY support.
Node18 and Node20 now respect `FORCE_COLOR=1` in console, so our default
behavior of forcing colors in the worker process just works out of the
box. See https://github.com/nodejs/node/pull/48034.
Previously, there was at most one "hard error", as opposite to multiple
"soft errors". This was done to preserve the historic behavior at the
time of introducing multiple `TestInfo.errors`.
With this change, every user callback that is executed `withRunnable()`
can throw an error and/or timeout, and both of these will end up in
`TestInfo.errors`.
Additionally, there is at most one "unhandled exception" error, to avoid
flooding the report with mass failures.
Drive-by: remove boolean arguments from `_failWithError()`.
Fixes#29876.
When collecting dependencies both from CJS loader and from ESM loader,
the latter would overwrite the dependencies set instead of appending.
Also make sure cts/cjs/mts/mjs are all supported equally.
References #29747.
Test-specific output dir and snapshot names are trimmed to 60 chars
instead of just 100. The snapshot names are still trimmed at 100 chars
for backwards compatibility.
Reference https://github.com/microsoft/playwright/issues/29719
This fixes a case where we incorrectly used the final config's base path
when resolving relative path mappings in the absence of the baseUrl.
Fixes#29816.