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
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
browsercontext-base-url.spec.ts
browsercontext-basic.spec.ts chore: unify target closed errors (#27540) 2023-10-12 11:05:34 -07:00
browsercontext-clearcookies.spec.ts
browsercontext-cookies.spec.ts
browsercontext-credentials.spec.ts test: unflake "should fail without credentials" (#27606) 2023-10-13 14:15:12 -07:00
browsercontext-csp.spec.ts
browsercontext-device.spec.ts
browsercontext-dsf.spec.ts
browsercontext-events.spec.ts Fix various typos (Fixes #27396) (#27391) 2023-10-04 19:56:42 -07:00
browsercontext-expose-function.spec.ts
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
browsercontext-locale.spec.ts
browsercontext-network-event.spec.ts
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
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
browsercontext-timezone-id.spec.ts
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
debug-controller.spec.ts fix: remove connectInsteadOfLaunching (#26828) 2023-08-31 15:29:04 -07:00
defaultbrowsercontext-1.spec.ts
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
fetch-proxy.spec.ts feat(chromium-tip-of-tree): roll to r1159 (#27605) 2023-10-17 22:41:23 +02:00
geolocation.spec.ts
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
ignorehttpserrors.spec.ts
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
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
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
proxy.spec.ts feat(chromium-tip-of-tree): roll to r1159 (#27605) 2023-10-17 22:41:23 +02:00
resource-timing.spec.ts
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
shared-worker.spec.ts
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
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