-
Notifications
You must be signed in to change notification settings - Fork 17
Integration with text selector #13
Comments
Hey :) actually you can do that already like shown here: playwright-community/playwright-jest-examples#1 regarding 1. true, I could definitely improve the examples section or refer to my other repo of the link above. (if you want to fire up a PR, feel free) regarding 2. definitely something to consider, do you have API design ideas, how the methods should be called and what you would use most frequently? Definitely my goal is to have all the helper expect statements reusable in there to provide them to the users either via Jest directly or without Jest. Thank you! |
Hi Max, All the above depends a bit on your internal implementations of the current functions.
I'd also recommend tracking this to see if it lands microsoft/playwright#1658. if it lands, it would change the logic of your toEqualText selector. |
Hi :)
These text selectors are definitely kinda confusing right now in Playwright in my mind which one's are case sensitive or which ones not. Also not sure if they can contain spaces e.g. |
I think the internal implementation in the matchers here should use the Aligning the nomenclature for the various matchers you add to this project with the Playwright nomenclature/wording for what they do might help? At least for me 😝 |
@mxschmitt I really want to start using this package, but I do have concerns between how the current expect functions are implemented for text selections. It'd be nice to completely align them and have 3 separate functions to alight to the exact playwright three different options for the text selector engine. |
@thernstig are you on the Playwright slack? Feel free to ping me there, so we can talk about that. :) |
@mxschmitt Let me try to install this package next week and test some things, so I have better feedback. |
@mxschmitt After lots of other issues at hand, I've come back to this. I think my deduction from all this is that maybe this should be closed. The reasons are that So If I'd given one suggestion, it would have been to only keep Or possibly to keep Another thing is that this package seem to use I'll leave this issue open for a while if you want to comment/keep it open and I am also still available to join slack to discuss more if you want! |
@mxschmitt Closing this since it garnered no reply. The conclusionis that we are using |
Nice to see expect-playwright 😃 Considering starting using it, but I could not find info about this and was curious about a few things.
Playwright supports text selector engines like so:
That I would have wished to replace with:
The first thing I noticed is that the example at https://github.com/mxschmitt/expect-playwright#why-do-i-need-it does not show the above (nicer) way to get a text element that Playwright already supports.
I also wrote another issue that text selectors should be case insensitive and "partial match" by default, which landed in another MR, see new description here https://github.com/microsoft/playwright/blob/master/docs/selectors.md#text
The second thing I know is that an issue I wrote [Feature] Native shadow DOM support microsoft/playwright#1375 just landed its first merge request feat(text selector): pierce shadow roots microsoft/playwright#1619. The text selector now pierces open shadow roots.
Should/are all these features taking into consideration with these new expect functions?
The text was updated successfully, but these errors were encountered: