Helper function provides a `data-cy` testing attribute with a value that can match the text content of the react element.