playwright/tests
Dmitry Gozman 61ff52704c
feat(input): perform hit target check during input (#9546)
This replaces previous `checkHitTarget` heuristic that took place before the action
with a new `setupHitTargetInterceptor` that works during the action:
- Before the action we set up capturing listeners on the window.
- During the action we ensure that event target is the element we expect to interact with.
- After the action we clear the listeners.

This should catch the "layout shift" issues where things move
between action point calculation and the actual action.

Possible issues:
- **Risk:** `{ trial: true }` might dispatch move events like `mousemove` or `pointerout`,
because we do actually move the mouse but prevent all other events.
- **Timing**: The timing of "hit target check" has moved, so this may affect different web pages
in different ways, for example expose more races. In this case, we should retry the click as before.
- **No risk**: There is still a possibility of mis-targeting with iframes shifting around,
because we only intercept in the target frame. This behavior does not change.

There is an opt-out environment variable PLAYWRIGHT_NO_LAYOUT_SHIFT_CHECK that reverts to previous behavior.
2021-11-05 17:31:28 -07:00
..
android test: migrate to upstream fixtures (#9835) 2021-10-28 08:31:30 -07:00
assets test: goto finishes on window.stop() (#10070) 2021-11-05 16:51:22 -07:00
chromium test: fix connectOverCDP with proxy on Windows (#10092) 2021-11-05 19:49:39 +01:00
config feat(html): live filtering, opt-out from auto-open (#9889) 2021-10-29 16:24:08 -07:00
electron test: migrate to upstream fixtures (#9835) 2021-10-28 08:31:30 -07:00
emulation-focus.spec.ts-snapshots test: roll to folio@0.4.0-alpha28 (#6918) 2021-06-04 20:54:58 -07:00
firefox test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
inspector chore: align internal test harness w/ @playwright/test (#9796) 2021-10-26 13:45:53 -07:00
page feat(input): perform hit target check during input (#9546) 2021-11-05 17:31:28 -07:00
playwright-test fix(trace): do not call tracing.stopChunk() twice (#10054) 2021-11-04 21:08:42 -07:00
screenshot.spec.ts-snapshots test: add screenshot test with hanging main resource (#9972) 2021-11-02 16:55:32 +01:00
trace-viewer fix(evaluate): reject all context operations when frame detaches (#9987) 2021-11-03 10:44:50 -07:00
beforeunload.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
browser.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-add-cookies.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
browsercontext-add-init-script.spec.ts test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
browsercontext-base-url.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
browsercontext-basic.spec.ts test: migrate to upstream fixtures (#9835) 2021-10-28 08:31:30 -07:00
browsercontext-clearcookies.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-cookies.spec.ts fix: support cookies with empty value (#9376) 2021-10-07 15:37:47 -07:00
browsercontext-credentials.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-csp.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-device.spec.ts test: migrate to upstream fixtures (#9835) 2021-10-28 08:31:30 -07:00
browsercontext-dsf.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-expose-function.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-fetch.spec.ts fix(fetch): post data for delete request (#10019) 2021-11-03 13:26:15 -07:00
browsercontext-locale.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-network-event.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-page-event.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-pages.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-proxy.spec.ts test: migrate to upstream fixtures (#9835) 2021-10-28 08:31:30 -07:00
browsercontext-route.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-set-extra-http-headers.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-storage-state.spec.ts fix: support cookies with empty value (#9376) 2021-10-07 15:37:47 -07:00
browsercontext-strict.spec.ts fix: strict mode on page.* methods on context level (#8324) 2021-08-19 23:08:28 +02:00
browsercontext-timezone-id.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-user-agent.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-viewport-mobile.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
browsercontext-viewport.spec.ts test: newContext works when both screen and viewport specified (#9520) 2021-10-18 10:45:47 -07:00
browsertype-basic.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
browsertype-connect.spec.ts fix: support even older node 12 (#9718) 2021-10-22 15:59:52 -04:00
browsertype-launch-selenium.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
browsertype-launch-server.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
browsertype-launch.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
capabilities.spec.ts feat(firefox): roll to r1296 (#9494) 2021-10-14 11:35:39 +02:00
channels.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
component-parser.spec.ts fix(monorepo): explicitly list package.json exports instead of using glob patterns (#9584) 2021-10-19 12:28:02 -04:00
css-parser.spec.ts fix(monorepo): explicitly list package.json exports instead of using glob patterns (#9584) 2021-10-19 12:28:02 -04:00
defaultbrowsercontext-1.spec.ts feat: mark PlaywrightClient's connection as remote (#9477) 2021-10-14 10:41:03 -07:00
defaultbrowsercontext-2.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
download.spec.ts feat(firefox): roll to r1299 (#9932) 2021-11-02 00:23:16 +01:00
downloads-path.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
emulation-focus.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
favicon.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
geolocation.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
global-fetch-cookie.spec.ts chore(fetch): rename ApiRequest* to APIRequest* (#9606) 2021-10-19 07:38:27 -07:00
global-fetch.spec.ts test: migrate to upstream fixtures (#9835) 2021-10-28 08:31:30 -07:00
har.spec.ts fix: support even older node 12 (#9718) 2021-10-22 15:59:52 -04:00
headful.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
hit-target.spec.ts feat(input): perform hit target check during input (#9546) 2021-11-05 17:31:28 -07:00
ignorehttpserrors.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
index.d.ts test: added tests for WebSocket over Socks proxy (#7235) 2021-06-24 18:50:16 +02:00
launcher.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
logger.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
modernizr.spec.ts feat(webkit): roll WebKit to 1521 (#7798) 2021-07-23 09:13:57 -07:00
pdf.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
permissions.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
popup.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
port-forwarding-server.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
proxy.spec.ts test: remove browserOptions (#9829) 2021-10-27 19:00:06 -07:00
resource-timing.spec.ts test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
screenshot.spec.ts test: add screenshot test with hanging main resource (#9972) 2021-11-02 16:55:32 +01:00
selector-generator.spec.ts chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
selectors-register.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
signals.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
slowmo.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
snapshotter.spec.ts fix(snapshot): empty adopted stylesheet should not prevent node refs (#9731) 2021-10-23 16:26:46 -07:00
tap.spec.ts feat(input): perform hit target check during input (#9546) 2021-11-05 17:31:28 -07:00
tracing.spec.ts chore: align internal test harness w/ @playwright/test (#9796) 2021-10-26 13:45:53 -07:00
tsconfig.json fix: support even older node 12 (#9718) 2021-10-22 15:59:52 -04:00
video.spec.ts tests: disable video tests on Firefox + Tracing (#10096) 2021-11-05 15:15:46 -07:00
web-socket.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00