Slide 46
Slide 46 text
// An own Command
Cypress.Commands.add('changeElementStyling', (selector, imageStyle) => {
// E.g. replace the image with a fixed one
cy.get(selector)
.invoke('attr', 'style', imageStyle)
.should('have.attr', 'style', imageStyle);
});