Commit graph

46 commits

Author SHA1 Message Date
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 8649b13f25
chore: start putting tv-recorder ui together (#32776) 2024-09-23 19:13:45 -07:00
Pavel Feldman 92c6408b94
fix(recorder): address the react race condition (#32628) 2024-09-16 13:47:13 -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 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
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
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 908c0462d5.
2023-03-09 16:46:31 -08:00
Pavel Feldman 908c0462d5
chore: replace createRef with useRef in most of the places (#21536) 2023-03-09 13:31:21 -08:00
Pavel Feldman d7a0b3bb4e
chore: implement pick locator in trace viewer (#20965)
Fixes https://github.com/microsoft/playwright/issues/7853
2023-02-17 11:19:53 -08:00
Debbie O'Brien 7bc184f526
chore: recorder button styling (#19231) 2022-12-15 18:35:24 +01:00
Pavel Feldman d5eb74fa5d
chore: allow toggling recorder/traceviewer color modes (#18718)
Fixes: https://github.com/microsoft/playwright/issues/18700
2022-11-10 17:20:09 -08:00
Pavel Feldman 3bc9e07daf
chore: parse locators strictly (#18553) 2022-11-03 15:17:08 -07:00
Pavel Feldman 17c8554255
chore(recorder): explore using codemirror (#18529) 2022-11-03 09:55:23 -07:00
Pavel Feldman 2c3fa1b1ff
chore: add explore locator parser (#18429) 2022-10-31 12:55:35 -07:00
Pavel Feldman 909eda2432
chore: explore yield typed locator (#18188)
Fixes https://github.com/microsoft/playwright/issues/18018
2022-10-19 13:05:52 -07:00
Pavel Feldman 739b64a09a
chore: render typed locators in the recorder (#18162) 2022-10-18 16:39:58 -07:00
Pavel Feldman f2685cab95
chore: use api selectors in codegen hover (#17855) 2022-10-05 17:59:34 -07:00
Pavel Feldman 3abbe0d850
chore: migrate codegen to controller events (#17450) 2022-09-20 14:32:21 -07:00
Max Schmitt 13596b7be3
chore: language specific dropdowns in codegen (#16452) 2022-08-15 19:44:46 +02:00
jfgreffier efec0261a1
feat(inspector): add keyboard shortcuts (#12014) (#15326) 2022-07-07 11:25:48 -07:00
Dmitry Gozman cd53346594
fix(codegen): do not reset current source on every recorded action (#13925)
Currently, when I choose "Java" in the sources list and then
click on the page to generate the "click" action, sources reset
to "JavaScript". This is very inconvenient.

This changes the logic to only forcefully change files if either
old or new file is a user file, not a generated one.

Use cases considered:
- run `codegen`, click around, choose different language, click more;
- run script with inspector, pause, click "Record" and record an action;
- same as above, but then continue and see that user source is revealed.
2022-05-04 17:16:24 +01:00
Pavel Feldman f0156d057e
chore: flatten supplements (#13437) 2022-04-08 12:52:40 -07:00
Pavel Feldman 6b81e76c2b
chore: migrate trace-viewer and recorder to vite (#13076) 2022-03-25 14:12:00 -07:00
Renamed from packages/playwright-core/src/web/recorder/recorder.tsx (Browse further)