Commit Graph

22 Commits

Author SHA1 Message Date
Dmitry Gozman
894abbfe28
feat(selectors): has-text pseudo-class (#5120)
This pseudo-class matches approximately when
`element.textContent.includes(textToSearchFor)`.
2021-01-25 14:19:07 -08:00
Dmitry Gozman
0586c2554f feat(text selector): normalize whitespace for quoted match (#5049)
This changes quoted text selector like `text="Foo Bar"` to perform
normalized whitespace match.

Most of the time users want to match some string visible on the page,
and that always means normalized whitespace.

We keep the case sensitivity and full-string vs substring difference
between quoted and unquoted matches.
2021-01-19 09:30:34 -08:00
Dmitry Gozman
5215add60d
chore: remove selectorsV2Enabled switch (#4880)
Selectors V2 seem to stick.
2021-01-04 15:32:31 -08:00
Dmitry Gozman
4c11f5d885
test: remove hacky requires, use imports instead (#4835)
Since our client implements our types, we can now import
implementation in tests without type conflicts.
2020-12-28 11:14:33 -08:00
Dmitry Gozman
9a0023cc03
fix(selectors): text engine after capture matches scope (#4749) 2020-12-17 06:19:43 -08:00
Dmitry Gozman
b67e022111
feat(selectors): update new text selector (#4654)
We now default to `text` that does substring case-insensitive match
with normalized whitespace. `text-is` matches the whole string.
`matches-text` is renamed to `text-matches`.
2020-12-09 16:05:51 -08:00
Dmitry Gozman
49a3f943b6
feat(selectors): switch to the new engine (#4589)
We leave old implementation under the boolean flag,
just in case we need a quick revert.
2020-12-04 06:51:18 -08:00
Dmitry Gozman
3121de403b
test: remove tests for SelectorEngine.create (#4580)
We are not going to keep this functionality on arbitrary engines.
2020-12-03 14:10:26 -08:00
Dmitry Gozman
924cc9894a
feat(text selector): normalize spaces in lax mode (#4312) 2020-11-03 04:37:06 -08:00
Pavel Feldman
0ee9050f1b
chore: split playwright.fixtures into files (4) (#3985) 2020-09-26 10:59:27 -07:00
Pavel Feldman
f94df318d5
chore: roll test runner to 0.3.9 (#3847) 2020-09-11 10:02:07 -07:00
Pavel Feldman
8df1fe47bc
test: explicitly require expect (#3755) 2020-09-03 09:43:08 -07:00
Pavel Feldman
175fc52747
test: roll test-runner to 0.2.8 (#3748) 2020-09-02 21:43:38 -07:00
Dmitry Gozman
de547d7d65
fix(connect): make selectors.register work in connected browser (#3664)
This is a large rework of selectors:
- Each BrowserContext now has a separate Selectors instance that has its own registrations.
  Most of them share a single sharedSelectors instance, but contexts created for a connected
  browser have their own instance.
- Connected browser now gets a RemoteBrowser object that encapsulates Selectors and Browser.
  This Selectors object is registered with the api selectors.
- Public selectors.register api iterates over all registered Selectors channels
  and registers in each of them.
- createSelector testing method migrated to ElementHandle._createSelectorForTest.
2020-09-02 16:15:43 -07:00
Dmitry Gozman
5c3bf5bf3e
test: add tests for selectors matching root behavior (#3744) 2020-09-02 16:00:15 -07:00
Joel Einbinder
e2057fb8bb
chore(test): run eslint on tests (#3638) 2020-08-28 04:20:29 -07:00
Pavel Feldman
db2e66aa76
test: introduce global setup (#3544) 2020-08-20 12:51:05 -07:00
Pavel Feldman
86815d70e0
test: convert rename options to parameters, remove options magic (#3543) 2020-08-19 21:32:12 -07:00
Pavel Feldman
8989d66bda
test: introduce options (#3525) 2020-08-18 23:00:45 -07:00
Pavel Feldman
2f5a0a6c07
test: slowly removing testOptions (#3464) 2020-08-14 07:22:54 -07:00
Dmitry Gozman
9b52ca8676
chore: remove unused non-rpc code, test options, infra, bots (#3444) 2020-08-13 16:00:23 -07:00
Joel Einbinder
6054f14794
chore(tests): convert all tests to typescript (#3384) 2020-08-11 15:50:53 -07:00