330 Commits

Author SHA1 Message Date
jinohkang-theori
27060a0f65
fix(connect): disable context takeover in websocket transport (#33811) 2024-12-09 18:07:00 -08:00
Pavel Feldman
35dd3dd104
chore: use diff for snapshot delta (#33739) 2024-11-23 11:39:04 -08:00
Pavel Feldman
66d9f3acbe
chore: introduce update-snapshots=changed (#33735) 2024-11-22 17:41:31 -08:00
Max Schmitt
77d82b8b07
chore: remove dead code in urlMatches (#33714) 2024-11-21 15:53:28 +01:00
Pavel Feldman
d127255881
chore: add AriaSnapshot internal type (#33631) 2024-11-15 13:48:43 -08:00
Dmitry Gozman
099dd80806
fix(recorder): align apiName with the real one (#33567) 2024-11-13 03:06:34 -08:00
Pavel Feldman
d685763c49
chore: use diff instead of diffmatchpatch (#33550) 2024-11-12 14:46:29 -08:00
Pavel Feldman
503f74da90
chore: allow editing aria template in recorder (tests) (#33522) 2024-11-08 17:18:51 -08:00
Dmitry Gozman
c29f573243
fix(aria snapshot): assorted fixes (#33512) 2024-11-08 10:25:05 -08:00
Pavel Feldman
b021b58379
chore: allow editing aria template in recorder (#33482) 2024-11-08 07:43:01 -08:00
Yury Semikhatsky
50775698ae
fix: parent step for API calls inside waitForEvent callback (#33409) 2024-11-06 17:35:16 -08:00
Dmitry Gozman
697d7a40b1
fix(routeWebSocket): make it work with http(s) baseURL (#33457) 2024-11-05 11:46:05 -08:00
Yury Semikhatsky
36a975c30b
chore: override host platform with env variable (#33434) 2024-11-04 14:14:24 -08:00
Pavel Feldman
c76f004ec3
chore: move compress call log to server (#33399) 2024-11-01 13:38:01 -07:00
Pavel Feldman
135ed28740
chore: more yaml escaping tests (#33387) 2024-10-31 17:14:11 -07:00
Max Schmitt
1342e7f6b6
Revert "chore: add Devuan OS fallback to Debian (#32990)" (#33365) 2024-10-30 21:28:16 +01:00
Pavel Feldman
9ce401d44a
chore: suggest aria snapshots w/ regex (#33334) 2024-10-29 16:19:08 -07:00
Yury Semikhatsky
c66af9c525
chore: make expect timeout field required in the protocol (#33309) 2024-10-25 15:26:41 -07:00
Simon Knott
69f56b9f63
fix(locator generator): handle frameLocator() and locator().contentFrame() (#33208) 2024-10-24 10:52:54 +02:00
Pavel Feldman
24cafbc8cb
chore: use diff_match_patch with types (#33254) 2024-10-23 16:04:37 -07:00
Max Schmitt
b275c19612
chore: update eslintignore to lint files in utils/ folders (#33218) 2024-10-22 11:52:20 +02:00
Pavel Feldman
2a3d67195d
chore: use aria snapshots in some ui mode tests (#33212) 2024-10-21 21:54:06 -07:00
Pavel Feldman
4b1fbde2ad
chore: generate match snapshot (#33105) 2024-10-15 13:38:55 -07:00
Simon Knott
042161e1ce
Reapply "fix(har timing): record connect timing for proxied connections" (#32855) (#33003)
This reapplies what we reverted in
https://github.com/microsoft/playwright/pull/32989.

Max and me debugged this, and found that the test failures come from
SOCKS proxy now preferring IPv6 over IPv4. We've updated the tests and
made sure that this doesn't mask any breaking change.

I'm enabling CQ1 to make sure we don't oversee any other CI failures.
2024-10-08 14:17:50 +02:00
Simon Knott
1b589c4bd3
Revert "fix(har timing): record connect timing for proxied connections" (#32989)
Reverts microsoft/playwright#32855. This broke two tests on main, and we
don't yet know how to fix it other than downgrading.
2024-10-08 10:13:21 +02:00
Aaron Sherwood
4d13677ebd
chore: add Devuan OS fallback to Debian (#32990) 2024-10-07 23:24:18 +02:00
Simon Knott
de4a4d1ce1
fix(har timing): record connect timing for proxied connections (#32855)
Fixes a bug discovered in
https://github.com/microsoft/playwright/pull/32647. When using http
proxy, the `connect` event isn't emitted so we don't populate
`tcpConnectionAt`. The updated version of `https-proxy-agent` emits a
`proxyConnect` as a replacement, so this PR updates and listens to that
event.
For socks proxies, the `on("socket")` event is emitted once the SOCKS
connection is established, which is the equivalent of having a TCP
connection available.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-10-07 09:59:13 +02:00
Pavel Feldman
908b0de5d4
chore: style action list in tv mode (#32845) 2024-09-27 17:52:03 -07:00
Playwright Service
463bd55cf0
feat(webkit): roll to r2083 (#32813) 2024-09-26 21:49:02 +02:00
Pavel Feldman
dfb3fdf217
chore: iterate towards recording into trace (3) (#32718) 2024-09-20 13:08:33 -07:00
Pavel Feldman
2f4acbb001
chore: use contentFrame() as a canonical locator representation (#32697) 2024-09-18 20:15:01 -07:00
Simon Knott
751b939d3a
feat(fetch): record timings (#32613)
Related to https://github.com/microsoft/playwright/issues/19621

Adds some instrumentation to collect timings for `APIRequestContext`
requests and adds them to the HAR trace. Doesn't yet expose them via an
API, but makes our `Duration` field in the trace viewer show a nice
duration:

<img width="1392" alt="Screenshot 2024-09-14 at 11 46 04"
src="https://github.com/user-attachments/assets/8020382d-9494-4634-9cfd-22b6f4a1d770">


I'm gonna add it to our API in a separate PR.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-09-17 16:11:21 +02:00
Pavel Feldman
37eb66df10
chore: extract performAction in recorder (#32279) 2024-08-23 10:19:44 -07:00
Max Schmitt
743565ee3e
chore: generate self-signed certificates for socks proxy (#32192) 2024-08-16 20:21:05 +02:00
Max Schmitt
aac3a84321
fix(client-certificates): stall on tls handshake errors (#32163)
Extracted from https://github.com/microsoft/playwright/pull/32158.
2024-08-15 08:51:40 +02:00
Dmitry Gozman
f8eef3897c
chore: move urlMatch to isomorphic (#32142)
To be reused in injected code.
2024-08-13 12:47:02 -07:00
faulpeltz
ca25d2c802
fix: ubuntu version detection for linux mint 22 (#32049)
Add Linux Mint 22 (Ubuntu based distro) version detection for dependency
installation
Linux Mint 22.x -> Ubuntu 24.04

(also see original Linux Mint support PR #28085)
2024-08-07 14:28:03 -07:00
Max Schmitt
613ccb8d5b
chore(client-certificates): rewrite error for unsupported PFX errors (#32008) 2024-08-05 14:42:29 +02:00
Max Schmitt
0c6ecf8df4
chore: use happy eyeballs for client-certificates (#31859) 2024-07-25 18:55:47 +02:00
Max Schmitt
90af289ba2
test: use managed http2 server for client-certificates (#31844) 2024-07-25 18:53:38 +02:00
Max Schmitt
c5b7ce86dc
feat(client-certificates): add http2 support (#31786) 2024-07-24 11:39:39 +02:00
Álvaro Martínez
00131c1e3f
feat(trace-viewer): display text attachments in ui mode (#31215) 2024-07-08 11:16:14 -07:00
Max Schmitt
f11ab2f145
chore: enable keepAlive in happy eyeballs http.Agent (#31434) 2024-06-25 19:05:32 +02:00
Yury Semikhatsky
9e6772818e
chore: cache normalized whitespaces in recorder (#31349)
Reference: https://github.com/microsoft/playwright/issues/31254

On the web page from the bug it reduces time to compute selectors by 8x:

**Before:**
<img width="549" alt="before"
src="https://github.com/microsoft/playwright/assets/9798949/f4482860-29d5-4643-92ab-b360a702f232">

**After:**
<img width="580" alt="after"
src="https://github.com/microsoft/playwright/assets/9798949/b6aca6a1-9306-4041-9042-d504dce1c33a">
2024-06-17 18:20:15 -07:00
Darío Kondratiuk
76b25e84cc
docs: Improve clock doc (#31147) 2024-06-04 18:48:56 +02:00
Max Schmitt
2c6fd722dd
feat: support Ubuntu 24.04 (#30826) 2024-06-03 12:47:16 +02:00
Dmitry Gozman
eed6a10f3f
fix(tracing): speed up trace recording (#30946)
This includes two major changes:
- reuse `SerializedFS` for live test runner tracing;
- merge scheduled `appendFile` operations into a single `fs` call.

In some cases, this improves performance of UI mode by 61% and
performance of `trace: on` mode by 38%. Note that performance
improvement on the average test will not be as noticeable.

References #30875, #30635.
2024-05-22 15:19:32 -07:00
Dmitry Gozman
6290af3a08
feat(reporters): align and document environment variables (#30912)
- Documents `PLAYWRIGHT_FORCE_TTY` and `FORCE_COLOR` across terminal
reporters.
- New `PLAYWRIGHT_LIST_PRINT_STEPS`. Removes undocumented test-only
`PW_TEST_DEBUG_REPORTERS_PRINT_STEPS`.
- Replaces `PLAYWRIGHT_HTML_REPORT` with `PLAYWRIGHT_HTML_OUTPUT_DIR`
and `PW_TEST_HTML_REPORT_OPEN` with `PLAYWRIGHT_HTML_OPEN` for
consistency, supports older versions for backwards compatibility.
- New `PLAYWRIGHT_HTML_HOST`, `PLAYWRIGHT_HTML_PORT` and
`PLAYWRIGHT_HTML_ATTACHMENTS_BASE_URL`.
- New `PLAYWRIGHT_JUNIT_STRIP_ANSI` and
`PLAYWRIGHT_JUNIT_INCLUDE_PROJECT_IN_TEST_NAME`.
- Removes `PW_HTML_REPORT` that was set for unknown reason.
2024-05-21 10:46:52 -07:00
Dmitry Gozman
4ad94c1a8c
chore: print friendly localhost address from http server (#30853) 2024-05-17 08:55:12 -07:00
Yury Semikhatsky
fb319e6d3d
fix: match client step and server action by explicit stepId (#30641)
Matching bu `apiName@wallTime` fails when two actions start at the same
time, e.g. two parallel api requests. Moreover, it results in trace
actions that have parent set to themselves, which in turn causes
infinite loop in the trace viewer. To avoid this problems we write
stepId explicitly to the library trace and use those step ids to find
corresponding test runner steps.

The stepId is passed via zone in case of expect, because the protocol
step is quite deep in the call chain after or explicitly in case of API
call steps created by the test runner instrumentation.
2024-05-14 12:10:46 -07:00