Commit Graph

16 Commits

Author SHA1 Message Date
Max Schmitt
90e76f9adb
test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
Dmitry Gozman
62a032baa0
chore: remove env.PLAYWRIGHT_NO_LAYOUT_SHIFT_CHECK (#12605) 2022-03-08 16:42:39 -08:00
Dmitry Gozman
976dedda45
feat(input): restore modified layout shift check (#11032)
This changes previous layout shift attempt (see #9546)
to account for more valid usecases:
- On the first event that is intercepted we enforce the hit target. This
  is similar to the current mode that checks hit target before the action,
  but is better timed.
- On subsequent events we assume that everything is fine. This covers more
  scenarios like react rerender, glass pane on mousedown, detach on mouseup.

This check is enabled by default, with `process.env.PLAYWRIGHT_NO_LAYOUT_SHIFT_CHECK`
to opt out.
2022-01-03 17:46:04 -08:00
Andrey Lushnikov
b6c2b32b53
test: introduce #smoke tests (#11135)
This patch introduces 109 "#smoke" tests - a subset of tests that makes
sure that basic Playwright functionality works. This set is loosely
defined; feel free to add/remove tests to the set. The only goal is to
keep this set minimal & fast to run.

I tried to pick tests so that various parts of Playwright functionality
are exercised.
2021-12-29 18:51:28 -08:00
Dmitry Gozman
6e00af3b2e
fix(click): revert layout shift logic (#10653) 2021-12-01 12:54:20 -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
Joel Einbinder
c89d5a50dd
chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
Max Schmitt
cd22072685
chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
Max Schmitt
b88199d93e
test: fix locator-misc-1 tests on Android (#7985) 2021-08-04 20:11:17 +02:00
Dmitry Gozman
4c3bd11820
test: roll to folio@0.4.0-alpha14 (#6602) 2021-05-16 19:58:26 -07:00
Dmitry Gozman
5e84eade85
test: roll to folio@0.4.0-alpha13 (#6570) 2021-05-15 07:42:35 -07:00
Dmitry Gozman
76e409637a
test: simplify more tests (#6471) 2021-05-09 17:47:20 -07:00
Dmitry Gozman
de21a94b75
test: roll to folio@0.4.0-alpha6 (#6366) 2021-04-30 13:26:13 -07:00
Dmitry Gozman
11882cdda7
test: roll to folio@0.4.0-alpha3 (#6262) 2021-04-29 11:11:32 -07:00
Dmitry Gozman
6bdc67ac6a
feat(actions): trial option that only performs the checks (#6246)
Available for check, click, dblclick, hover, tap, uncheck.
2021-04-21 12:22:19 -07:00
Dmitry Gozman
4f7e7450e2
test: migrate last tests to new folio (#6071) 2021-04-05 09:18:56 -07:00