playwright/packages/playwright-core/src/utils
Dmitry Gozman 97d55e275d
fix(locator): locator(locator) method uses internal:chain instead of >> (#24235)
Usually, we can just chain two locators with `>>` to implement
`Locator.locator(locator)`. However, this does not play nicely with more
advanced inner locators like `or` and `and`:

```ts
const child = page.locator('input').or(page.locator('button'));
page.locator('parent').locator(child);
```

One would expect the above to locate "input or button" inside a
"parent". However, currently it locates "input inside a parent" or
"button", because it's translated to `parent >> input >>
internal:or="button"`.

To fix this, we have to wrap inner locator into `internal:chain` and
query it separately from the parent.

Fixes #23724.
2023-07-14 12:21:45 -07:00
..
isomorphic fix(locator): locator(locator) method uses internal:chain instead of >> (#24235) 2023-07-14 12:21:45 -07:00
ascii.ts fix: encode launch options correctly when reusing browser (#24174) 2023-07-12 16:40:55 +02:00
comparators.ts chore: validate expected image buffer when comparing images (#23030) 2023-05-15 23:32:16 +02:00
crypto.ts chore: merge the util exports (#20110) 2023-01-13 13:50:38 -08:00
debug.ts chore(ui): start adding ui mode tests (#21601) 2023-03-12 15:18:47 -07:00
DEPS.list feat: implement a new image comparison function (#19166) 2022-12-02 15:22:05 -08:00
env.ts chore: update error message when using wrong cli (#23512) 2023-06-05 09:51:08 -07:00
eventsHelper.ts chore: always import type (#13365) 2022-04-06 14:57:14 -07:00
fileUtils.ts chore: make generated report writable (#18750) 2022-11-13 12:46:35 -08:00
glob.ts fix(route): handle escapes in the glob pattern (#23932) 2023-06-28 16:33:04 -07:00
happy-eyeballs.ts fix(socks): use happy-eyeballs to create a connection (#21847) 2023-03-21 14:12:24 -07:00
headers.ts chore: merge the util exports (#20110) 2023-01-13 13:50:38 -08:00
hostPlatform.ts feat: support Chromium installation on Debian 12 (#24090) 2023-07-06 22:41:36 -07:00
httpServer.ts chore: make trace viewer work over http (#23531) 2023-06-05 16:30:30 -07:00
index.ts chore: render test steps in the trace (#22837) 2023-05-05 15:12:18 -07:00
linuxUtils.ts chore: add support for debian 11 downloads (#15596) 2022-07-13 04:09:24 -07:00
manualPromise.ts chore: migrate Promise.race to scopes to prevent leaks (#24160) 2023-07-11 10:38:08 -07:00
mimeType.ts fix(store): support text and binary values (#21006) 2023-03-01 08:49:31 -08:00
multimap.ts fix: make viewer reference all trace urls (#16561) 2022-08-15 20:54:57 -07:00
network.ts chore: createHttpServer that destroys sockets upon close (#23294) 2023-05-26 07:03:41 -07:00
processLauncher.ts chore: replace sigint handler per browser with a single one (#23317) 2023-05-30 13:54:04 -07:00
processLauncherCleanupEntrypoint.ts fix(process launcher): use spawnSync to cleanup synchronously (#13769) 2022-04-27 15:01:30 +01:00
profiler.ts feat: support PWTEST_PROFILE_DIR in run-server (#21582) 2023-03-10 19:07:40 -08:00
rtti.ts chore: merge the util exports (#20110) 2023-01-13 13:50:38 -08:00
spawnAsync.ts chore: use utils via index export (5) (#13413) 2022-04-07 20:18:22 -07:00
stackTrace.ts chore: extend raw stack (#22794) 2023-05-03 13:53:02 -07:00
task.ts chore: merge the util exports (#20110) 2023-01-13 13:50:38 -08:00
time.ts chore: merge the util exports (#20110) 2023-01-13 13:50:38 -08:00
timeoutRunner.ts chore: enable tsc for ttest sources (#21018) 2023-02-19 11:18:07 -08:00
traceUtils.ts chore: introduce ReporterV2 interface (#23983) 2023-06-30 13:36:50 -07:00
userAgent.ts chore: merge the util exports (#20110) 2023-01-13 13:50:38 -08:00
zipFile.ts chore(har): allow replaying from zip har (#14962) 2022-06-17 16:11:22 -07:00
zones.ts chore: make client-side instrumentation non-nullable (#22694) 2023-04-28 08:57:43 -07:00