Closed kanchanj2000 closed 2 years ago
Had the same issue you have to decrease the delay (default=10): https://docs.cypress.io/api/commands/type#Arguments
cy.url().type('www.cypress.io', { delay: 0 })
@kanchanj2000 Have you tried updated the delay value like @IvoLeist suggested?
@emilyrohrbough @kanchanj2000
actually I now have the same issue and it seems to be related with search boxes (connected directly to an API)
in normal text fields Cypress is basically copy pasting when using {delay: 0}
however when wanting to type in
the item_id "1234" in a filterable selection box below is happening
data_query :>> {item_id: ''} data_query :>> {Item_id: '1'} data_query :>> {item_id: '12'} data_query :>> {item_id: '123'} data_query :>> {item_id: '1234'}
each line is a console.log of the fetch function to our API
expected would be to have only one query to our API
data_query :>> {item_id: '1234'}
@emilyrohrbough @IvoLeist Tried with {delay: 0} and it worked for me.
@kanchanj2000 Glad to hear this is working as expected!
@IvoLeist For what you described, I would be curious how your callback function is binge used with this search box input. Is this unexpected behavior triggering the change event callback or on the input event callback? If this issue persists, can you open a new issue and include a minimal reproducible example?
@emilyrohrbough maybe the library I am using is causing the issue: https://github.com/vtaits/react-select-async-paginate
Ok I will open a new issue
Current behavior
cy.get('#searchTextBox').click().type('92014').should('have.value','92014');
Desired behavior
Cypress should quickly type the text provided
Test code to reproduce
cy.get('#searchTextBox').click().type('92014').should('have.value','92014');
Cypress Version
9.5.1
Other
No response