You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to have a built-in method to copy and paste strings without losing React State. Right now, it is possible to paste a string into an input element using Cypress's type method, nevertheless, it doesn't update React State, therefore, when the pasting action ends, it erases itself immediately.
Why is this needed?
I would like to type an SSH key into an input element, though, it takes much time to do so. It would be so much easier if there is a built-in mechanism to paste string into an input element as well as manage React State accordingly.
Other
It works to paste an email into an email using plain HTML as follows:
it('pastes text to textarea',()=>{consttextToPaste='this is not a valid email'cy.visit('index.html')cy.get("[type='email']").invoke('val',textToPaste)})
However, it loses the content when unfocused in a React App, therefore, input sends a request with an empty email field, which makes things difficult to manage.
The text was updated successfully, but these errors were encountered:
@ssoydabas Would setting the delay option of cy.type to 0 satisfy this? It should instantly type in and still trigger all of the same events like keyup, etc.
Hi @jennifer-shehane , I have actually made use of delay option, nevertheless, it is not instantanous, instead, it speeds up the process a little. Having to write a long text still takes a lot of time.
What would you like?
I'd like to have a built-in method to copy and paste strings without losing React State. Right now, it is possible to paste a string into an input element using Cypress's type method, nevertheless, it doesn't update React State, therefore, when the pasting action ends, it erases itself immediately.
Why is this needed?
I would like to type an SSH key into an input element, though, it takes much time to do so. It would be so much easier if there is a built-in mechanism to paste string into an input element as well as manage React State accordingly.
Other
It works to paste an email into an email using plain HTML as follows:
However, it loses the content when unfocused in a React App, therefore, input sends a request with an empty email field, which makes things difficult to manage.
The text was updated successfully, but these errors were encountered: