Commit Graph

7 Commits

Author SHA1 Message Date
Pavel Feldman 8bfd0eb6e4
chore: introduce clock test mode (#31110) 2024-05-31 14:44:26 -07:00
Dmitry Gozman 4046d154ae
test: unflake and enable some Firefox tests (#30461)
Fixes #30399.
2024-04-22 11:25:10 -07:00
Dmitry Gozman e6d51cf7bd
chore: refactor actionability check to go through node-side retry (#28982)
This allows to inject a checkpoint in between the actionability checks.

Drive-by: cleanup `InjectedScriptPoll`-related code.
2024-01-16 19:11:41 -08:00
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
Max Schmitt cd22072685
chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
Dmitry Gozman 217cbe3e21
test: cleanup bad usages of pageTest (#6430) 2021-05-06 07:08:22 -07:00
Dmitry Gozman 9433cae4fe
test: move all page tests to a subdirectory (#6427) 2021-05-05 19:10:28 -07:00