Delay has to be specified per-use as .type('string', { delay: num }).
A global config that's something like typeDelay: number. Specifically, I'd like to globally reduce the timeout to 1ms or something.
I have the beginnings of a PR here but it might be incomplete in parts, especially in the specs. Would be happy to help close it out, though I feel this task would be trivial for someone with more knowledge of the codebase! (Assuming this feature is something others want, of course.)
You can override the type command (or any command) so that every use of .type() uses the delay you'd like by default.
Cypress.Commands.overwrite('type', (originalFn, subject, text, options = {}) => {
options.delay = 100
return originalFn(subject, text, options)
})
it('type override', function () {
cy.visit('index.html')
cy.get('input').type('my text')
})
Adding this feature as a global configuration is not something we see as within our scope of feature work, so we will be closing this issue. We will reconsider and reopen if we see this issue gains more 馃憤 or comments in support.
Great! Exactly what I was looking for. Thank you!
Most helpful comment
You can override the type command (or any command) so that every use of
.type()uses the delay you'd like by default.Adding this feature as a global configuration is not something we see as within our scope of feature work, so we will be closing this issue. We will reconsider and reopen if we see this issue gains more 馃憤 or comments in support.