Use Invoke to Trigger Inline Styles
Use to invoke inline styles that trigger the visibility of a div container
it('A blog can be liked', function () { cy.contains('Whatthefuck.is') .parent() .find('.blogDetails') .invoke('attr', 'style', 'display: block') .contains('like').click() cy.contains('Whatthefuck.is') .parent() .find('.blogDetails') .get('.likes') .contains(1)})
Source -> Cypress: Invoke function