Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to query a button with specific text with react native testing library

// in component
<Button
  testID='LoginButton'
  ...

// in test
const { getByTestId } = render(<LoginScreen />);
expect(getByTestId('LoginButton')).toBeDefined();
 
PREVIOUS NEXT
Tagged: #How #query #button #specific #text #react #native #testing #library
ADD COMMENT
Topic
Name
3+8 =