Skip to content

Commit

Permalink
test: make cy.type blazingly fast
Browse files Browse the repository at this point in the history
  • Loading branch information
ansmonjol committed Feb 20, 2023
1 parent 1c0a48e commit ff30e67
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,10 @@ Cypress.Commands.add('login', (email: string, password: string) => {
cy.get('[data-test="submit"]').click()
cy.url().should('be.equal', Cypress.config().baseUrl + '/')
})

// https://docs.cypress.io/api/cypress-api/custom-commands#Overwrite-type-command
// @ts-ignore
Cypress.Commands.overwrite('type', (originalFn, element, text, options) => {
// @ts-ignore
return originalFn(element, text, { ...options, delay: 0 })
})

0 comments on commit ff30e67

Please sign in to comment.