Changed the logic to add attachment to the zip in onEnd rather than
onTestEnd because attachment files can be deleted if e.g. preserveOutput
option is specified. Instead we add files once all workers have been
shut down. On a simple run with 1000 tests each adding 1Mb attachment
the overall time difference is 49s (streaming attachments) v 1m9s
(attachments added in the end).
Also:
- remove `blob-report` directory at the start;
- markdown's `report.md` next to package.json;
- use default location in playwright's workflows.
References #24451.
Before all the browser downloads were stored in the workspace folder for
the corresponding test. After this change, we clean it up once the test
has finished to save disk space.
~800 MB per test before, now 30MB.
In the following scenario, we were adding SIGINT handler twice, but
removing it just once:
- Task runner starts testing, creates SigIntWatcher, installs SIGINT
handler.
- Press Ctrl+C, task runner interrupts, disarms SigIntWatcher, SIGINT
handler is not removed due to 1000ms cooldown.
- Task runner starts cleanup, creates SigIntWatcher, installs another
SIGINT handler.
- Cleanup finishes, SigIntWatcher disarms, could remove or not remove
SIGINT handler based on timing (same 1000ms cooldown). In any case, we
have one or two SIGINT handlers still on.
- HTML reporter hangs in onExit, while we still have SIGINT handler up,
so Ctrl+C does not exit.
Regressed in #24265.
A separate process is `spawnSync`'ed on process exit to cleanup
temporary directories, introduced in #13769 that followed up after
#13343.
A separate process might stall for various fs-related issues, which
prevents the original process from exiting.
With the recent changes, we always gracefully close and cleanup after
all launched executables before calling `process.exit()`, and so it
should only be possible to leave temp directories when using Playwright
and calling `process.exit()` programmatically without closing browsers.
We can now drop the extra process and rely on `rimraf.sync` for
last-resort cleanup in these rare circumstances.
This patch brings in antialiasing tests from `looks-same` project for
our experimental `ssim-cie94` comparator.
One of the new tests found a bug in our implementation.
References https://github.com/microsoft/playwright/issues/24312
Since
99ff08340f
search event is disabled in cocoa.
---------
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
Migrate to version 4 which returns a promise rather than leverages a
callback. -> https://www.npmjs.com/package/rimraf?activeTab=readme
- contains its own types, eliminate "@types/rimraf"
- Parameter `maxBusyTries` changed to `maxRetries`
We store shard number in the report metadata event and then sort shard
files by shard number. This guarantees that within each project sharded
events will always go in stable order.
Usually, we can just chain two locators with `>>` to implement
`Locator.locator(locator)`. However, this does not play nicely with more
advanced inner locators like `or` and `and`:
```ts
const child = page.locator('input').or(page.locator('button'));
page.locator('parent').locator(child);
```
One would expect the above to locate "input or button" inside a
"parent". However, currently it locates "input inside a parent" or
"button", because it's translated to `parent >> input >>
internal:or="button"`.
To fix this, we have to wrap inner locator into `internal:chain` and
query it separately from the parent.
Fixes#23724.