Afternoon Stack community.
Pretty new to cypress, what I'm looking to do is identify some text on a page and chain that there should be a particular class with that text. Able to retrieve the text fine but not the class.
From my spec file:
cy.contains('some text').should('have.css', 'fa-pencil')
Page source
<h2 class="module__header big-right" style="text-transform: none;">
<a href="{env details}" class="fa fa-pencil"></a>
some text
<span class="push-right">
<a target="_new" class="fa fa-question-circle-o" href="{env details}" aria-hidden="true"></a>