You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getByRole(role, {name}) doesn't work when the target node doesn't have components as a child.
test('returns an element when the direct child is text',()=>{const{ getByRole }=render(<TextaccessibilityRole="header"testID="target-header">
About
</Text>);// assert on the testId to be sure that the returned element is the one with the accessibilityRoleexpect(getByRole('header',{name: 'About'}).props.testID).toBe('target-header');});
Issue open for better tracking, see #1139 for discussions.
Versions
RNTL 11.2
The text was updated successfully, but these errors were encountered:
Describe the bug
getByRole(role, {name})
doesn't work when the target node doesn't have components as a child.Issue open for better tracking, see #1139 for discussions.
Versions
RNTL 11.2
The text was updated successfully, but these errors were encountered: