Cypress selector is easy, just do cy.get('.myComp') and <input className="myComp" /> will be selected but with styled-component
maybe we need to use custom attribute like cy-data, cy-testid etc. I guess there's no other shortcut than flood our component with those custom attribute right?
The other hassle using cypress is when you use css module, where the class is generated differently every build, and imagine your component is , then you need to pass your the custom attribute all the way down
<Custom cy-data="btn1" />
const Custom = ({cy-data}) => <button cy-data={cy-data} />
any workaround to avoid this pain?