421 Commits

Author SHA1 Message Date
Pavel Feldman
2e8e7a66cd
chore: implement tree w/o list (#33169) 2024-10-18 13:50:43 -07:00
Pavel Feldman
623a8916f9
chore: implement tree w/o list (#33167) 2024-10-17 16:57:45 -07:00
Pavel Feldman
6c9823eeaf
chore: allow minimal height for trace attachments (#32996) 2024-10-08 08:33:45 -07:00
Yury Semikhatsky
6ba5ee3a83
chore(ui-mode): expand all button (#32994)
<img width="230" alt="image"
src="https://github.com/user-attachments/assets/dd7fa3a1-39ec-4b88-9279-d664c9c4e5cd">


Reference https://github.com/microsoft/playwright/issues/32825
2024-10-07 15:42:12 -07:00
Simon Knott
3a5bf1cc1d
fix(trace viewer): reveal stack for highlighted action (#32919)
Closes https://github.com/microsoft/playwright/issues/32915.

In the `Call` and `Logs` tabs, we update the contents based on the
hovered action. We document that this is also the case for the `Source`
tab:


78054a7652/docs/src/test-ui-mode-js.md (L61-L65)

But it isn't. Not sure if it's a regression or not, but this PR fixes
it.
2024-10-02 13:30:44 +02:00
Max Schmitt
78054a7652
chore: remove 'screenshot instead of snapshot' usages (#32905)
Fixes https://github.com/microsoft/playwright/issues/32904
2024-10-01 18:38:10 +02:00
Simon Knott
aa3146785f
fix(ui): turn "copy as fetch" into text button (#32858)
Turns the "copy as fetch" text with a copy button into a text button, as
discussed in the meeting.


https://github.com/user-attachments/assets/01f72f0b-e3f2-440e-a75d-33385aabeec4
2024-09-30 03:01:56 -07:00
Pavel Feldman
11014145ce
chore: update trace event on action merge (#32860) 2024-09-27 21:18:30 -07:00
Pavel Feldman
908b0de5d4
chore: style action list in tv mode (#32845) 2024-09-27 17:52:03 -07:00
Pavel Feldman
1a3d3f699b
chore: render recorded action list in tv mode (#32841) 2024-09-26 16:46:27 -07:00
Pavel Feldman
c105de4436
chore: move actions types to recorder (#32839) 2024-09-26 14:50:09 -07:00
Max Schmitt
0d79291604
chore: hide screenshot instead of snapshot Trace Viewer feature (#32832) 2024-09-26 22:30:41 +02:00
Pavel Feldman
9bff4d7eab
chore: move sw files into the sw/ folder (#32837) 2024-09-26 11:22:20 -07:00
Yury Semikhatsky
597642d269
chore: pass cli config overrides straight to test server (#32818) 2024-09-25 19:45:59 -07:00
Yury Semikhatsky
b6783bb18b
fix(ui-mode): respect --tsconfig option (#32798)
Fixes https://github.com/microsoft/playwright/issues/32797
2024-09-24 19:59:15 -07:00
Pavel Feldman
8649b13f25
chore: start putting tv-recorder ui together (#32776) 2024-09-23 19:13:45 -07:00
Pavel Feldman
0c8b2a7c32
chore: take snapshot tab apart (#32756) 2024-09-23 15:51:15 -07:00
Dmitry Gozman
b3a82bef46
feat: do not record route calls in the trace (#32723)
These are represented in the network pane instead.
2024-09-21 10:17:59 -07:00
Pavel Feldman
17ed944a84
chore: iterate towards recording into trace (4) (#32743) 2024-09-20 16:56:05 -07:00
Pavel Feldman
418d1c0c55
chore: allow starting recorder in traceviewer (#32741) 2024-09-20 15:25:49 -07:00
Pavel Feldman
dfb3fdf217
chore: iterate towards recording into trace (3) (#32718) 2024-09-20 13:08:33 -07:00
Max Schmitt
4c31a8289f
feat(trace-viewer): add network requests 'copy as cURL' button (#32627) 2024-09-18 14:35:11 +02:00
Pavel Feldman
355c88f48f
chore: iterate towards recording into trace (#32646) 2024-09-17 18:26:44 -07:00
Yury Semikhatsky
ad70e7a783
fix(trace-viewer): time delta between local and remote actions (#32661) 2024-09-17 11:14:15 -07:00
Pavel Feldman
3bff7b6ab1
chore: preserve selected trace action in live trace (#32630) 2024-09-16 17:33:52 -07:00
Pavel Feldman
7e3348eb0e
chore: recorder is trace viewer experiment (#32598) 2024-09-12 13:39:44 -07:00
Simon Knott
c9f3eb158e
feat(ui): highlight output toggle button if terminal contains error (#32392)
Closes https://github.com/microsoft/playwright/issues/32368

<img width="412" alt="Screenshot 2024-08-30 at 13 22 39"
src="https://github.com/user-attachments/assets/76cadcd9-e92a-44d9-80fc-b4e04702e71e">
2024-09-12 19:40:40 +02:00
Teng Yang
6a0009f9ed
fix(trace-viewer): fix ui issue on network request details (#32553) 2024-09-12 12:26:51 +02:00
Dmitry Gozman
7335fa602c
fix(trace viewer): do not show multiple action points in iframes (#32537)
When action has an input target, we assume there is a target element in
one of the frames and show action point in its center.

Fixes #32453.
2024-09-11 03:04:03 -07:00
Dmitry Gozman
b5d968fa0e
chore: make ReporterV2 a partial interface (#32532)
This makes it easier to write reporters by avoding empty methods.
2024-09-10 06:08:54 -07:00
Simon Knott
ec40890fd8
fix(tracing): use page swap timestamp to find closest screenshot (#32512)
Follow-up to https://github.com/microsoft/playwright/pull/32248. When we
have it, we should use the page swap timestamp we get from Chromium to
find the closest screenshot.
2024-09-10 14:32:33 +02:00
Max Schmitt
4b5422a3c7
fix(ui-mode): use server side path separator (#32523)
Fixes https://github.com/microsoft/playwright/issues/32323
2024-09-09 22:07:28 +02:00
Simon Knott
31e269ad06
feat(trace-viewer): show screenshot pointer (#32514)
Follow-up to https://github.com/microsoft/playwright/pull/32248. Adds a
glowing red circle that shows the click position. I made it glowing to
show that its position is inaccurate.
<img width="964" alt="Screenshot 2024-09-09 at 11 33 45"
src="https://github.com/user-attachments/assets/1903071d-6dc0-46c7-9951-844e49a51f35">
2024-09-09 14:00:22 +02:00
Simon Knott
3fe1263643
feat(trace viewer): show Screenshot instead of Snapshot (#32248)
Closes https://github.com/microsoft/playwright/issues/23964.

Trace snapshots are a best-effort snapshots of the browser DOM, but we
can't guarantee them to be exactly what the browser showed. One example
of this is `canvas` elements, where you just can't see their contents.
That makes snapshots useful, but not perfect.

For those cases where the snapshot doesn't show everything, this PR
introduces a new setting to show a screenshot instead. You won't be able
to scroll or inspect the DOM or select a locator anymore. But if the
snapshot was missing something, or displaying something wrong, you can
now check the screenshot instead.
2024-09-06 16:24:33 +02:00
Kuba Janik
ee91bdc585
feat(ui-mode): display list of query params in request tab (#32443) 2024-09-04 07:54:44 -07:00
Dmitry Gozman
d7393f998e
chore: simplify settings management in UI mode (#32440) 2024-09-04 01:05:07 -07:00
Simon Knott
b3d767fa14
fix(trace viewer): fix memory leak (#32379)
In the `visit` method, we currently cache the rendered HTML for every
walked node. This re-use works well for traces that consist mostly of
references to earlier snapshots.
But for traces that don't share much, this is a large memory overhead
and leads to the memory crash documented in
https://github.com/microsoft/playwright/issues/32336. For the algocracks
amongst you, the current memory usage for an html tree $h$ is
$\mathcal{O}(|h| * \text{height}(h))$.

This PR removes that cache from the nodes and replaces it with a
snapshot-level cache, fixing the memory crash.
Traces *without* reference should not see a performance impact from
this.
Traces *with* references will have slower initial rendering, but
re-rendering maintains speed because of the snapshot-level cache.

Closes https://github.com/microsoft/playwright/issues/32336

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-09-04 09:57:15 +02:00
Kuba Janik
a6b320e362
fix(ui-mode): format request body when headers are lower case (#32395)
Resolves https://github.com/microsoft/playwright/issues/32396

Currently, the request body is not formatted when content type header is
lower case (`content-type`). Even though the value is
`application/json`.

It happens because we are looking only for `Content-Type` header
ignoring headers that are lower case.

<img width="674" alt="363197933-5178ec23-b9cf-46b5-8284-e8d4d730b036"
src="https://github.com/user-attachments/assets/0ef01b52-7dd8-4f33-b836-9adb86f94cc9">
2024-08-30 16:21:51 +02:00
Simon Knott
ed5c21b827
fix(ui): respect --output param (#32351)
Closes https://github.com/microsoft/playwright/issues/32331

We're already passing the `outputDir` param to the UI, but the UI isn't
passing it back to the TestServer. This PR fixes that. I've added it to
`listTests`, which is requires to that
`TestServerDispatcher#_ignoredProjectOutputs` is populated with the
correct output dir. And i've added it to `runGlobalSetup`, which is what
the bug report was about.
2024-08-30 08:29:49 +02:00
Pavel Feldman
74a8e59096
chore: allow recorder rewrite annotations (#32381) 2024-08-29 14:16:01 -07:00
Pavel Feldman
bc87467b25
chore: generate simple dom descriptions in codegen (#32333) 2024-08-27 11:52:14 -07:00
Pavel Feldman
9d86bc5336
fix(dupe): render dupe test error indicator (#32303)
Fixes https://github.com/microsoft/playwright/issues/32093
2024-08-23 14:33:37 -07:00
Simon Knott
3fb33e7144
chore(ui): decouple TestServerConnection from websocket transport (#32274)
Preparation for https://github.com/microsoft/playwright/issues/32076.
2024-08-23 14:58:34 +02:00
Simon Knott
850436c656
chore(ui): move TeleSuiteUpdater into testIsomorphic (#32273)
Preparation for https://github.com/microsoft/playwright/issues/32076.
2024-08-22 17:29:10 +02:00
Simon Knott
b599335404
chore(ui): enable react/recommended lint rules (#32214)
Closes https://github.com/microsoft/playwright/issues/32159. I
originally set out to enable Strict Mode for our React UI, but found a
way better thing: Enabling the lint rules we had already installed!

`eslint-plugin-react` is already in of our `package.json`, and this PR
enables it and fixes some of the reported issues. Most of them are
around the `key` prop which is mostly about performance, but there's
also fixes for misspelled `data-testid` props.
2024-08-20 14:16:28 +02:00
Kuba Janik
f7e0bd3098
feat(ui-mode): add font preview to network tab (#32209)
Resolves https://github.com/microsoft/playwright/issues/32218

Currently, fonts are displayed as a raw binary file which does not give
any information to the users.
I replaced it with a simple font preview similar to the one found in the
dev tools of web browsers.
It is not a major feature but I think it is a nice addition and it might
be useful to somebody.

<img width="1043" alt="Screenshot 2024-08-17 at 18 33 46"
src="https://github.com/user-attachments/assets/a6cc7b57-7ea8-4a54-869d-57a44712597b">


https://github.com/user-attachments/assets/e52d9a72-fb2c-43c7-bfee-3d6d6edc6b6a
2024-08-20 08:28:02 +02:00
Dmitry Gozman
5271c26af1
fix(trace viewer): do not serve resources with x-unknown content type (#32219)
`x-unknown` is used as a placeholder for "no content-type" in the har.
We should not send it to the browser, because it is meaningfully
different from not sending `Content-Type` header. For example, Chromium
refuses to interpret stylesheets served with `x-unknown` content type.

Fixes https://github.com/microsoft/playwright-java/issues/1651.
2024-08-19 10:29:51 -07:00
Rui Figueira
b2ccfc3d01
chore(trace-viewer): support opening a source location in embedded trace viewer (#32175)
Related: https://github.com/microsoft/playwright-vscode/pull/513
2024-08-15 14:13:11 -07:00
Simon Knott
c8cc4f9c8b
chore(ui): update to react 18 (#32079)
Part of https://github.com/microsoft/playwright/issues/31863. Updates
most of our React usage to React 18. `recorder` doesn't seem to like it
yet. I suspect that some of our code isn't compatible with concurrent
mode, i've investigated that in
https://github.com/microsoft/playwright/pull/32101.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-08-12 13:50:11 +02:00
Dmitry Gozman
44445e30e5
fix(ui mode): make sure key for attachment view is unique (#32084)
Fixes #32052.
2024-08-08 10:57:44 -07:00