playwright/tests/library
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
..
chromium chore: unify target closed errors (#27540) 2023-10-12 11:05:34 -07:00
emulation-focus.spec.ts-snapshots feat(webkit): roll to r1674 (#15384) 2022-07-08 11:07:06 -07:00
firefox chore: fix s2 mode (#24525) 2023-07-31 11:24:04 -07:00
inspector fix(recorder): Locator picker had wrong initial language in language bindings (#27706) 2023-10-22 13:02:14 +02:00
screenshot.spec.ts-snapshots test: screenshot of css transformation (#26533) 2023-08-18 14:30:43 -07:00
beforeunload.spec.ts chore: remove Page._didDisconnect (#27317) 2023-09-27 14:09:56 -07:00
browser.spec.ts chore: unify target closed errors (#27540) 2023-10-12 11:05:34 -07:00
browsercontext-add-cookies.spec.ts Fix various typos (Fixes #27396) (#27391) 2023-10-04 19:56:42 -07:00
browsercontext-add-init-script.spec.ts chore: group tests under tests/ (1) (#13081) 2022-03-25 16:05:50 -07:00
browsercontext-base-url.spec.ts chore: group tests under tests/ (1) (#13081) 2022-03-25 16:05:50 -07:00
browsercontext-basic.spec.ts chore: unify target closed errors (#27540) 2023-10-12 11:05:34 -07:00
browsercontext-clearcookies.spec.ts chore: group tests under tests/ (1) (#13081) 2022-03-25 16:05:50 -07:00
browsercontext-cookies.spec.ts test: update stale test expectations (#20423) 2023-01-27 21:52:34 -08:00
browsercontext-credentials.spec.ts test: unflake "should fail without credentials" (#27606) 2023-10-13 14:15:12 -07:00
browsercontext-csp.spec.ts chore: group tests under tests/ (1) (#13081) 2022-03-25 16:05:50 -07:00
browsercontext-device.spec.ts chore: group tests under tests/ (1) (#13081) 2022-03-25 16:05:50 -07:00
browsercontext-dsf.spec.ts chore: align more ESLint rules with VSCode formatting (#16647) 2022-08-18 20:12:33 +02:00
browsercontext-events.spec.ts Fix various typos (Fixes #27396) (#27391) 2023-10-04 19:56:42 -07:00
browsercontext-expose-function.spec.ts fix(reuse): workaround long sw unregister (#19930) 2023-01-06 17:02:40 -08:00
browsercontext-fetch-happy-eyeballs.spec.ts chore: enable no-floating-promises ESLint rule for tests (#23376) 2023-06-02 21:59:12 +02:00
browsercontext-fetch.spec.ts fix: do not throw from fetch when response has invalid cookie (#27192) 2023-09-19 16:18:16 -07:00
browsercontext-har.spec.ts chore: update routeFromHAR options for release (#21764) 2023-03-17 11:49:45 -07:00
browsercontext-locale.spec.ts feat(webkit): roll to r1658 (#14709) 2022-06-08 10:16:49 -07:00
browsercontext-network-event.spec.ts chore: group tests under tests/ (1) (#13081) 2022-03-25 16:05:50 -07:00
browsercontext-page-event.spec.ts chore: enable no-floating-promises ESLint rule for tests (#23376) 2023-06-02 21:59:12 +02:00
browsercontext-pages.spec.ts test: unskip "should keep selection in multiple pages" (#27611) 2023-10-16 09:47:05 -07:00
browsercontext-proxy.spec.ts feat(chromium-tip-of-tree): roll to r1159 (#27605) 2023-10-17 22:41:23 +02:00
browsercontext-reuse.spec.ts chore: hide tracing calls from traces (#27096) 2023-09-15 12:55:49 -07:00
browsercontext-route.spec.ts chore: enable no-floating-promises ESLint rule for tests (#23376) 2023-06-02 21:59:12 +02:00
browsercontext-service-worker-policy.spec.ts feat: add allow/block serviceWorkers option (#14714) 2022-06-08 18:27:51 -04:00
browsercontext-set-extra-http-headers.spec.ts chore: group tests under tests/ (1) (#13081) 2022-03-25 16:05:50 -07:00
browsercontext-storage-state.spec.ts chore: enable no-floating-promises ESLint rule for tests (#23376) 2023-06-02 21:59:12 +02:00
browsercontext-strict.spec.ts chore: group tests under tests/ (1) (#13081) 2022-03-25 16:05:50 -07:00
browsercontext-timezone-id.spec.ts chore: group tests under tests/ (1) (#13081) 2022-03-25 16:05:50 -07:00
browsercontext-user-agent.spec.ts test: enable user agent override for download in Chromium (#23479) 2023-06-02 15:02:54 -07:00
browsercontext-viewport-mobile.spec.ts test: fix webkit test on Darwin (#27029) 2023-09-12 15:01:44 -07:00
browsercontext-viewport.spec.ts fix(chromium): can get correct orientation angle on non-mobile devices (#23796) 2023-06-23 11:34:09 -07:00
browsertype-basic.spec.ts chore: skip tests that fail in cross-machine service mode (#24412) 2023-07-25 16:47:04 -07:00
browsertype-connect.spec.ts fix: preserve lastModified timestamp in setInputFiles (#27671) 2023-10-18 14:05:09 -07:00
browsertype-launch-selenium.spec.ts test: unskip selenium driver test (#23129) 2023-05-18 18:33:11 +02:00
browsertype-launch-server.spec.ts test: mark 'should fire close event' as fixme in MSEdge (#26712) 2023-08-25 23:57:56 +02:00
browsertype-launch.spec.ts test: update expectation on windows for "should reject if launched br… (#27603) 2023-10-13 14:02:55 -07:00
capabilities.spec.ts feat(webkit): roll to r1905 (#26909) 2023-09-07 07:41:46 +02:00
channels.spec.ts chore: do not leak internal page handles after closing page (#24169) 2023-07-12 14:51:13 -07:00
component-parser.spec.ts Fix various typos (Fixes #27396) (#27391) 2023-10-04 19:56:42 -07:00
css-parser.spec.ts chore: move sever/isomorphic to utils/ to use it in client (#21445) 2023-03-06 18:49:14 -08:00
debug-controller.spec.ts fix: remove connectInsteadOfLaunching (#26828) 2023-08-31 15:29:04 -07:00
defaultbrowsercontext-1.spec.ts chore: fix typos (#20473) 2023-01-30 09:53:28 +01:00
defaultbrowsercontext-2.spec.ts test: skip new tests that don't work in non-default mode (#22369) 2023-04-12 15:15:34 -07:00
download.spec.ts chore: break dowload.path() to throw (#27662) 2023-10-17 12:56:56 -07:00
downloads-path.spec.ts chore: align more ESLint rules with VSCode formatting (#16647) 2022-08-18 20:12:33 +02:00
emulation-focus.spec.ts test: mark some --headless=new tests as fixme (#27516) 2023-10-09 14:07:22 -07:00
favicon.spec.ts chore: fix typos (#20473) 2023-01-30 09:53:28 +01:00
fetch-proxy.spec.ts feat(chromium-tip-of-tree): roll to r1159 (#27605) 2023-10-17 22:41:23 +02:00
geolocation.spec.ts test: unflake a few tests (#15959) 2022-07-27 11:27:53 -07:00
global-fetch-cookie.spec.ts fix(fetch): restore from empty storage state (#27025) 2023-09-12 13:11:18 -07:00
global-fetch.spec.ts fix(fetch): JSON.stringify on client (#27644) 2023-10-16 16:33:49 -07:00
har.spec.ts Fix various typos (Fixes #27396) (#27391) 2023-10-04 19:56:42 -07:00
headful.spec.ts feat(firefox): roll to r1403 (#22540) 2023-04-21 21:45:41 -07:00
hit-target.spec.ts fix(hit target): workaround webkit elementsFromPoint bug (#21642) 2023-03-13 19:33:56 -07:00
ignorehttpserrors.spec.ts fix: emit load/domcontentloaded events as reported by the browser (#16861) 2022-08-26 13:48:05 -07:00
launcher.spec.ts chore: skip tests that fail in cross-machine service mode (#24412) 2023-07-25 16:47:04 -07:00
locator-generator.spec.ts feat: support alternative quotes in js parseLocator() (#27718) 2023-10-20 08:42:29 -07:00
logger.spec.ts test: run more tests in 'service' mode (#20734) 2023-02-07 18:25:33 -08:00
modernizr.spec.ts feat(webkit): roll to r1875 (#24299) 2023-07-19 18:24:21 +02:00
page-event-crash.spec.ts chore: migrate Promise.race to scopes to prevent leaks (#24160) 2023-07-11 10:38:08 -07:00
pdf.spec.ts chore: group tests under tests/ (1) (#13081) 2022-03-25 16:05:50 -07:00
permissions.spec.ts fix(webkit): support clipboard.readText (#27581) 2023-10-13 09:10:35 -07:00
playwright.config.ts chore: use stock image matcher in library tests (#27319) 2023-09-26 18:46:21 -07:00
popup.spec.ts chore: enable no-floating-promises ESLint rule for tests (#23376) 2023-06-02 21:59:12 +02:00
proxy-pattern.spec.ts feat(socks): support pattern similar to proxy bypass rules (#19387) 2022-12-12 12:27:34 -08:00
proxy.spec.ts feat(chromium-tip-of-tree): roll to r1159 (#27605) 2023-10-17 22:41:23 +02:00
resource-timing.spec.ts test: skip resource-timing WK tests on Windows (#20622) 2023-02-06 10:41:09 +01:00
role-utils.spec.ts fix(role): handle display:contents elements (#23607) 2023-06-08 16:00:48 -07:00
screenshot.spec.ts test: screenshot of css transformation (#26533) 2023-08-18 14:30:43 -07:00
selector-generator.spec.ts fix(selector generator): use the same label definition as getByLabel (#23846) 2023-06-22 08:34:08 -07:00
selectors-register.spec.ts fix(selectors): allow custom engines in out-of-process (#17139) 2022-09-06 14:15:53 -07:00
shared-worker.spec.ts fix(chromium): detach from shared workers (#18976) 2022-11-22 15:20:42 -08:00
signals.spec.ts test: fix macOS WebKit signals test (#26603) 2023-08-22 16:51:34 +02:00
slowmo.spec.ts chore: explicitly control actions with slow mo (#22445) 2023-04-17 16:19:30 -07:00
snapshotter.spec.ts fix(snapshot): invalidate style sheet upon CSSGroupingRule changes (#27296) 2023-09-25 14:34:17 -07:00
tap.spec.ts chore: fix typos (#20473) 2023-01-30 09:53:28 +01:00
trace-viewer.spec.ts test: unflake a few tests (#27519) 2023-10-10 09:14:58 -07:00
tracing.spec.ts test: unflake some more tests (#27546) 2023-10-11 10:34:11 -07:00
video.spec.ts chore: bump @babel dependencies (#27632) 2023-10-17 20:52:41 +02:00
web-socket.spec.ts chore: unify target closed errors (#27540) 2023-10-12 11:05:34 -07:00