Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Studio does not properly handle typing into an input with existing value #15023

Assignees
Labels
experiment: studio Issues when using experimentalStudio type: bug

Comments

@panzarino
Copy link
Contributor

Current behavior

When a user types into an input field, Studio will record the characters pressed and add them to a new cy.type() command. However, we run into a problem when there is already a value in that field before the typing begins. If the user's cursor is not at the end of the line, or they highlight some characters and delete, etc. Studio will still generate a type command with the characters typed. This causes those typed characters to be appended to the end of the input when run, which does not accurately reflect the user's actions. See an example below

ezgif-7-1499f9aef674

Desired behavior

Studio should attempt to mimic the user's actions as closely as possible. We'll have to compare the actual values within the input element to guess at what action the user is taking and do our best to accurately replicate that in the generated Studio commands. This might require us to add cy.clear() before the cy.type() command or something along those lines.

Versions

Cypress 6.3.0

@panzarino panzarino added type: bug experiment: studio Issues when using experimentalStudio labels Feb 10, 2021
@panzarino panzarino self-assigned this Feb 10, 2021
@panzarino panzarino added the stage: ready for work The issue is reproducible and in scope label Feb 10, 2021
@cypress-bot cypress-bot bot added stage: work in progress and removed stage: ready for work The issue is reproducible and in scope labels Feb 18, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 22, 2021

The code for this is done in cypress-io/cypress#15145, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 15, 2021

Released in 6.7.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v6.7.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.