I’m trying to run end to end tests on an Expo Web project with Playwright. I was hoping that when I added a testId prop to a React Native element it would be converted to a data-testid so I could select the element for my tests. I also tried adding a data-testid attribute to the element, but that didn’t work either.
As a result, I can’t figure out a good way to select the elements. So far the best thing I can come up with is to add an accessibility label to the element.
Is it possible to add data elements to expo web projects? If not, does anyone know a better way to add test id’s to react-native expo projects that’ll be tested on the web?