Skip to content

Commit a25c649

Browse files
committed
added description of testid
1 parent 8de9212 commit a25c649

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

developer_docs/testing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ Want to get started writing a test for a new file or an existing file, but not s
7777
2. Check if the component is connected to redux or not.
7878
3. If it is, see the [redux section](#Testing-Redux) below on how to write tests for that.
7979
4. If it's not, see the [section below on writing tests for unconnected components](#Testing-plain-components).
80+
5. If you're testing UI elements, there are many ways of querying for them, but you can add a data-testid attribute to the component in the source code and use ``getByTestId("testid")`` to retrieve it.
81+
)
8082

8183
### What to test
8284
For any type of component, you might want to consider testing:

0 commit comments

Comments
 (0)