react-native-fullwidth-image icon indicating copy to clipboard operation
react-native-fullwidth-image copied to clipboard

Set testID and/or accessibilityLabel

Open tuzz opened this issue 6 years ago • 0 comments

Hello, a common pattern is to test components via their testID or accessibilityLabel attributes. Would it be possible to forward any other props like this to the Image component?

Example Jest test:

it("sets the source image correctly", () => {
  const view = render(<MyComponent />);
  const image = view.getByTestId("some_image");

  expect(image.props.source.uri).toBe("https://some/image.png");
});

tuzz avatar Dec 03 '19 12:12 tuzz