playwright/tests
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
..
android chore: follow up to target close message 2023-10-12 14:58:19 -07:00
assets Fix various typos (Fixes #27396) (#27391) 2023-10-04 19:56:42 -07:00
components fix(ct): solid render array as child (#27715) 2023-10-20 11:44:30 -07:00
config feat(chromium-tip-of-tree): roll to r1159 (#27605) 2023-10-17 22:41:23 +02:00
electron feat(electron): support tracesDir option (#23947) 2023-06-28 16:32:16 -07:00
image_tools chore: bump @babel dependencies (#27632) 2023-10-17 20:52:41 +02:00
installation chore: composed->merge (#27555) 2023-10-11 13:56:27 -07:00
library fix(recorder): Locator picker had wrong initial language in language bindings (#27706) 2023-10-22 13:02:14 +02:00
page fix(keyboard): event order for Escape key (#27711) 2023-10-19 18:18:29 +02:00
playwright-test chore(test runner): do not produce some of the fake skipped test results (#27730) 2023-10-20 17:01:46 -07:00
stress chore: dispose stale handles to prevent oom, 1000 of a kind max (#27315) 2023-09-26 15:54:33 -07:00
webview2 devops: do not upload test-results artifacts (#23168) 2023-05-19 13:06:42 -07:00
.eslintrc.js chore: enable no-floating-promises ESLint rule for tests (#23376) 2023-06-02 21:59:12 +02:00
index.d.ts test: added tests for WebSocket over Socks proxy (#7235) 2021-06-24 18:50:16 +02:00
tsconfig.json test: add installation tests for supposed plugin story (#27331) 2023-09-28 17:18:22 -07:00