Skip to content

Conversation

@pplytas
Copy link
Contributor

@pplytas pplytas commented Sep 28, 2020

Summary

This PR ports the 'How Should I Query?' guide from this page: https://www.native-testing-library.com/docs/guide-queries.
The 'Manual Queries' section is not included since the findAll method is not supported by the current version of the library.
Fixes #512

Also these methods were not documented in the original guide, maybe we could add them:

  • ByA11yStates, ByAccessibilityStates
  • ByA11yState, ByAccessibilityState
  • ByA11Value, ByAccessibilityValue

Wdyt?

Test plan

Tested using yarn start in the website/ directory.

Copy link
Member

@mdjastrzebski mdjastrzebski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pplytas Overall good idea 👍

I guess we could add short desc for a11yState + a11yValue. IMO there is no need for adding a11yStates as this got deprecated in RN, so is kind of compat query right now.

Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pplytas I've reworded this a big to follow https://testing-library.com/docs/guide-which-query#priority more. Also reordered a few queries (mainly moved hint and label a bit down) and added missing ones. Thanks!

@mdjastrzebski can you give it a go one more time?

Copy link
Member

@mdjastrzebski mdjastrzebski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port guides from Native Testing Library

3 participants