playwright/tests/page
João Neves 7e6e5f0706
feat: Support React forwards refs and memo (#23262)
This PR fixes the react selector behavior to support components that are
wrapped by the memo or forwardRef React builtin functions.

Previously these components couldn't be selected. This PR fixes that
behavior, enabling selecting those components.

Current behavior:
```
const Foo = memo(() => <div id="foo_component" />);
Foo.displayName = "Foo";
...
playwright.$("_react=Foo") -> undefined
```

Fixed behavior:
```
const Foo = memo(() => <div id="foo_component" />);
Foo.displayName = "Foo";
...
playwright.$("_react=Foo") -> <div id ="foo_component" />
```
2023-05-30 17:14:47 -07:00
..
elementhandle-screenshot.spec.ts-snapshots feat(webkit): roll to r1674 (#15384) 2022-07-08 11:07:06 -07:00
locator-misc-2.spec.ts-snapshots feat(webkit): roll to r1674 (#15384) 2022-07-08 11:07:06 -07:00
page-request-fulfill.spec.ts-snapshots test: roll to folio@0.4.0-alpha28 (#6918) 2021-06-04 20:54:58 -07:00
page-screenshot.spec.ts-snapshots feat(screenshot): Add customizable color option for masked elements (#23185) 2023-05-22 18:44:44 -07:00
elementhandle-bounding-box.spec.ts chore: set min viewport for WK on Win to 250x240 (#22969) 2023-05-14 16:59:15 +02:00
elementhandle-click.spec.ts test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
elementhandle-content-frame.spec.ts test: cleanup bad usages of pageTest (#6430) 2021-05-06 07:08:22 -07:00
elementhandle-convenience.spec.ts test: put existing retarget tests to a separate file (#16510) 2022-08-12 12:40:40 -07:00
elementhandle-eval-on-selector.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
elementhandle-misc.spec.ts feat(clear): remove clear() methods from all classes except Locator (#18703) 2022-11-10 12:29:14 -08:00
elementhandle-owner-frame.spec.ts chore: roll Electron to 16.2.8 (#16017) 2022-07-28 15:41:32 +02:00
elementhandle-press.spec.ts feat(webkit): roll to r1616 (#12541) 2022-03-06 12:22:47 +01:00
elementhandle-query-selector.spec.ts chore: roll Electron to 16.2.8 (#16017) 2022-07-28 15:41:32 +02:00
elementhandle-screenshot.spec.ts fix: make sure screenshots work when main page context is tampered (#20615) 2023-02-03 10:01:23 -08:00
elementhandle-scroll-into-view.spec.ts fix(click): make it work for display:contents elements (#16356) 2022-08-08 16:05:09 -07:00
elementhandle-select-text.spec.ts test: update selection expectations after roll (#21124) 2023-02-22 17:24:04 -08:00
elementhandle-type.spec.ts feat(webkit): roll to r1616 (#12541) 2022-03-06 12:22:47 +01:00
elementhandle-wait-for-element-state.spec.ts test: put existing retarget tests to a separate file (#16510) 2022-08-12 12:40:40 -07:00
eval-on-selector-all.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
eval-on-selector.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
expect-boolean.spec.ts feat(expect): expect(locator).toBeAttached() (#22067) 2023-03-29 11:09:17 -07:00
expect-misc.spec.ts fix(expect): do not produce logs twice (#22171) 2023-04-03 15:05:40 -07:00
expect-timeout.spec.ts fix(expect): report expect "Timed out" when it actually does (#22174) 2023-04-03 15:06:13 -07:00
expect-to-have-text.spec.ts revert(#12706): also fix related bugs it introduced (#21070) 2023-02-21 14:15:11 -08:00
expect-to-have-value.spec.ts test: migrate some expect() tests to be more readable (#16394) 2022-08-10 15:10:25 -07:00
frame-evaluate.spec.ts feat(innerloop): allow reusing browsers over the remote connection (#16065) 2022-07-31 14:31:17 -07:00
frame-frame-element.spec.ts fix(frameElement): should work for frames inside closed shadow root (#17055) 2022-09-06 08:52:25 -07:00
frame-goto.spec.ts feat(firefox): roll Firefox to 1387 (#21542) 2023-03-10 09:25:54 -08:00
frame-hierarchy.spec.ts test: update stale test expectations (#20423) 2023-01-27 21:52:34 -08:00
interception.spec.ts feat(firefox-beta): roll to r1408 (#22978) 2023-05-12 09:27:08 -07:00
jshandle-as-element.spec.ts test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
jshandle-evaluate.spec.ts test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
jshandle-json-value.spec.ts chore: serialize circular objects (#14045) 2022-05-09 18:51:53 -07:00
jshandle-properties.spec.ts test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
jshandle-to-string.spec.ts fix: better formatting for sparse arrays (#20379) 2023-01-27 05:07:55 -08:00
locator-click.spec.ts feat(firefox): roll to r1396 (#22327) 2023-04-11 08:49:44 -07:00
locator-convenience.spec.ts fix(actions): ignore indeterminate for isChecked api (#20834) 2023-02-10 18:56:45 -08:00
locator-element-handle.spec.ts test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
locator-evaluate.spec.ts test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
locator-frame.spec.ts fix(waitFor): when frameLocator does not match, resolve hidden/detached states (#22119) 2023-03-31 10:54:07 -07:00
locator-highlight.spec.ts fix(highlight): fix the testing harness to be real (#18294) 2022-10-24 15:01:48 -07:00
locator-is-visible.spec.ts fix(isVisible): return false during navigation (#22943) 2023-05-10 16:56:59 -07:00
locator-list.spec.ts chore: withdraw locator.enumerate (#19484) 2022-12-15 10:13:56 -08:00
locator-misc-1.spec.ts feat(api): add clear() (#18296) 2022-10-25 12:56:11 -07:00
locator-misc-2.spec.ts feat: allow chaining locators with Locator.locator(anotherLocator) (#21391) 2023-03-03 14:50:53 -08:00
locator-query.spec.ts feat(locators): reland locator.and(locator) (#22850) 2023-05-05 11:14:01 -07:00
matchers.misc.spec.ts test: unskip working Android tests (#16171) 2022-08-02 22:51:10 +02:00
network-post-data.spec.ts test: unskip working Android tests (#16171) 2022-08-02 22:51:10 +02:00
page-accessibility.spec.ts feat(webkit): roll to r1848 (#23032) 2023-05-16 12:13:58 +02:00
page-add-init-script.spec.ts fix(addInitScript): tolerate trailing comments (#13275) 2022-04-03 18:47:12 -07:00
page-add-script-tag.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
page-add-style-tag.spec.ts test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
page-autowaiting-basic.spec.ts chore: move TestServer under test/ (#23287) 2023-05-25 15:11:16 -07:00
page-autowaiting-no-hang.spec.ts chore: roll Electron to 16.2.8 (#16017) 2022-07-28 15:41:32 +02:00
page-basic.spec.ts chore: fix all Proxy() to account for symbol properties (#21272) 2023-02-28 12:45:14 -08:00
page-check.spec.ts docs: remove the networkidle mentions (#22906) 2023-05-09 09:34:57 -07:00
page-click-during-navigation.spec.ts test: improve click-during-navigation (#11252) 2022-01-07 12:12:24 -08:00
page-click-react.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
page-click-scroll.spec.ts test: make Android bots green (#21450) 2023-03-07 17:53:39 +01:00
page-click-timeout-1.spec.ts chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
page-click-timeout-2.spec.ts test: fix visibility spelling in test (#11476) 2022-01-19 14:46:27 +01:00
page-click-timeout-3.spec.ts feat(input): perform hit target check during input (#9546) 2021-11-05 17:31:28 -07:00
page-click-timeout-4.spec.ts feat(input): perform hit target check during input (#9546) 2021-11-05 17:31:28 -07:00
page-click.spec.ts feat(firefox): roll to r1403 (#22540) 2023-04-21 21:45:41 -07:00
page-close.spec.ts test: add initial webview2 tests (#16827) 2022-09-07 20:09:22 +02:00
page-dialog.spec.ts test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
page-dispatchevent.spec.ts feat: dispatch wheel event (#15593) 2022-07-12 17:17:45 -07:00
page-drag.spec.ts feat(firefox): roll to r1394 (#22199) 2023-04-05 11:39:23 -07:00
page-emulate-media.spec.ts chore: allow not overriding media when creating context (#18413) 2022-10-31 09:09:52 -07:00
page-evaluate-handle.spec.ts chore: serialize circular objects (#14045) 2022-05-09 18:51:53 -07:00
page-evaluate-no-stall.spec.ts feat(innerloop): allow reusing browsers over the remote connection (#16065) 2022-07-31 14:31:17 -07:00
page-evaluate.spec.ts chore: make evaluate work with busted Array.prototype.map/push (#22528) 2023-04-21 19:52:13 +02:00
page-event-console.spec.ts docs: remove the networkidle mentions (#22906) 2023-05-09 09:34:57 -07:00
page-event-load.spec.ts fix(events): avoid firing lifecycle events twice (#16055) 2022-07-29 12:44:04 -07:00
page-event-network.spec.ts chore: fix typos (#20473) 2023-01-30 09:53:28 +01:00
page-event-pageerror.spec.ts chore: roll Electron to 16.2.8 (#16017) 2022-07-28 15:41:32 +02:00
page-event-popup.spec.ts feat: make console/dialog events based on subscription (#22835) 2023-05-05 11:12:33 -07:00
page-event-request.spec.ts test: enable passing request type test (#23273) 2023-05-25 09:43:41 -07:00
page-expose-function.spec.ts chore: make evaluate work with busted Array.prototype.map/push (#22528) 2023-04-21 19:52:13 +02:00
page-fill.spec.ts chore: make input actions not use rerunnable task (#19638) 2022-12-24 10:40:36 -08:00
page-focus.spec.ts tests(fixit): garden win/webkit/input tests (#14721) 2022-06-08 14:13:39 -08:00
page-goto.spec.ts test: fix service tests (#22111) 2023-03-31 10:58:08 -07:00
page-history.spec.ts feat(firefox): roll Firefox to 1387 (#21542) 2023-03-10 09:25:54 -08:00
page-keyboard.spec.ts test: update context menu tests (#21126) 2023-02-22 17:22:56 -08:00
page-leaks.spec.ts chore: don't leak from waitFor (#22465) 2023-04-18 11:11:46 -07:00
page-mouse.spec.ts test: update context menu tests (#21126) 2023-02-22 17:22:56 -08:00
page-navigation.spec.ts fix: do not hang on submitting target=_blank form (#20458) 2023-01-30 11:13:56 -08:00
page-network-idle.spec.ts chore: move TestServer under test/ (#23287) 2023-05-25 15:11:16 -07:00
page-network-request.spec.ts chore: align more ESLint rules with VSCode formatting (#16647) 2022-08-18 20:12:33 +02:00
page-network-response.spec.ts test: update stale test expectations (#20423) 2023-01-27 21:52:34 -08:00
page-network-sizes.spec.ts chore: roll Electron to 16.2.8 (#16017) 2022-07-28 15:41:32 +02:00
page-object-count.spec.ts chore: implement jsHandle._objectCount in chromium (#22127) 2023-03-31 15:52:01 -07:00
page-request-continue.spec.ts test: update stale test expectations (#20423) 2023-01-27 21:52:34 -08:00
page-request-fallback.spec.ts chore: route.fetch(postData) (#19436) 2022-12-13 14:01:39 -08:00
page-request-fulfill.spec.ts test: run more tests in 'service' mode (#20734) 2023-02-07 18:25:33 -08:00
page-request-intercept.spec.ts feat(route): accept timeout to fetch (#22475) 2023-04-20 08:41:33 -07:00
page-route.spec.ts fix(unroute): do not compare regexp instances (#23101) 2023-05-17 16:27:32 -07:00
page-screenshot.spec.ts feat(screenshot): Add customizable color option for masked elements (#23185) 2023-05-22 18:44:44 -07:00
page-select-option.spec.ts chore: match selected options by both value and label (#19316) 2022-12-07 09:04:32 -08:00
page-set-content.spec.ts test: disable page/page-set-content.spec.ts:126 in webkit (#16596) 2022-08-16 15:31:30 -07:00
page-set-extra-http-headers.spec.ts test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
page-set-input-files.spec.ts fix: should be able to upload multiple large files (#23360) 2023-05-30 18:41:09 +02:00
page-strict.spec.ts fix(codegen): update priorites in selector generator (#18688) 2022-11-09 17:22:13 -08:00
page-wait-for-function.spec.ts fix(evaluate): reject all context operations when frame detaches (#9987) 2021-11-03 10:44:50 -07:00
page-wait-for-load-state.spec.ts test: update stale test expectations (#20423) 2023-01-27 21:52:34 -08:00
page-wait-for-navigation.spec.ts feat(firefox): roll Firefox to 1387 (#21542) 2023-03-10 09:25:54 -08:00
page-wait-for-request.spec.ts test: increase small timeouts to accomodate two workers (#15257) 2022-06-30 09:05:39 -07:00
page-wait-for-response.spec.ts test: increase small timeouts to accomodate two workers (#15257) 2022-06-30 09:05:39 -07:00
page-wait-for-selector-1.spec.ts chore: migrate waitForSelector to not use rerunnable task (#19715) 2022-12-27 13:39:35 -08:00
page-wait-for-selector-2.spec.ts chore: migrate waitForSelector to not use rerunnable task (#19715) 2022-12-27 13:39:35 -08:00
page-wait-for-url.spec.ts test: update tests for waituntil:commit (#20042) 2023-01-11 10:16:51 -08:00
pageTest.ts test: add initial webview2 tests (#16827) 2022-09-07 20:09:22 +02:00
pageTestApi.ts feat: Adding trace option 'on-all-retries' (#21985) 2023-03-31 13:04:24 -07:00
queryselector.spec.ts test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
retarget.spec.ts test: fix retargeting test on firefox (#21157) 2023-02-23 07:35:58 -08:00
selectors-css.spec.ts chore: do not use attributes for trace target annotation (#22075) 2023-03-29 23:17:17 -07:00
selectors-frame.spec.ts chore: internal selectors (#17827) 2022-10-05 08:45:10 -07:00
selectors-get-by.spec.ts fix(getByLabel): ignore empty aria-label (#22935) 2023-05-10 10:38:46 -07:00
selectors-misc.spec.ts feat(locators): reland locator.and(locator) (#22850) 2023-05-05 11:14:01 -07:00
selectors-react.spec.ts feat: Support React forwards refs and memo (#23262) 2023-05-30 17:14:47 -07:00
selectors-register.spec.ts feat(innerloop): allow reusing browsers over the remote connection (#16065) 2022-07-31 14:31:17 -07:00
selectors-role.spec.ts fix(role): account for unslotted elements being hidden for aria (#22070) 2023-03-29 17:08:05 -07:00
selectors-text.spec.ts fix(selectors): hasText and getByText exact match should consider full text (#18260) 2022-10-21 16:29:45 -07:00
selectors-vue.spec.ts test: unflake React.js and Vue tests (#15264) 2022-06-30 07:00:05 -07:00
wheel.spec.ts test: update context menu tests (#21126) 2023-02-22 17:22:56 -08:00
workers.spec.ts feat(firefox-beta): roll to r1408 (#22978) 2023-05-12 09:27:08 -07:00