UNPKG

cypress-run

Version:

Cypress run replacement that supports parallel execution and retries

22 lines (18 loc) 616 B
/// <reference types="Cypress" /> context('Actions', () => { beforeEach(() => { cy.visit('https://example.cypress.io/commands/actions') }) it('.focus() - focus on a DOM element', () => { // https://on.cypress.io/focus cy.get('.action-focus').focus() .should('have.class', 'focus') .prev().should('have.attr', 'style', 'color: orange;') }) it('.blur() - blur off a DOM element', () => { // https://on.cypress.io/blur cy.get('.action-blur').type('About to blur').blur() .should('have.class', 'error') .prev().should('have.attr', 'style', 'color: red;') }) })