playwright/tests/library
Dmitry Gozman 773202867d
feat(trace): highlight strict mode violation elements in the snapshot (#32893)
This is fixing a case where the test failed with strict mode violation,
but all the matched elements are not highlighted in the trace.

For example, all the buttons will be highlighted when the following line
fails due to strict mode violation:
```ts
await page.locator('button').click();
```

To achieve this, we mark elements during `querySelector` phase instead
of inside `onBeforeInputAction`. This allows us to only mark from inside
the `InjectedScript` and remove the other way of marking from inside the
`Snapshotter`.
2024-10-02 00:00:45 -07:00
..
chromium test: brush up fixtures, unflake some tests (#32854) 2024-09-27 07:06:37 -07:00
emulation-focus.spec.ts-snapshots feat(webkit): roll to r1674 (#15384) 2022-07-08 11:07:06 -07:00
events feat(events): allow waiting for removeAllListeners (#31941) 2024-08-05 21:14:35 -07:00
firefox feat: support firefoxUserPrefs in launchPersistentContext (#27840) 2023-10-27 09:24:41 -07:00
inspector chore: more codegen fixes (#32816) 2024-09-25 18:18:36 -07: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: make tests strict (1) (#27731) 2023-10-23 09:31:30 -07:00
browsercontext-add-cookies.spec.ts chore: fix simulated clock bots (#31301) 2024-06-17 09:17:38 -07:00
browsercontext-add-init-script.spec.ts chore: make tests strict (1) (#27731) 2023-10-23 09:31:30 -07:00
browsercontext-base-url.spec.ts chore: make tests strict (1) (#27731) 2023-10-23 09:31:30 -07:00
browsercontext-basic.spec.ts feat(firefox): roll ff and ff-beta to 1442 (#29751) 2024-02-29 14:44:45 -08:00
browsercontext-clearcookies.spec.ts chore: move filter params into the clearCookies (#30111) 2024-03-26 08:12:26 -07:00
browsercontext-cookies.spec.ts test: brush up fixtures, unflake some tests (#32854) 2024-09-27 07:06:37 -07:00
browsercontext-credentials.spec.ts chore: make tests strict (1) (#27731) 2023-10-23 09:31:30 -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: make tests strict (1) (#27731) 2023-10-23 09:31:30 -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 chore: introduce clock test mode (#31110) 2024-05-31 14:44:26 -07:00
browsercontext-expose-function.spec.ts chore: make tests strict (1) (#27731) 2023-10-23 09:31:30 -07:00
browsercontext-fetch-algorithms.spec.ts chore(fetch): pass flush and finishFlush options to brotli (#31833) 2024-07-23 18:28:34 -07:00
browsercontext-fetch-happy-eyeballs.spec.ts test: unflake happy-eyeballs tests (#31861) 2024-07-25 20:22:51 +02:00
browsercontext-fetch.spec.ts feat(webkit): roll to r2083 (#32813) 2024-09-26 21:49:02 +02:00
browsercontext-har.spec.ts fix(har): ignore boundary when matching multipart/form-data body (#31672) 2024-07-12 16:59:48 -07:00
browsercontext-locale.spec.ts test: locale/timeZone should affect Intl.DateTimeFormat() (#27898) 2023-11-01 17:29:57 +01:00
browsercontext-network-event.spec.ts test: unflake two tests (#32879) 2024-09-30 07:49:18 -07:00
browsercontext-page-event.spec.ts feat(ctrl_or_meta): add a universal ctrl-meta modifier (#30572) 2024-04-29 08:15:12 -07:00
browsercontext-pages.spec.ts chore: make tests strict (1) (#27731) 2023-10-23 09:31:30 -07:00
browsercontext-proxy.spec.ts test: unskip various proxy tests (#32595) 2024-09-12 20:31:22 +02:00
browsercontext-reuse.spec.ts Revert "feat(tracing): add .pwtrace to trace file extension" (#32648) 2024-09-17 15:32:30 +02:00
browsercontext-route.spec.ts feat(webkit): roll to r2014 (#31074) 2024-05-29 17:20:38 -07:00
browsercontext-service-worker-policy.spec.ts fix: don't throw error on about:blank when blocking ServiceWorker (#32310) 2024-08-26 08:27:21 -07: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 feat(webkit): roll to r2080 (#32721) 2024-09-20 08:28:46 -07: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 test: locale/timeZone should affect Intl.DateTimeFormat() (#27898) 2023-11-01 17:29:57 +01:00
browsercontext-user-agent.spec.ts fix(chromium): emulate navigator.userAgentData along with UA (#29159) 2024-01-25 07:34:11 -08:00
browsercontext-viewport-mobile.spec.ts test: update Modernizer tests to Safari 18 (#32290) 2024-08-23 16:59:55 +02:00
browsercontext-viewport.spec.ts test: brush up fixtures, unflake some tests (#32854) 2024-09-27 07:06:37 -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 test: brush up fixtures, unflake some tests (#32854) 2024-09-27 07:06:37 -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 feat(api): add host option in launchServer options (#30999) 2024-05-27 11:24:23 +02:00
browsertype-launch.spec.ts chore: introduce clock test mode (#31110) 2024-05-31 14:44:26 -07:00
capabilities.spec.ts test: skip avif test on linux/webkit (#32869) 2024-09-30 10:30:45 +02:00
channels.spec.ts chore: split firefox and chromium bidi implementations (#32478) 2024-09-05 18:31:56 -07:00
client-certificates.spec.ts test: brush up fixtures, unflake some tests (#32854) 2024-09-27 07:06:37 -07:00
clock.spec.ts fix(clock): don't throw for |null| or |undefined| callbacks (#32309) 2024-08-26 09:26:38 -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 chore: unflake 'should record' (#32880) 2024-09-30 20:32:04 +02:00
defaultbrowsercontext-1.spec.ts chore: fix typos (#20473) 2023-01-30 09:53:28 +01:00
defaultbrowsercontext-2.spec.ts chore: use base BrowserType to reference browser types (#32125) 2024-08-12 22:20:58 -07:00
download.spec.ts chore: mark outofprocess connection not as remote (#28156) 2023-12-06 17:58:19 -08: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: unflake and enable some Firefox tests (#30461) 2024-04-22 11:25:10 -07:00
favicon.spec.ts chore: fix typos (#20473) 2023-01-30 09:53:28 +01:00
fetch-proxy.spec.ts test: unflake two tests (#32879) 2024-09-30 07:49:18 -07: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): fallback to given URL if baseURL is invalid (#32911) 2024-10-01 22:43:32 +02:00
har.spec.ts feat(har): record serverIPAddress for API requests (#32660) 2024-09-18 14:51:42 +02:00
headful.spec.ts chore: fix simulated clock bots (#31301) 2024-06-17 09:17:38 -07:00
hit-target.spec.ts feat: increase length of printed html tags (#31105) 2024-05-31 10:45:56 -07:00
ignorehttpserrors.spec.ts test: using ServiceWorker on localhost over HTTPS (#27863) 2023-10-31 10:28:57 +01: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 chore: use contentFrame() as a canonical locator representation (#32697) 2024-09-18 20:15:01 -07:00
logger.spec.ts test: run more tests in 'service' mode (#20734) 2023-02-07 18:25:33 -08:00
modernizr.spec.ts test: skip WebKit WebGL tests on Intel macOS (#32784) 2024-09-24 11:55:17 +02:00
page-clock.frozen.spec.ts test: move page-clock tests into library/ tests folder (#31752) 2024-07-18 14:45:45 +02:00
page-clock.spec.ts test: move page-clock tests into library/ tests folder (#31752) 2024-07-18 14:45:45 +02:00
page-event-crash.spec.ts test: update Electron to v30 (#30334) 2024-06-21 00:43:26 +02:00
pdf.spec.ts feat(chromium): expose parameters to generate outline / tagged PDF (#29494) 2024-02-15 17:28:04 +01:00
permissions.spec.ts chore: remove same-site expectations for old browsers (#32334) 2024-08-26 18:41:58 -07:00
playwright.config.ts chore: allow starting recorder in traceviewer (#32741) 2024-09-20 15:25:49 -07:00
popup.spec.ts chore: introduce clock test mode (#31110) 2024-05-31 14:44:26 -07: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(client-certificates): add support for proxies (#32611) 2024-09-16 17:57:33 +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 chore: generate simple dom descriptions in codegen (#32333) 2024-08-27 11:52:14 -07:00
route-web-socket.spec.ts feat(routeWebSocket): address api review feedback (#32850) 2024-09-27 04:01:31 -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): do not reparent to invisible ancestor (#31590) 2024-07-08 09:07:25 -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: brush up fixtures, unflake some tests (#32854) 2024-09-27 07:06:37 -07:00
slowmo.spec.ts chore: make tests strict (1) (#27731) 2023-10-23 09:31:30 -07:00
snapshotter.spec.ts feat(trace): highlight strict mode violation elements in the snapshot (#32893) 2024-10-02 00:00:45 -07:00
tap.spec.ts chore: deprecate/remove noWaitAfter from some actions (#31739) 2024-07-18 00:19:08 -07:00
trace-viewer.spec.ts feat(trace): highlight strict mode violation elements in the snapshot (#32893) 2024-10-02 00:00:45 -07:00
tracing.spec.ts feat: do not record route calls in the trace (#32723) 2024-09-21 10:17:59 -07:00
unroute-behavior.spec.ts chore: extract unroute behavior tests into a separate file (#28674) 2023-12-15 15:37:57 -08:00
video.spec.ts Revert "feat(tracing): add .pwtrace to trace file extension" (#32648) 2024-09-17 15:32:30 +02:00
web-socket.spec.ts chore: unify target closed errors (#27540) 2023-10-12 11:05:34 -07:00