Commit Graph

20 Commits

Author SHA1 Message Date
Yury Semikhatsky 76d46d478f
fix: text-is() should ignore comments (#33980) 2024-12-12 17:49:31 -08:00
Dmitry Gozman d9eabda09d
fix(locators): escape quotes in regular expressions (#27002)
Fixes #26974.
2023-09-11 15:49:04 -07:00
Dmitry Gozman dd417d83d9
fix(locators): escape `>>` inside a regular expression (#23631)
To avoid selector being parsed as a chain.

Fixes #23540.
2023-06-12 10:34:37 -07:00
Dmitry Gozman 48c44f2c78
fix(selectors): hasText and getByText exact match should consider full text (#18260)
Fixes #18259.
2022-10-21 16:29:45 -07:00
Dmitry Gozman a9c02b9753
fix(locators): properly escape various locator methods (#17798)
References #17604.
2022-10-04 13:21:38 -07:00
Pavel Feldman 083fb4401c
feat(api): add getByPlaceholderText (#17722) 2022-09-29 18:12:49 -07:00
Pavel Feldman b4ee84fb0c
chore(api): remove locator.get() (#17709) 2022-09-29 12:50:52 -07:00
Pavel Feldman e3a2316013
feat(api): add getByLabelText (#17684) 2022-09-29 11:06:58 -07:00
Pavel Feldman 6cc33c2d08
fix(trace): fix trace mode tests (#17667) 2022-09-28 12:47:08 -07:00
Pavel Feldman d9a28bd244
feat(api): introduce get/getByText/getByRole (#17577) 2022-09-27 16:13:56 -07:00
Yury Semikhatsky 1dcd756996
test: proper escaping for exact text match (#16866) 2022-08-26 22:16:04 -07:00
Yury Semikhatsky 67d5c13d65
test: text selector with double quotes (#16865) 2022-08-26 17:39:33 -07:00
Dmitry Gozman a8d4a8aa52
fix(text selector): ignore non-leading quote when parsing (#13170)
Previously, any unpaired quote in the text selector "escaped"
everything till the end of the selector string, and so any
subsequent chained selectors, including ">>" separator were ignored.

An example of misbehaving selector: `text=19" >> nth=1`.

Now, when text selector contains a non-leading quote, selector parser
does not assume it should escape ">>" separator and correctly
tokenizes all selectors from the chain.

Note that this behavior is a workaround for the fact that our
text selectors is somewhat poorly defined in this area. That said,
this workaround seems to be safe enough. It still does not work for
unpaired leading quotes like this: `text="19 >> nth=1`.
2022-03-30 09:33:32 -07:00
Max Schmitt 90e76f9adb
test: rename #smoke to @smoke as test tags (#12652) 2022-03-10 19:42:52 +01:00
Pavel Feldman 38801a3b85
test: add a test for leading and trailing spaces (#11156) 2022-01-03 12:51:58 -08: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
Yury Semikhatsky a186278f2e
fix(selectors): empty text matcher (#9548) 2021-10-15 17:00:45 -07:00
Max Schmitt cd22072685
chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
Dmitry Gozman 217cbe3e21
test: cleanup bad usages of pageTest (#6430) 2021-05-06 07:08:22 -07:00
Dmitry Gozman 9433cae4fe
test: move all page tests to a subdirectory (#6427) 2021-05-05 19:10:28 -07:00