React styled-component / e2e testing: What is the best way to use css selector?

Viewed 882

I use styled-components in a react app and I got a problem with e2e testing.

Since styled-components generates hashed classes, it's hard to use nightwatch css selectors.

Is it possible to add prefix to generated classes so I could use .attributeContains() assertion?

Or is there a better solution ?

2 Answers
Related