-
Notifications
You must be signed in to change notification settings - Fork 727
docs: add custom queries example to custom render docs #152
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
docs: add custom queries example to custom render docs #152
Conversation
54d7850
to
259fbf9
Compare
259fbf9
to
f46aaf8
Compare
f46aaf8
to
f059027
Compare
fbd51ee
to
7dc39ba
Compare
Should probably explain a little what "cy" stands for but other than that LGTM |
516945a
to
5f81c5e
Compare
I've added a bit about that along with the link to the relevant Cypress.io docs regarding selecting by data-*. I've also added a recommendation around not needing to use your own queries and only doing so if your queries encourage testing in a user-centric way without focusing on implementation details. |
5f81c5e
to
cea8057
Compare
@all-contributors please add @kierenhughes for docs |
I've put up a pull request to add @kierenhughes! 🎉 |
Following on from my previous PR (#151) and having noticed the discussion in #80:
In the example, I've create a data attribute selector for
data-cy
as this is one of the attributes recommended by Cypress. I think in reality I would favour replacingdata-cy
globally throughout my projects withdata-testid
, but this may be useful for some people not willing to refactor outdata-cy
, or similar, at the moment.