76 Commits

Author SHA1 Message Date
Max Schmitt
43e46d63dd
chore: use recorder/html types for exported shared types (#34056) 2024-12-17 20:26:56 +01:00
Max Schmitt
21c456b2c1
chore: remove vite default scripts in package.json's (#33986) 2024-12-12 15:37:53 -08:00
Pavel Feldman
a98021499f
chore: add cm placeholder text (#33635) 2024-11-15 16:19:35 -08:00
Pavel Feldman
44cd1d03cc
chore: highlight edited locator while recording (#33632) 2024-11-15 13:43:00 -08:00
Pavel Feldman
4817483ff2
chore: allow highlighting aria template from extension (#33594) 2024-11-13 21:33:38 -08:00
Pavel Feldman
e534fba60f
chore: render recorder placeholders (#33548) 2024-11-11 16:38:02 -08:00
Pavel Feldman
649e0e0235
chore: nicer cm widgets for aria (#33524) 2024-11-11 09:40:50 -08:00
Pavel Feldman
503f74da90
chore: allow editing aria template in recorder (tests) (#33522) 2024-11-08 17:18:51 -08:00
Pavel Feldman
b021b58379
chore: allow editing aria template in recorder (#33482) 2024-11-08 07:43:01 -08:00
Simon Knott
0d92737a07
chore(web): replace static ID with React.useId (#33474) 2024-11-06 14:42:48 +01:00
Simon Knott
f554f42b82
feat(trace viewer): link from attach action to attachment tab (#33265) 2024-11-06 10:22:15 +01:00
Pavel Feldman
a655b0bfb3
chrome: aria api review (#33458) 2024-11-05 15:23:38 -08:00
Pavel Feldman
6bfdad068c
chore: introduce accessibility tab in recorder (#33235) 2024-10-22 16:36:03 -07:00
Pavel Feldman
4b1fbde2ad
chore: generate match snapshot (#33105) 2024-10-15 13:38:55 -07:00
Pavel Feldman
6cfcbe0d6d
chore: fix codegen selector while debugging (#33099)
Fixes #33052
2024-10-14 14:04:24 -07:00
Pavel Feldman
11014145ce
chore: update trace event on action merge (#32860) 2024-09-27 21:18:30 -07:00
Pavel Feldman
c105de4436
chore: move actions types to recorder (#32839) 2024-09-26 14:50:09 -07:00
Pavel Feldman
8649b13f25
chore: start putting tv-recorder ui together (#32776) 2024-09-23 19:13:45 -07:00
Pavel Feldman
427eca6f7e
chore: iterate towards recording into trace (2) (#32693) 2024-09-18 14:39:07 -07:00
Pavel Feldman
92c6408b94
fix(recorder): address the react race condition (#32628) 2024-09-16 13:47:13 -07: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
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
Simon Knott
45c2e8a3ed
chore(recorder): update to React 18 (#32101)
Part of https://github.com/microsoft/playwright/issues/31863. Updates
`recorder` to use React 18.
2024-08-12 09:19:28 +02: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
Max Schmitt
a3b0f0cba8
chore: address deprecated Vite warnings (#31618) 2024-07-10 22:32:08 +02:00
Ian Macalinao
08729cd2e6
fix(recorder): reference Language enum for recorderTypes (#29294) 2024-02-01 13:48:30 -08:00
Dmitry Gozman
5488c03d7f
chore: make asLocator() always safe (#28207) 2023-11-16 16:31:34 -08:00
Max Schmitt
84d1260d1a
fix(recorder): inspect element when starting typing in locator editor (#28134) 2023-11-15 19:40:10 +01:00
Dmitry Gozman
557f3afd74
feat(recorder): assert value as a separate tool (#28145) 2023-11-14 15:17:42 -08:00
Dmitry Gozman
0a052cb4d6
feat(recorder): assert visibility tool (#28142) 2023-11-14 12:55:34 -08:00
Dmitry Gozman
36b99c3437
chore(recorder): standby mode, expose setModeRequested in DebugController (#28117) 2023-11-13 16:39:14 -08:00
Pavel Feldman
061ded19b6
chore: place overlay inside the glass pane (#28026) 2023-11-07 19:36:12 -08:00
Pavel Feldman
eeda25c47f
chore(recorder): glue the overlay to the top (#28021) 2023-11-07 12:58:41 -08:00
Dmitry Gozman
810382c074
chore(recorder): more UX fixes for text assertions (#27995) 2023-11-06 16:40:33 -08:00
Dmitry Gozman
ffd2e02aa3
feat(recorder): various UX fixes (#27967) 2023-11-04 21:18:27 -07:00
Dmitry Gozman
07da88dcf1
feat(recorder): generate toHaveValue/toBeEmpty/toBeChecked (#27913) 2023-11-01 21:17:25 -07:00
Dmitry Gozman
3dedbced13
feat(recorder): in-page overlay (#27904) 2023-11-01 15:56:49 -07:00
Dmitry Gozman
24deac458b
feat(expect): generate toHaveText (#27824) 2023-10-26 18:49:14 -07:00
Max Schmitt
6d7d37061d
fix(recorder): Locator picker had wrong initial language in language bindings (#27706)
**Description**

When a language port was using Inspector with the "Locator Picker"
feature, it only recognised JavaScript as a language by default. As a
workaround the user was able to click record, interact with the page and
then the language would be correctly used -> csharp e.g. would work in
the "Locator Picker".

**Why?**

Our language bindings are setting `PW_LANG_NAME=<sdkLanguage>` env var
-> good. Our recorder harness also uses this along its internal state
here:


b9b289b641/packages/playwright-core/src/server/recorder.ts (L369)

and it gets used here (no parameter means: we use the first language
aka. primary language):


b9b289b641/packages/playwright-core/src/server/recorder.ts (L95)

The only issue is that the Inspector frontend in the beginning does not
know which language it should use and pass over to the server side, it
then falls back to JavaScript.

**Proposed fix**

Instead of passing it over from the frontend to the server side, we just
always use it from the server side, aka. "currentLanguage". When the
user switches languages in the frontend, "currentLanguage" already gets
updated properly via the "fileChanged" event.

https://github.com/microsoft/playwright-dotnet/issues/2718

---------

Signed-off-by: Max Schmitt <max@schmitt.mx>
2023-10-22 13:02:14 +02:00
Pavel Feldman
61a1924328
chore: align recorder drawer with trace viewer (#26922) 2023-09-06 17:13:25 -07:00
Max Schmitt
2f6148bcd1
chore: use SVG icons for web apps (#26564)
Signed-off-by: Max Schmitt <max@schmitt.mx>
2023-08-21 18:33:02 +02:00
Marcin Strzyz
192b697488
chore: remove old webpack folder structure (#26560) 2023-08-19 16:16:44 -07:00
Pavel Feldman
67ad2c2bf4
feat(ui): render all console / network messages in trace (#24115) 2023-07-10 12:56:56 -07:00
Pavel Feldman
631edc9744
chore(internal): generate code in jsonl (#23124) 2023-05-20 10:15:33 -07:00
Pavel Feldman
becb072703
chore: fix leaking event listeners (#22562)
Fixes https://github.com/microsoft/playwright/issues/22348
2023-04-21 12:38:39 -07:00
Pavel Feldman
e45a496850
chore(tv): render error in-line (#21586) 2023-03-10 16:22:19 -08:00
Pavel Feldman
e737ff83b4
chore: migrate to useRef take 2 (#21552) 2023-03-09 19:34:05 -08:00
Pavel
a619ea4d68 Revert "chore: replace createRef with useRef in most of the places (#21536)"
This reverts commit 908c0462d56586c28faccbce076899b652986be6.
2023-03-09 16:46:31 -08:00