ByPlaceholderText

Although not as useful as other queries (like getByLabelText()), sometimes the only way to select an input is by its placeholder value.

In those cases, getByPlaceholderText() is an easy to use RTL query.

Loading full lesson content & code...

Ready to try running tests for this lesson?