Commit Graph

1401 Commits

Author SHA1 Message Date
Sergio Freire
71c08a5dcf
fix(junit reporter): embedding attachments on report didnt work for tests outside root folder (#15359) 2022-07-05 10:35:14 -07:00
Dmitry Gozman
2a805c1f1c
fix(line reporter): print currently running test (#15339) 2022-07-05 09:07:55 -07:00
Dmitry Gozman
4eccb89a79
chore: do not serialize buffers into base64 in local mode (#15316) 2022-07-05 08:58:34 -07:00
Sean Doyle
ef5a56ce18
feat(evaluate): serialized URL instances (#15023)
Add support for returning [URL][] instances from `page.evaluate` calls.
Follow the patterns established by `Date` and `RegExp` serialization.

[URL]: https://developer.mozilla.org/en-US/docs/Web/API/URL
2022-07-05 17:53:02 +02:00
Max Schmitt
35a2792bb4
fix(html-report): listen on 127.0.0.1 only (#15361)
Fixes #11568
2022-07-05 08:48:30 -07:00
Maël Nison
7609785d53
fix: Detects React 17+ first (#15343) 2022-07-05 07:49:31 -07:00
Pavel Feldman
9e62cc4da9
fix(test): speculative attempt to fix trace viewer test flakiness (3) (#15342) 2022-07-03 11:55:18 -07:00
Pavel Feldman
c3c724f17d fix(test): speculative attempt to fix trace viewer test flakiness (2) 2022-07-03 09:43:28 -07:00
Pavel Feldman
ba93da0686
fix(test): speculative attempt to fix trace viewer test flakiness (#15330) 2022-07-03 08:30:04 -07:00
Dmitry Gozman
71dcad3b2e
test: fix some flaky failures (#15314)
- Never use open shadow root for highlight. This messes up
  our selectors that accidentally match internal preview elements.
- Remove failing electron test that we do not care about.
- Skip `channels.spec.ts` in non-default mode.
2022-07-01 13:57:33 -07:00
Ross Wollman
6cb3236acd
feat(chromium): Service Worker Network Instrumentation and Inspection (#14716)
Adds Chromium support for Service Worker Networking (interception/routing, Request/Response events, and HAR).

Resolves #1090.
Depends on #14714 and #14714.
Supercedes #14321.
Follow up #14711.

Landed upstream patches:
- https://chromium-review.googlesource.com/c/chromium/src/+/3510917
- https://chromium-review.googlesource.com/c/chromium/src/+/3526571
- https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3566669
- https://chromium-review.googlesource.com/c/chromium/src/+/3544685
- https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3610924
- https://chromium-review.googlesource.com/c/chromium/src/+/3689949
2022-07-01 12:49:43 -07:00
Pavel Feldman
295ea7a3cb
fix(config): fall back to context options (#15309) 2022-07-01 10:20:13 -07:00
Dmitry Gozman
82032be368
chore(server): validate/convert protocol both ways (#14811)
Previously, we only validated/converted on the way to the server,
but not from the server.

Validating both ways catches issues earlier, and allows us to
perform automatic conversions, for example only converting
buffers to base64 when sending over wire.
2022-07-01 09:58:07 -07:00
Pavel Feldman
c4d2342339
fix(config): fall back to launch options (#15293) 2022-07-01 08:12:57 -07:00
Playwright Service
3e86c7af95
feat(chromium): roll to r1013 (#15303)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-01 15:18:58 +02:00
Playwright Service
64e6688e84
feat(firefox-beta): roll to r1333 (#15292)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-01 05:24:30 -07:00
Playwright Service
2e96db4655
feat(firefox): roll to r1332 (#15291)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-01 05:24:10 -07:00
Dmitry Gozman
5083da9d98
test: unflake "should truncate long test names" (#15286) 2022-06-30 20:24:00 -07:00
Pavel Feldman
6425ab9e78
fix(ff): allow more time to launch browser (#15290) 2022-06-30 18:07:25 -07:00
Dmitry Gozman
b86926e691
fix(test runner): update timeout error messages (#15117)
Some of the current timeout error messages are confusing, because they do not suggest that the issue is most likely a slow test. This PR updates timeout messages as follows:
- Test timeout of 30000ms exceeded.
- Test timeout of 30000ms exceeded while setting up "browser".
- Test timeout of 30000ms exceeded while tearing down "context".
- Test timeout of 30000ms exceeded while setting up "playwright configuration".
- Test timeout of 30000ms exceeded while running "beforeEach" hook.
- Test timeout of 30000ms exceeded while running "afterEach" hook.
- "beforeAll" hook timeout of 30000ms exceeded.
- "afterAll" hook timeout of 30000ms exceeded.
- Worker teardown timeout of 30000ms exceeded.
- "skip" modifier timeout of 30000ms exceeded.
- Fixture "myCustomFixture" timeout of 5000ms exceeded.
2022-06-30 17:05:08 -07:00
Max Schmitt
3d1d723c56
fix(esm): show codeframe when errors get reported (#15262) 2022-06-30 21:17:08 +02:00
Yury Semikhatsky
4de14e7d2c
feat(webkit): roll to r1673 (#15276) 2022-06-30 12:07:33 -07:00
Dmitry Gozman
0254cd3be7
fix(firefox): launch races (#15259)
Potential fixes to avoid startup races:
- Wait for "juggler listening" message.
- Make sure `transport.onclose` is called when connecting to the transport after the actual pipe closure.
2022-06-30 10:58:22 -07:00
Max Schmitt
71fc53bbf8
fix(matchers): toHaveClass on SVG elements (#15267)
Fixes #15260
2022-06-30 07:01:26 -07:00
Ross Wollman
9cafab382b
docs: clarify use of browser.close (#15255) 2022-06-29 18:41:21 -07:00
Dmitry Gozman
ff2647cfa3
fix(network): remove races from sizes calculation (#15208)
- Do not resolve raw headers upon `loadingFinished`, since they may still come later in
  `responseReceivedExtraInfo`.
- Introduce separate promises for `encodedBodySize`, `transferSize` and `responseHeadersSize`.
- Make sure we resolve each of them either with data available
  from the browser, or a fallback calculation.
- Set raw response headers for redirects on WebKit.
- Do not stall on cached responses in Chromium, they have erroneously set `hasExtraInfo` flag.
- Use `transferSize` that is available in Firefox protocol.
2022-06-29 18:11:22 -07:00
Pavel Feldman
28f382bea6
chore: roll source-map-support to 0.5.21 (#15237)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-06-29 19:47:45 +02:00
Max Schmitt
b3c31f5b13
fix: do not throw on removeListener without listener (#15224)
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-06-29 13:53:13 +02:00
Playwright Service
b554344907
feat(chromium-tip-of-tree): roll to r1019 (#15172)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-29 13:29:28 +02:00
Dmitry Gozman
8220ab1379
feat(firefox): roll ff 1328 and ff-beta 1330 (#15185) 2022-06-29 03:04:46 -07:00
Max Schmitt
e34fa4feeb
fix(evaluate): fallback to toJSON if it exists when serializing (#15188)
* fix(evaluate): fallback to toJSON if it exists when serializing

* fix test in ff

* window.performance test
2022-06-29 08:07:32 +02:00
Pavel Feldman
6a8d835145
chore: allow updating har while routing (#15197) 2022-06-28 15:09:36 -07:00
Sébastien Règne
f43fe4855d
docs: fix route.fallback typo (#15173) 2022-06-28 13:46:54 -07:00
Max Schmitt
aa1e736f3f
chore: print response body when browser download failed (#15101) 2022-06-28 18:19:31 +02:00
Dmitry Gozman
79163e802a
fix(test runner): screenshot immediately after failure (#15159)
Previously, screenshot was taken after hooks and fixtures teardown.
However, hooks can easily modify the state of the page, and
screenshot would not reflect the moment of failure.

Instead, we take screenshots immediately after the test function
finishes with an error.
2022-06-27 17:46:39 -07:00
Dmitry Gozman
d7b63fa0b4
fix(test runner): ignore undefined values in fixtures definitions (#15119)
These mean "I don't want to specify this fixture/option"
instead of "I want the value of undefined", aligned with how TypeScript works.
We already do similar things in the config.
2022-06-27 11:31:41 -07:00
Dmitry Gozman
a93db3cf11
fix(reporter): line reporter should not swallow half-line stdout (#15114) 2022-06-27 11:25:42 -07:00
Pavel Feldman
8c590cb2af
chore: undeprecate sync headers() (#15152) 2022-06-27 10:34:32 -07:00
Playwright Service
fab12c70f7
feat(chromium): roll to r1012 (#15111)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-06-27 10:01:10 +02:00
Dmitry Gozman
660516d22a
fix(network): make allHeaders wait until all headers are available (#15094)
fix(network): make allHeaders wait until all header are available

Before, calling `allHeaders()` from `page.on('request')` would yield
provisional headers instead.

With these changes:
- In Firefox, all headers are available immediately.
- In Chromium, all headers are available upon requestWillBeSentExtraInfo.
- In WebKit, all headers are available upon responseReceived.
- In all browsers, intercepted requests use "provisional" headers
  as all headers, since there is no network stack to change the headers.

Drive-by: migrated Chromium to `hasExtraInfo` flags that simplifies
the logic quite a bit.
2022-06-24 13:51:09 -07:00
Dmitry Gozman
2f11807552
fix(click): no element should intercept events over the target frame (#15043)
When target element is inside a non-main frame, there could be an
overlay in some of the parent frames that intercepts pointer events.
However, we never detected this case.
2022-06-24 13:17:25 -07:00
Pavel Feldman
ae6f48c4b8
fix(route): match against updated url while chaining (#15112) 2022-06-24 10:48:16 -07:00
Stuart Lang
eba2bdffb9
docs: fix typo: surved -> served (#15105) 2022-06-24 15:06:57 +02:00
Dmitry Gozman
a46aaee6e8
fix(reporters): truncate long test titles from the start (#15052)
Most useful information is at the end - test name, current step, retry.
We truncate the repetitive project + suites at the start.
2022-06-22 17:03:54 -07:00
Pavel Feldman
7bd72716f9
feat(har): introduce the slim mode (#15053) 2022-06-22 14:44:12 -07:00
Dmitry Gozman
033c250f6d
fix(har): remove types/har.d.ts, update har.ts per spec (#15046)
Drive-by: typo fix in `notFound` option name.
2022-06-22 12:16:29 -07:00
Playwright Service
01abff2090
feat(chromium-tip-of-tree): roll to r1017 (#15008)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 19:38:38 +02:00
Max Schmitt
fb441faab1
fix: request/response events with backgroundPages (#15032) 2022-06-22 17:23:51 +02:00
Pavel Feldman
9525bedc1f
feat(har): re-add routeFromHAR (#15024) 2022-06-21 22:12:37 -07:00
Dmitry Gozman
c02e165eb6
fix(test runner): toHaveScreenshot should not overwrite matching expectations (#15028)
Even in the `--update-snapshots` mode we should keep existing files if
they are matching under the threshold, to avoid needless churn.
2022-06-21 18:01:25 -07:00