-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Playwright to v1.27 #45193
Update Playwright to v1.27 #45193
Conversation
Size Change: +78 B (0%) Total Size: 1.28 MB
ℹ️ View Unchanged
|
@kevin940726 Is there anything we need to do to migrate to the stable version of this API? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Could you also update the Best Practices guide to include a link of the documentation of these RTL selectors?
Is there anything we need to do to migrate to the stable version of this API?
We're already using the stable API, only that it's string-based now. We could decide to opt-in to these new APIs or allow both usages. I don't really have a preference. My only recommendation is to stop using CSS selectors 😅
I will update the Best Practices docs as well. I think we should mention new APIs in the docs but have no hard rule about the usage. As you said, @kevin940726, we should only care that people are using good locators 😄 I also like the "Which query should I use?" page from Testing Library. Would it make sense to have something similar in our docs? |
Well, on second thought, I think I like the string-based role selectors more. Some RTL selectors ( But that's just my opinion 😆 , let's just allow both and stop the bikeshedding 😂 . |
Just so we're on the same page, this is what we call a string-based locator, correct?
100%. I will just mention both options and try to emphasize role base selector. |
Yep, that's what I call a string-based locator 😅 |
de10a2c
to
32d9039
Compare
@kevin940726, Since we always prefer role selectors, I just mentioned the new short-form API alongside the string-based locator in the README. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Just a small suggestion.
What?
Upgrade
@playwright/test
to v1.27.1.Why?
v1.27 introduced a new locator APIs inspired by Testing Library. This would make it easier for folks to use locators, especially now that unit tests are fully migrated to RTL.
New APIs:
For more details, see the release page: https://github.com/microsoft/playwright/releases/tag/v1.27.0
Testing Instructions
CI should pass.