How to test text and image elements in React components