80 Commits

Author SHA1 Message Date
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
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
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
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
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
Dmitry Gozman
d7393f998e
chore: simplify settings management in UI mode (#32440) 2024-09-04 01:05:07 -07: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
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
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
bbe252a3d7
fix(ui mode): api review feedback (#31952)
- Hide "Testing Options" as not ready.
- Update SettingsView margins.
- Include `page.route` and similar methods into "Show route actions".
2024-08-01 05:36:19 -07:00
Simon Knott
daca1681c0
refactor(ui): in splitview component, move sidebar and main from children into named properties (#31925)
Pulled out from https://github.com/microsoft/playwright/pull/31900

I stumbled over `React.Children`, because it's the first time I saw that
used. https://react.dev/reference/react/Children lists `React.Children`
it as "Legacy" and mentions it's uncommon. Also, the fact that SplitView
only displays its first two children, and all others are silently
discarded, can be a surprise to some.

By separating things out into `sidebar` and `main`, not only do we give
the two elements names (otherwise one needs to remember that sidebar is
always the first child), but we also prevent any "third children" from
being dropped.
2024-07-31 12:48:46 +02:00
Simon Knott
99724d0322
refactor(ui): some react refactorings (#31900)
Addresses https://github.com/microsoft/playwright/issues/31863. This PR
is chonky, but the individual commits should be easy to review. If
they're not, i'm happy to break them out into individual PRs.

There's two main things this does:

1. Remove some unused imports
2. Add a `clsx`-inspired helper function for classname templating

I wasn't able to replace `ReactDOM.render` with `ReactDOM.createRoot`.
This is the new recommended way starting with React 18, and the existing
one is going to be deprecated at some point. But it somehow breaks our
tests, i'll have to investigate that separately.
2024-07-31 12:12:06 +02:00
Simon Knott
b8b562888e
refactor(ui): synchronize settings via useSyncExternalStore instead of prop drilling (#31911)
Broken out from https://github.com/microsoft/playwright/pull/31900, part
of https://github.com/microsoft/playwright/issues/31863.

Synchronizes different `useSettings` calls via `useSyncExternalStore`.
This saves us from having to drill down settings props everywhere,
without the big refactoring that a `Context` would be.
2024-07-30 17:57:31 +02:00
Simon Knott
8412d973c0
fix(ui): added test in watched file should be run (#31842)
Closes https://github.com/microsoft/playwright/issues/22211

Currently, when the server notifies the UI about changed files, the UI
determines what files to re-run based on an old test list. By listing
tests before that, we make sure that the test list is up-to-date, and
that added tests are included in the next run.

I've also removed the `listChanged` event as discussed in the team sync.
The event isn't used anywhere and fires in exactly the same cases where
`testFilesChanged` fired, so i've folded them into one another. This allowed simplifying `Watcher`.
2024-07-30 14:17:41 +02:00
Dmitry Gozman
f232507afa
feat(ui mode): ui updates (#31894)
- Update copy to clipboard button.
- Reveal test source in the Source tab instead of external editor.
- New button to reveal in the external editor in the Source tab.
- Move the Pick Locator button next to snapshot tabs.
2024-07-29 07:32:13 -07:00
Dmitry Gozman
a41cebc1c9
feat(ui mode): introduce Testing Options and Settings (#31841)
Testing Options control tests, while Settings are UI mode settings.

<img width="298" alt="Screenshot 2024-07-25 at 10 54 22 AM"
src="https://github.com/user-attachments/assets/7b6f5fff-687b-48d1-80b3-d1e6f2a257e8">


These sections are separately expandable, collapsed by default.

<img width="294" alt="Screenshot 2024-07-24 at 2 06 25 PM"
src="https://github.com/user-attachments/assets/5d35ac8c-9289-46ca-aaa2-ebc5419fa0c4">

References #31520.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Simon Knott <info@simonknott.de>
2024-07-25 11:23:43 -07:00
Simon Knott
bbe5df3f5f
fix(ui): when --grep is used, UI should only show selected tests (#31815)
Closes https://github.com/microsoft/playwright/issues/31617.
2024-07-23 15:29:08 +02:00
Dmitry Gozman
48db1b1663
fix(ui mode): allow --updateSnapshots (#31584)
Fixes #31408.
2024-07-08 01:08:57 -07:00
Pavel Feldman
7b27fc3916
chore: pass outputDir to uimode (#30941)
Fixes https://github.com/microsoft/playwright/issues/30886
2024-05-21 14:36:31 -07:00
Dmitry Gozman
ab3df111c9
chore: remove TeleTestCase._resultsMap (#30567) 2024-04-26 10:11:01 -07:00
Pavel Feldman
ff3d3ae8f2
fix(ui): print config and global setup errors (#30531)
Fixes: https://github.com/microsoft/playwright/issues/30513
2024-04-24 18:54:48 -07:00
Pavel Feldman
8ee286b366
chore: migrate to the testserver.initialize (#30226) 2024-04-03 12:50:56 -07:00
Pavel Feldman
7afd4170ea
chore: opt into stdio forwarding (#30185) 2024-03-30 18:45:10 -07:00
Max Schmitt
599185dd07
feat(ui-mode): show native tags in test tree (#30092)
This brings up the question that we would show the tag name twice if its
a tag in a title. This would be aligned to how HTML report is doing it.

Fixes https://github.com/microsoft/playwright/issues/29927

---------

Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-03-26 01:06:22 +01:00
Pavel Feldman
7039ad0d11
chore: follow up to the api review for test server (#30097) 2024-03-25 15:42:58 -07:00
Max Schmitt
253a2f9a9c
chore: address UI Mode keyboard shortcut feedback (#30088)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-03-25 19:48:20 +01:00
Pavel Feldman
ee9432b9da
chore: send test params over the wire in ui mode (#30046) 2024-03-22 13:49:28 -07:00
Pavel Feldman
a9fc4de37e
chore: queue run and list commands from ui (#30033) 2024-03-21 14:28:07 -07:00
Pavel Feldman
7ad0a12c23
chore: remove ui mode update globals (#30031) 2024-03-20 21:09:49 -07:00
Pavel Feldman
8a1ff34578
chore: split ui mode view into files (#30029) 2024-03-20 16:00:35 -07:00
Pavel Feldman
48ccc9cbcd
chore: prepare to reuse test server from ui mode (6) (#30008) 2024-03-20 13:43:26 -07:00
Pavel Feldman
0a22a86e2e
chore: prepare to reuse test server from ui mode (5) (#30005) 2024-03-19 14:08:21 -07:00
Pavel Feldman
54aca430b0
chore: prepare to reuse test server from ui mode (4) (#29995) 2024-03-19 13:00:49 -07:00
jonghoonpark
b929c0d8f7
feat(ui-mode): add key shortcuts for playwright uI test runner (#29868) 2024-03-19 12:36:42 +01:00
Pavel Feldman
ef4438ee99
chore: prepare to reuse test server from ui mode (2) (#29966) 2024-03-18 09:59:02 -07:00
Pavel Feldman
94348bb3c5
chore: align test tree with vscode (#29864) 2024-03-14 15:44:35 -07:00
Sarkis Matinyan
0c3f60e95e
fix(ui): show stack frames in ui mode (#29560)
#29558, #29500
2024-03-06 12:29:35 -08:00
Pavel Feldman
8bf8091cb1
chore: extract the tele test tree (#29824) 2024-03-05 15:11:56 -08:00
Dmitry Gozman
abfd2c4e66
feat(ui mode): text filter should filter by explicit tags (#29821)
Fixes #29815.
2024-03-05 10:58:55 -08:00
Pavel Feldman
e314b83e56
chore: iterate towards tele reporter reuse in vscode (2) (#29812) 2024-03-04 19:52:20 -08:00
Pavel Feldman
68284b0505
chore: inject string pool into the tele receiver (#29781) 2024-03-04 08:46:32 -08:00
Pavel Feldman
ef924c14e7
chore: do not use project id in telereporter (#29776) 2024-03-01 21:44:08 -08:00
Pavel Feldman
bbcc3c1238
chore: remove private config usage from telereporter (#29771) 2024-03-01 13:14:12 -08:00
Max Schmitt
696237205a
fix(ui-mode): disconnected error styling (#28681)
Fixes https://github.com/microsoft/playwright/issues/28679
Fixes https://github.com/microsoft/playwright/issues/28680
2023-12-18 17:32:57 +01:00
Max Schmitt
8efa8dbc1d
fix(ui-mode): make UI Mode projects scrollable (#28438)
Fixes https://github.com/microsoft/playwright/issues/28393



https://github.com/microsoft/playwright/assets/17984549/5791e422-f4e6-4202-b66c-b77bbb476c04
2023-11-30 13:26:03 -08:00
Pavel Feldman
e84dd4d708
fix(ui): do not fail on clashing groups (#27943)
Fixes https://github.com/microsoft/playwright/issues/27929
2023-11-02 20:50:08 -07:00
Max Schmitt
08b8181632
chore: make Trace Viewer start page AAA compliant (#27879) 2023-10-31 16:35:13 +01:00
Pavel Feldman
47733b04fb
chore: do not select after hooks automatically (#27805) 2023-10-25 17:05:06 -07:00
Pavel Feldman
0bb9f7cdf7
feat(ui): show test status in trace view (#27785) 2023-10-24 16:41:40 -07:00