Commit Graph

12 Commits

Author SHA1 Message Date
Max Schmitt
b0bb99f413
test: unflake React.js and Vue tests (#15264)
React takes time to render on overbooked machines. Let's use web-first assertions to test that they work as expected.

Error: expect(received).toBe(expected) // Object.is equality

Expected: 1
Received: 0
    at /home/runner/work/playwright/playwright/tests/page/selectors-react.spec.ts:34:71

<img width="887" alt="image" src="https://user-images.githubusercontent.com/17984549/176618419-7653e5d8-4853-4618-af3b-2698827879d2.png">
2022-06-30 07:00:05 -07:00
Dmitry Gozman
722302799e
feat(selectors): support regular expressions in attribute selectors (#12960)
Supports inline regex in addition to string: `_react=BookItem[author = /Ann?a/i]`.
This is similar to `text=` selector, but applies to `_react` and `_vue`
selectors. In the future, will also apply to `role=` selector.
2022-03-22 17:00:56 -07:00
Pavel Feldman
e044bae888
chore: make count() work with _vue selectors (#12899) 2022-03-18 21:22:33 -07:00
Max Schmitt
90e76f9adb
test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01: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
Andrey Lushnikov
a89fe3ec5c
fix: support shadow DOM with Vue and React selectors (#10742)
There were two issues:
- we did not find VDom roots inside shadow DOM
- we incorrectly relied on DOM's `contain` method to determine if
  VDom's rendered node belongs to requested scope.

Fixes #10123
2021-12-07 11:23:37 -08:00
Max Schmitt
cd22072685
chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
Andrey Lushnikov
2198769f6c
fix(react-vue): support nested trees (#8467)
Turns out you can mount nested trees in both React and Vue.
This patch changes root discovery to support nested trees.

Fixes #8455
2021-08-26 03:07:33 -07:00
Andrey Lushnikov
48e94c15c1
feat: support multiple roots in React and Vue selectors (#8313)
Fixes #8230
2021-08-20 05:05:52 -07:00
Andrey Lushnikov
4975f4179e
feat: make React and Vue selectors experimental (#8106) 2021-08-10 17:21:16 -07:00
Andrey Lushnikov
792986c92d
feat: support props matching in react and vue selectors (#8104) 2021-08-10 17:10:14 -07:00
Andrey Lushnikov
f455b6edc0
feat: introduce vue selector engine (#8070)
This patch adds support for the `vue` selector engine that allows
selecting DOM elements based on the component name.

> **NOTE**: `vue` engine supports Vue2 and Vue2.

References #7189
2021-08-09 01:34:52 -07:00