Commit graph

194 commits

Author SHA1 Message Date
Dmitry Gozman 3cc839e013
fix(route): catch all Route methods when page closes (#10140)
This fixes a common scenario where you setup a route,
and the page closes (e.g. test ends) while we are aborting/continuing
some requests that are not instrumental to the test itself.
2021-11-08 15:13:15 -08:00
Pavel Feldman 4553d76fce
api(frame-locator): introduce frame locators (#10102) 2021-11-08 09:58:24 -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
Yury Semikhatsky 15a8b29961
test: goto finishes on window.stop() (#10070) 2021-11-05 16:51:22 -07:00
Pavel Feldman f3fd3ebc37
chore(frame-selector): add more tests, use frame logic in element handle (#10097) 2021-11-05 16:36:01 -07:00
Pavel Feldman f19864890f
feat(iframe): make iframe selectors work w/ element handles (#10063) 2021-11-05 11:06:04 -07:00
Yury Semikhatsky 83657a1df4
test: skip interception tests in electron (#10056) 2021-11-04 13:36:04 -07:00
Pavel Feldman 78e99249a3
feat(frame-selector): intial implementation (#10018) 2021-11-04 13:28:35 -07:00
github-actions[bot] 9b4d9460eb
feat(chromium): roll to r936784 (#9986) 2021-11-04 12:35:31 -07:00
Dmitry Gozman 2cfc997614
test: detach frame while clicking race (#10029) 2021-11-03 19:41:31 -07:00
Dmitry Gozman c373986ca0
fix(evaluate): reject all context operations when frame detaches (#9987) 2021-11-03 10:44:50 -07:00
Yury Semikhatsky 5abb5d74ea
chore: delete legacy response interception code (#9995) 2021-11-02 17:48:38 -07:00
Yury Semikhatsky 06cf7132be
test: unflake wheel test in ff (#9989) 2021-11-02 13:56:12 -07:00
Yury Semikhatsky 13cc266b37
feat: add "commit" to possible waitUntil options (#9892) 2021-11-01 17:12:19 -07:00
Pavel Feldman d79aae633c
feat(html): render the suite name before test title (#9909) 2021-11-01 10:53:42 -07:00
Dmitry Gozman 227e3da62f
fix(test runner): do not reuse worker that did not teardown scopes (#9872)
Two bug fixes:
- Do not use the worker that is being shutdown for a new job.
- Report unhandled errors during "expected to fail" tests as
  fatal errors.
2021-10-29 13:36:12 -07:00
Pavel Feldman 2e4722d460
test: migrate to upstream fixtures (#9835) 2021-10-28 08:31:30 -07:00
github-actions[bot] 9af5aaabbb
feat(firefox): roll to r1298 (#9848) 2021-10-28 07:41:58 -07:00
Pavel Feldman 31faa7d9a7
chore: sort out base fixtures (#9809) 2021-10-27 08:28:53 -07:00
Pavel Feldman 273122b761
chore: align internal test harness w/ @playwright/test (#9796) 2021-10-26 13:45:53 -07:00
Joel Einbinder deec8fd6c2
test(chromium): failing test for resolving responses after a navigation (#9651) 2021-10-21 08:29:04 -07:00
Max Schmitt ba2576c5b9
test: page.content() hangs when there is no iframe src (#9674) 2021-10-21 16:59:33 +02:00
Pavel Feldman 225145fc3e
fix(expect): do not fail on navigated frames while polling (#9659) 2021-10-20 13:01:05 -07:00
Andrey Lushnikov dddf70cead
tests: fix variety of tests (#9630) 2021-10-19 17:03:15 -07:00
Joel Einbinder 53c866c0f2
fix(monorepo): explicitly list package.json exports instead of using glob patterns (#9584) 2021-10-19 12:28:02 -04:00
Yury Semikhatsky 22fe1662c0
test: remove stray logging (#9589) 2021-10-18 11:13:18 -07:00
Yury Semikhatsky fd81982c33
fix(selectors): combine visible with other selectors (#9585) 2021-10-18 10:47:37 -07:00
Yury Semikhatsky a186278f2e
fix(selectors): empty text matcher (#9548) 2021-10-15 17:00:45 -07:00
Andrey Lushnikov 01c702adbb
chore: move "service" mode tests to experimental grid (#9531)
This patch moves service tests to use experimental grid.
Test changes:
- `proxy.spec.ts` - proxy setup is not supported at all in service mode.
  This is because we already use proxy for browsers to properly resolve
  localhost.
- `har.spec.ts` - tests disabled since connection port is different.
2021-10-15 16:11:53 -07:00
Yury Semikhatsky 25a8023720
test: popup event for pages opened from iframe (#9484) 2021-10-14 12:22:05 +02:00
github-actions[bot] c054d19a5d
feat(webkit): roll to r1562 (#9476)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2021-10-14 02:00:25 +02:00
Max Schmitt 94680a702d test: mark 'should fulfill with multiple set-cookie' as fixme on Electron 2021-10-12 10:59:39 +02:00
Joel Einbinder c89d5a50dd
chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
Ross Wollman a892fe6db0
test: request.sizes() sometimes hangs in CR (#9349) 2021-10-07 14:26:54 -07:00
Pavel Feldman 9b7e02b88b
test: add a couple more route+headers tests (#9322) 2021-10-06 09:35:54 -07:00
Pavel Feldman e8fdbbfa03
api: alias Fetch as ApiRequest (#9330) 2021-10-05 18:53:19 -07:00
Yury Semikhatsky 0a7b54abc3
test: set content-type to make test pass (#9331) 2021-10-05 18:30:07 -07:00
Ross Wollman dbc3c11b8e
test: responseSize incorrect for 404 with content (#9328) 2021-10-05 17:40:08 -07:00
Yury Semikhatsky 0469a7552b
fix(fetch): do not allow to call get/post with request (#9326) 2021-10-05 16:36:15 -07:00
Yury Semikhatsky 701a97beca
chore(fetch): unprefix _request and _newRequest (#9325) 2021-10-05 13:56:34 -07:00
Pavel Feldman 6e803f7186
fix(route): allow allHeaders call within route (#9300) 2021-10-04 16:10:16 -07:00
Yury Semikhatsky c516729544
fix(interception): make set-cookie work in chromium (#9299) 2021-10-04 13:19:05 -07:00
Pavel Feldman 913821f675
chore: roll Electron to 12.2.1 (#9271) 2021-10-01 19:40:47 -07:00
Yury Semikhatsky 1b4adfb916
fix(webkit): deduce response mime type from content-type (#9264) 2021-10-01 13:04:03 -07:00
Max Schmitt 1302e10637
test: fix 'should fulfill with fetch result and overrides' test (#9252) 2021-10-01 09:47:04 +02:00
Andrey Lushnikov c63348bd03
feat(webkit): roll WebKit to 1550 (#9239) 2021-09-30 10:41:09 -07:00
Pavel Feldman 2b055b3092
feat(api): introduce locator.waitFor (#9200) 2021-09-28 13:57:11 -07:00
Yury Semikhatsky ebe4e41606
test: add tests for Cross-Origin-Opener-Policy navigation (#9184) 2021-09-28 09:56:07 -07:00
Yury Semikhatsky 962547e716
test: get response body for COOP responses (#9196) 2021-09-28 09:54:05 -07:00
Yury Semikhatsky 6be908d959
test: canvas updates are reflected on screenshots (#9180) 2021-09-27 13:45:03 -07:00