Yury Semikhatsky
bc2c7946bb
fix: do not throw when merging into blob report ( #26355 )
...
We cannot import a Symbol to isomorphic code from config. Instead,
__projectId property is used.
2023-08-08 14:47:12 -07:00
Yury Semikhatsky
8fcb6383ce
chore(blob): store playwright user agent ( #26337 )
2023-08-08 10:39:48 -07:00
Yury Semikhatsky
0e20d352cf
chore(merge): read test events from one file at a time ( #26333 )
...
Reference https://github.com/microsoft/playwright/issues/24451
2023-08-07 17:39:32 -07:00
Yury Semikhatsky
7f1f62795d
chore(blob): add dash to report name ( #26335 )
...
This regressed in #25017
2023-08-07 17:22:31 -07:00
Dmitry Gozman
90c765d31c
chore(blob): split onBegin
into multiple onProject
events ( #26329 )
2023-08-07 14:33:18 -07:00
Dmitry Gozman
27c15b705d
fix(blob): replace projectSuffix with reportName ( #25017 )
...
Always ensure unique project/test ids across blobs.
Show `reportName` as a label in the html report.
References #24451 .
2023-08-07 13:38:09 -07:00
Max Schmitt
1383844af8
docs: make --grep more clear ( #26324 )
...
Fixes https://github.com/microsoft/playwright/issues/24604
2023-08-07 17:40:30 +02:00
Andrey Lushnikov
fa8f3f6454
fix: use snapshotPath
instead of expectedPath
for image diffs ( #24567 )
...
This opens a road to the "accept new screenshot" button in
Playwright tools.
References https://github.com/microsoft/playwright/issues/24310
2023-08-07 04:42:35 -07:00
Marcin Strzyz
53fd4bedb4
chore: ensure the file operations are async in the junit reporter ( #24577 )
2023-08-07 10:03:01 +02:00
Yury Semikhatsky
f1f43c9ad1
chore(merger): internalize json strings after parse ( #25801 )
...
Reference: https://github.com/microsoft/playwright/issues/24451
2023-08-05 13:17:39 -07:00
Pavel Feldman
414a4c3ef0
chore: pass color through in web server commands ( #24619 )
2023-08-05 09:01:27 -07:00
Yury Semikhatsky
6c3142959d
fix(blob): store startTime as a number ( #24620 )
...
Turns out the Date objects have noticeable footprint on large suites and
storing them as umber is much cheaper, e.g.:
![image](https://github.com/microsoft/playwright/assets/9798949/539028d0-3ef8-46f7-be2b-752f24604d18 )
2023-08-04 16:06:23 -07:00
Yury Semikhatsky
d62493f925
chore: intern test ids and abs paths ( #24618 )
...
Created named classes for TeleTestStep and TeleTestResult which makes it
easier to analyze in heap snapshot. Also changing `titlePath` from a
closure to a method on TeleTestStep saved ~100Mb out of 2300Mb.
Intern test ids and absolute paths which showed up a lot of duplicate
strings in heap snapshot.
Clear stepMap after processing onTestEnd.
2023-08-04 14:10:06 -07:00
Pavel Feldman
8fde110c61
chore: allow web server w/o waiting ( #24609 )
2023-08-04 12:05:16 -07:00
Pavel Feldman
b3ce913551
Revert "chore: allow calling spawnSync on Node.js file inside test" ( #24611 )
...
Reverts microsoft/playwright#24539
2023-08-04 09:01:38 -07:00
Yury Semikhatsky
9575867f1c
fix(blob): throw if blob report has newer version than the merger ( #24593 )
2023-08-03 15:11:34 -07:00
Max Schmitt
2193903d03
chore: allow calling spawnSync on Node.js file inside test ( #24539 )
...
Fixes https://github.com/microsoft/playwright/issues/24516
Relates https://github.com/microsoft/playwright/pull/16733
2023-08-04 00:03:14 +02:00
Yury Semikhatsky
8e2f33673b
chore(blob): change file name to report{-suffix}{-shard}.zip ( #24592 )
2023-08-03 13:23:30 -07:00
Yury Semikhatsky
a867e738db
chore(merge): console status updates ( #24559 )
2023-08-02 14:49:06 -07:00
Max Schmitt
b0473b71cd
chore: limit docs snippet length to 100 ( #24563 )
2023-08-02 11:23:47 +02:00
Yury Semikhatsky
f5d069541d
chore(blob): add version to metadata ( #24556 )
2023-08-01 16:06:06 -07:00
Yury Semikhatsky
8da37b364b
chore(blob): zip output directory by default ( #24536 )
...
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).
2023-08-01 15:21:23 -07:00
Dmitry Gozman
d92fe16b76
fix(blob report): default location relative to package.json ( #24481 )
...
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 .
2023-07-28 15:49:31 -07:00
Dmitry Gozman
a74101d98f
docs: document expect's asymmetric matchers ( #24498 )
...
References #24460 , #24417 .
2023-07-28 14:04:01 -07:00
Dmitry Gozman
9c70a75d48
fix(merge): make sure testId from different blobs are unique ( #24475 )
...
Fixes a scenario where each shard runs the same setup project.
References #24451 .
2023-07-27 18:54:00 -07:00
Dmitry Gozman
ea6d127f28
feat(connect): exposeNetwork option ( #24436 )
2023-07-26 17:29:31 -07:00
Dmitry Gozman
e0cbb0882b
fix(launch): default to non-zero launch timeout ( #24440 )
...
When not specified, launch timeout is 3 minutes, taken from the
`DEFAULT_LAUNCH_TIMEOUT` constant.
Also, use the default launch timeout for `electron.launch()` instead of
default regular timeout.
2023-07-26 16:16:00 -07:00
Dmitry Gozman
c8b45aa844
chore: validate markdown links in doclint ( #24444 )
...
Fixes #24421 .
2023-07-26 16:15:07 -07:00
Dmitry Gozman
4be1e479ea
fix(artifacts): only attach screenshot when it succeeds ( #24406 )
...
Fixes #24378 .
2023-07-26 15:22:04 -07:00
Dmitry Gozman
ed99ac7395
fix(sigint): make sure we do not add handler twice ( #24413 )
...
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 .
2023-07-25 18:35:38 -07:00
Pavel Feldman
4ba6d789bc
Revert "chore: refactor timeout manager to use scopes (1) ( #24315 )" ( #24382 )
...
This reverts commit f5df0940c9
.
2023-07-24 14:09:20 -07:00
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
Andrey Lushnikov
c3bc8e0620
chore: cut 1.35.0 ( #23579 )
2023-06-07 12:41:56 -07:00
Pavel Feldman
0b30f2017c
chore: make trace server work over http ( #23561 )
2023-06-06 18:36:05 -07:00
Andrey Lushnikov
0f4090472c
feat: add maskColor
option to the toHaveScreenshot
method ( #23555 )
2023-06-06 17:15:55 -07:00
Pavel Feldman
7579572688
chore: unflake the network status test ( #23551 )
2023-06-06 16:55:53 -07:00
Pavel Feldman
1cd8f7543b
docs: fix the transpiler docs ( #23550 )
2023-06-06 16:16:06 -07:00
Pavel Feldman
6351630af2
chore: do not show the open error ( #23547 )
2023-06-06 11:09:08 -07:00
Pavel Feldman
d4349e5d6f
chore: print listening on message in terminal for web trace modes ( #23546 )
2023-06-06 09:36:49 -07:00
Pavel Feldman
699ac3a0f2
chore: allow opening ui mode over http ( #23536 )
2023-06-06 08:31:52 -07:00
Yury Semikhatsky
874f4525b4
fix(merger): total time is sum of shard total times ( #23534 )
2023-06-05 19:10:41 -07:00
Yury Semikhatsky
ceaa29cec1
chore: clear message for no reports ( #23492 )
2023-06-05 17:20:54 -07:00
Pavel Feldman
eacfff8127
chore: make trace viewer work over http ( #23531 )
2023-06-05 16:30:30 -07:00
Dmitry Gozman
6b687b6d69
fix(toHaveScreenshot): attach newly created missing expectations ( #23528 )
...
Fixes #23090 .
2023-06-05 14:57:06 -07:00
Max Schmitt
80fe9748eb
chore: render plain class links in types ( #23508 )
2023-06-05 18:50:44 +02:00
Kristo Jorgenson
d5d155df1f
fix(typescript): allow directory imports ( #23254 )
...
This updates previous work in #22887 to align more fully with
`--moduleResolution=bundler`, allowing index files to be imported with
the /index extension
---------
Signed-off-by: Kristo Jorgenson <kristojorg@users.noreply.github.com>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2023-06-05 08:58:25 -07:00
Max Schmitt
24ac25212b
chore: enable no-floating-promises on playwright-test ( #23484 )
2023-06-05 17:45:56 +02:00
Gary McDonald
718ee69cb8
docs: fix various spelling mistakes in the docs project directory. ( #23510 )
...
Signed-off-by: Gary McDonald <mcdonagj@dukes.jmu.edu>
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-06-04 18:04:42 +02:00
Max Schmitt
af893a1019
chore: inherit apiRequestContext timeout from actionTimeout ( #23481 )
...
Fixes https://github.com/microsoft/playwright/issues/23344
2023-06-02 21:36:09 +02:00
Kristo Jorgenson
a4a363f4f4
chore: upgrade @types/node to 16.x ( #23429 )
...
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-06-02 10:04:41 +02:00
Pavel Feldman
d1666d2dde
chore: include test-end-screenshot in a trace ( #23457 )
...
Fixes https://github.com/microsoft/playwright/issues/23222
2023-06-01 20:29:32 -07:00