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

Cypress can’t type the string ‘hasOwnProperty’ inside any field #3423

Closed
reno1979 opened this issue Feb 11, 2019 · 6 comments · Fixed by #3903
Closed

Cypress can’t type the string ‘hasOwnProperty’ inside any field #3423

reno1979 opened this issue Feb 11, 2019 · 6 comments · Fixed by #3903
Labels
pkg/driver This is due to an issue in the packages/driver directory type: bug

Comments

@reno1979
Copy link

reno1979 commented Feb 11, 2019

Current behavior:

When testing out forms with the Big List Of Naughty strings, cypress itself fails to type the string ‘hasOwnProperty’

Desired behavior:

Cypress Should be able to type all strings

Steps to reproduce: (app code and test code)

cy.get(‘input’).type(‘hasOwnProperty’); 
cy.get(‘textarea’).type(‘hasOwnProperty’);

Nothing happens, workaround:

cy.get(‘input’).type(‘h’).type(‘asOwnProperty’); 

Versions

Chrome v68
Cypress v3.1.0

@reno1979
Copy link
Author

Same with these values

toLocaleString
toString
valueOf

The JavaScript object prototype functions ....

@jennifer-shehane
Copy link
Member

Yes, lol, this is happening.

@cypress-bot cypress-bot bot added stage: investigating Someone from Cypress is looking into this stage: needs investigating Someone from Cypress needs to look at this and removed stage: investigating Someone from Cypress is looking into this labels Feb 12, 2019
@clarmso
Copy link
Contributor

clarmso commented Apr 7, 2019

It is a fun bug lol. The bug is on isSpecialChar and isModifier called from typeChars in packages/driver/src/cypress/keyboard.coffee.

Please note the following behaviour of the Javascript dictionary behaviour:

modifiers = {alt: false, ctrl: false}
{alt: false, ctrl: false}
modifiers["alt"]
false
modifiers["hello"]
undefined
modifiers["toString"]
ƒ toString() { [native code] }

The last one is not ok.

whid

Let me see what I can do there.

@jennifer-shehane
Copy link
Member

@clarmso Let us know if you need any help contributing. Feel free to open a WIP (work in progress) PR that we can help with.

@jennifer-shehane jennifer-shehane added type: bug pkg/driver This is due to an issue in the packages/driver directory labels Apr 8, 2019
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review stage: work in progress and removed stage: needs investigating Someone from Cypress needs to look at this stage: needs review The PR code is done & tested, needs review stage: work in progress labels Apr 8, 2019
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Apr 8, 2019
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 8, 2019

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

flotwig pushed a commit that referenced this issue Apr 8, 2019
close #3423 

I have make Cypress to be able to type some Javascript reserved words such as "hasOwnProperty" and "toString".  In addition, I've added some tests taken from the big naughty list of strings.
laurinenas pushed a commit to laurinenas/cypress that referenced this issue Apr 28, 2019
…rds (cypress-io#3903)

close cypress-io#3423 

I have make Cypress to be able to type some Javascript reserved words such as "hasOwnProperty" and "toString".  In addition, I've added some tests taken from the big naughty list of strings.
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 17, 2019

Released in 3.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg/driver This is due to an issue in the packages/driver directory type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants