Commit Graph

1141 Commits

Author SHA1 Message Date
Dmitry Gozman
b4c412eb1f
chore: replace process.exit with graceful closure (#24242)
Everywhere we call `process.exit()`, we might actually need to
gracefully close all browsers.
2023-07-24 08:29:29 -07:00
Marcin Strzyz
2070861807
chore: ensure the file operations are async in the json reporter. (#24356) 2023-07-23 09:26:32 +02:00
Yury Semikhatsky
6a3721eb9c
chore: delete --attachments option from merge-reports command (#24350)
We recommend uploading all resources along with the generated report. If
need be we'll reconsider adding the option later.
2023-07-21 13:15:00 -07:00
Pavel Feldman
f5df0940c9
chore: refactor timeout manager to use scopes (1) (#24315) 2023-07-20 17:21:21 -07:00
Dmitry Gozman
767addec8c
chore: make sure to call task's teardown if it has ever started (#24317)
This way things like WebServerPlugin can cleanup after themselves even
if they failed to start or were interrupted mid-way.
2023-07-20 17:16:22 -07:00
Max Schmitt
1288519915
fix(ui-mode): run teardown handlers with Command + C (#24267)
Fixes https://github.com/microsoft/playwright/issues/23907
2023-07-19 17:50:25 +02:00
Pavel Feldman
879ddb73b0
chore: show last poller error on test timeout (#24292) 2023-07-18 17:03:26 -07:00
Marcin Strzyz
d5e7b4f16f
chore: update rimraf package to version 4 to eliminate "promisify" (#24190)
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`
2023-07-18 19:58:07 +02:00
Max Schmitt
d2f581a19c
fix(test-runner): don't double emit SIGINT in long running test (#24265)
https://github.com/microsoft/playwright/issues/23907

This fixes the following scenario. You press Command + C during the
test-execution, then a global teardown will execute, which takes a long
time and before this on macOS did sometimes end up in an unwanted SIGINT
received inside the globalTeardown handler. After this change this won't
happen anymore.
2023-07-18 18:46:18 +02:00
Yury Semikhatsky
d0280ec8c7
chore(blob): drop shard number from report name (#24270)
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.
2023-07-18 09:29:25 -07:00
Pavel Feldman
5ff1fadd7b
chore: apply only filtration to deps (#24268) 2023-07-17 16:48:52 -07:00
Yury Semikhatsky
f6540f89ea
chore(markdown): do not print details for flaky tests (#24264) 2023-07-17 16:09:59 -07:00
Yury Semikhatsky
15b9e5afdb
fix: print fatal and no snippet errors in markdown report (#24263) 2023-07-17 13:50:00 -07:00
Pavel Feldman
49c1f9eb02
feat(ui): run deps in UI mode if dep projects are checked (#24245) 2023-07-15 15:11:31 -07:00
Yury Semikhatsky
3616023cf6
chore: markdown report details (#24237) 2023-07-14 12:32:25 -07:00
Pavel Feldman
5d799606c3
chore: resolve top-level vs dependency after cli filtering (#24216) 2023-07-13 17:54:08 -07:00
Max Schmitt
57cca1d96e
Revert "fix: do not collide with other tests when test names have special chars (#23414)" (#24213)
This reverts commit 4b1b4dc23b.

https://github.com/microsoft/playwright/issues/24184

Reopens https://github.com/microsoft/playwright/issues/23386
2023-07-13 20:03:02 +02:00
Dmitry Gozman
53feeaf270
fix(tracing): avoid trace file name collisions (#24191)
We have been optionally adding `-<number>` in multiple places, and these
might collide in various circumstances, for example: two contexts at the
same time, one of them has the second trace chunk.

References #23387.
2023-07-12 17:20:25 -07:00
Pavel Feldman
53bf1995db
chore: do not leak internal page handles after closing page (#24169)
Partial fix for https://github.com/microsoft/playwright/issues/6319

After this fix, the following scenario won't leak and the context state
(cookies, storage, etc) can be reused by the new page sessions:

```js
  for (let i = 0; i < 1000; ++i) {
    const page = await context.newPage();
    await page.goto('...');
    await page.close('...');
  }
```
2023-07-12 14:51:13 -07:00
Max Schmitt
a0b0752662
fix: encode launch options correctly when reusing browser (#24174)
Fixes https://github.com/microsoft/playwright/issues/24157
2023-07-12 16:40:55 +02:00
Dmitry Gozman
76d85c55cf
chore: remove unused code (#24167) 2023-07-11 15:08:05 -07:00
Pavel Feldman
63915dc07a
feat(trace): render Node console messages in trace (#24139) 2023-07-10 18:36:28 -07:00
dependabot[bot]
36588ba98e
chore(deps): bump semver and @babel/core in /packages/playwright-test/bundles/babel (#24082)
Fixes https://github.com/microsoft/playwright/issues/23903

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-07-10 23:40:28 +02:00
Max Schmitt
1c2313d641
chore: upgrade esbuild to 0.18.11 (#24123) 2023-07-10 22:35:05 +02:00
Andrey Lushnikov
94d6b1210b
fix: do not create empty directories for successful snapshot tests (#24127)
Fixes https://github.com/microsoft/playwright/issues/15600
2023-07-10 09:45:24 -07:00
Andrey Lushnikov
a9560253f8
chore: cut 1.36.0 (#24104) 2023-07-07 13:01:17 -07:00
Andrey Lushnikov
9af2b518f2
fix: exclude tracesDir option from launchOptions fixture (#24086)
Fixes https://github.com/microsoft/playwright/issues/23645
2023-07-06 13:31:44 -07:00
Pavel Feldman
608e336dba
fix(error): create a step for raw runtime error (#24057)
Fix https://github.com/microsoft/playwright/issues/23850
2023-07-06 10:48:12 -07:00
Pavel Feldman
566b277ce8
fix(steps): only propagate soft errors up the hierarchy (#24054)
Fixes https://github.com/microsoft/playwright/issues/23979
2023-07-05 15:30:53 -07:00
Pavel Feldman
df57fb594c
fix(trace): render items under expect.toPass (#24016)
Fixes: https://github.com/microsoft/playwright/issues/23942
2023-07-05 11:20:28 -07:00
Dmitry Gozman
7e310f79af
chore: migrate builtin reporters to ReporterV2 (#23985)
This allows builtin reporters to handle stdio between onConfigure and
onBegin.

Fixes #23539.
2023-06-30 16:21:31 -07:00
Dmitry Gozman
86c1abd934
chore: introduce ReporterV2 interface (#23983) 2023-06-30 13:36:50 -07:00
Dmitry Gozman
e28312ba63
chore: call onEnd(result) on InternalReporter (#23972)
Drive-by: fix watch mode not running global teardown.
2023-06-29 17:03:10 -07:00
Max Schmitt
fef029e98e
docs: code snippet alignments (#23959) 2023-06-29 18:26:19 +02:00
Max Schmitt
9980f054bc
docs: align Node.js code snippets with ESLint (#23916) 2023-06-27 11:53:53 +02:00
Max Schmitt
4b1b4dc23b
fix: do not collide with other tests when test names have special chars (#23414)
Fixes https://github.com/microsoft/playwright/issues/23386
2023-06-27 10:34:31 +02:00
Max Schmitt
dcdf38f119
chore: keep UI Mode running when used with browser mode (#23876)
This will keep UI Mode running in browser mode. When launched in normal
persistent context mode, we know when the persistent context closes, so
we can run the project teardown code.

Fixes https://github.com/microsoft/playwright/issues/23801
2023-06-26 22:21:44 +02:00
Dmitry Gozman
b154ff1190
fix(html reporter): do not print epilogue in list mode (#23822)
References #23817.
2023-06-21 17:53:52 -07:00
awatson-scottlogic
3777fc8b0f
docs(class-testoptions): fix launchOptions snippet (#23831) 2023-06-21 14:03:26 +02:00
Yury Semikhatsky
6a6ff9cf6a
feat: markdown report (#23819)
Simple markdown report generator. Can be used when posting updates to
GitHub PRs:

<img width="632" alt="image"
src="https://github.com/microsoft/playwright/assets/9798949/ea7e4bfa-477a-4cad-9cc3-00b1f8a314b1">
2023-06-20 12:11:32 -07:00
Dmitry Gozman
fbb5d48283
feat(expect): roll to v29.5.0 (#23629)
There is a breaking in change in the `MatcherContext` that is passed to
matcher functions, so we now have `!!this.isNot` in a few places. The
same could happen to custom matcher in the wild.

```ts
// Old
{
  isNot: boolean;
  promise: string;
}
```

```ts
// New
{
  isNot?: boolean;
  promise?: string;
}
```

Fixes #23612.
2023-06-19 15:18:59 -07:00
Dmitry Gozman
2c8dd67b0e
fix(test runner): improve error message for non-stable test titles (#23792)
Fixes #23779.
2023-06-19 14:13:11 -07:00
Yury Semikhatsky
f6d86c20f3
chore: run more reporter tests through blob report, some fixes (#23765) 2023-06-16 21:30:55 -07:00
Yury Semikhatsky
77d322028c
feat(blob): zip .jsonl report files (#23720)
For linux tests without tracing blob-report-1.zip takes 19M, while
unpacked size is 228 MB. That size is counted for GitHub artifact
billing:

<img width="434" alt="image"
src="https://github.com/microsoft/playwright/assets/9798949/5bc32511-6686-4581-a348-acb6a54cd99b">

We zip individual .jsonl reports so that they still have unique names
and can be easily uploaded into the same artifacts directory without
name collisions.
2023-06-14 17:10:39 -07:00
Andrey Lushnikov
3c0fab489b
chore: miscellaneous trace viewer fixes (#23695)
- properly annotate continued requests
- nest `attach` steps inside the related `expect` step
- fix primary-id-to-non-primary-id mapping
- make sure images in trace are not draggable

Fixes #23693

---------

Signed-off-by: Andrey Lushnikov <aslushnikov@gmail.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-06-14 09:37:19 -07:00
Andrey Lushnikov
2bc8cf2fc7
fix: drop expect.configure({ poll }) from types (#23661)
`poll` option is not actually supported as of June 12, 2023.

Fixes https://github.com/microsoft/playwright/issues/23622
2023-06-12 11:07:39 -07:00
Yury Semikhatsky
abdfe264fa
chore: run html reporter tests with merged report (#23626) 2023-06-09 15:41:15 -07:00
Yury Semikhatsky
400c7cd529
fix: serialize attachment to base64 in tele reporter (#23590) 2023-06-09 11:52:18 -07:00
Yury Michurin
7513993c7a
docs: fix a comment typo (#23592)
Hi,
Just a small meaningless comment typo 🙃 

Have a great day!

Signed-off-by: Yury Michurin <yury.michurin@gmail.com>
2023-06-08 21:35:04 -07:00
Yury Semikhatsky
ded4a294f4
fix(merge): populate TestResult.stdout/stderr when merging (#23587) 2023-06-07 23:00:57 -07:00