playwright/tests
Ross Wollman abd4258080
chery-pick(#14267): fix: page.locator.focus() and page.locator(…).type(…) (#14296)
cherry-pick of fbb364c1cd0dec9e4a75b885d51e67ca397b1d6a:

Fixes focus and blur management when `page.locator(…).focus()`  and  `page.locator(…).type(…)` are used which was regressed by 7a5b070 (#13510).

However, some elements are [not focusable](https://html.spec.whatwg.org/multipage/interaction.html#focusable-area), so we were blurring incorrectly, and losing focus that we should have maintained.

Two regression tests were added that pass on the commit prior to 7a5b070e95 (and match manual testing/expectations):

* `page.locator(…).focus()`: _keeps focus on element when attempting to focus a non-focusable element_
* `page.locator(…).type(…)`: _should type repeatedly in input in shadow dom_

Additionally, a third test (_should type repeatedly in input in shadow dom_) was added to check the invariant from #13510 that states:

> This affects [contenteditable] elements, but not input elements.

and allows us to introduce the targeted fix (contenteditble check before blur) without breaking FF again.

And _should type repeatedly in contenteditable in shadow dom with nested elements_ was added to ensure the above fix works with nest contenteditble detection.

Fixes #14254.
2022-05-19 15:19:39 -07:00
..
android chore: hide plugins for now (#13908) 2022-05-03 14:25:56 -07:00
assets chore: make React selectors work on React 18 (#13864) 2022-05-03 13:46:52 -07:00
components test(ct): test react native events (#14079) 2022-05-10 14:01:06 -07:00
config cherry-pick(#14200): chore: fix wrong toHaveScreenshot defaults in docs (#14201) 2022-05-17 07:42:20 +03:00
electron chore: hide plugins for now (#13908) 2022-05-03 14:25:56 -07:00
installation devops: follow-up with installation tests on flakienss dashbaord (#14015) 2022-05-07 09:17:07 -07:00
library test: make "outerWidth and outerHeight" test work on small screens (#14124) 2022-05-12 18:46:03 +01:00
page chery-pick(#14267): fix: page.locator.focus() and page.locator(…).type(…) (#14296) 2022-05-19 15:19:39 -07:00
playwright-test cherry-pick(#14174): fix(types): fix the toHaveScreenshot types (#14194) 2022-05-16 08:32:38 -07:00
index.d.ts test: added tests for WebSocket over Socks proxy (#7235) 2021-06-24 18:50:16 +02:00
tsconfig.json chore: group tests under tests/ (2) (#13082) 2022-03-25 23:09:02 -07:00