Skip to content

Instantly share code, notes, and snippets.

@shwetaneelsharma
Last active November 9, 2020 14:11
Show Gist options
  • Save shwetaneelsharma/86495917741c2ba54b67f7f4d5b52d23 to your computer and use it in GitHub Desktop.
Save shwetaneelsharma/86495917741c2ba54b67f7f4d5b52d23 to your computer and use it in GitHub Desktop.
Introduce CSS bugs through Cypress invoke command
context('Validate Visual Difference in Home Page with Chrome Only', () => {
it('Validate Visual Difference in Home Page', () => {
cy.visit('/');
cy.get('.block-inner').should('be.visible');
// Change the CSS for creating visual bugs
cy.get('.field--name-field-content-link a').invoke('css', 'background-color', '#000000').should('have.css', 'background-color', 'rgb(0, 0, 0)')
cy.get('div.js-form-item').invoke('css', 'margin-left', '2rem').should('have.css', 'margin-left', '32px')*/
cy.eyesCheckWindow({
tag: "Home Page - Chrome",
target: 'window',
fully: true
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment