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

Filling forms using Hyperform #4587

Closed
MarS919 opened this issue Jun 27, 2019 · 5 comments · Fixed by #4870
Closed

Filling forms using Hyperform #4587

MarS919 opened this issue Jun 27, 2019 · 5 comments · Fixed by #4870

Comments

@MarS919
Copy link

MarS919 commented Jun 27, 2019

I encountered issues filling form fields with type() when the form is "enhanced" with Hyperform (https://hyperform.js.org/).

Current behavior:

The form field is not filled.

Desired behavior:

The form field shoud be filled.

Steps to reproduce: (app code and test code)

No app code needed.

Test code:

describe('Hyperform basic test', function() {
  it('it should be possible to fill a form field', function() {
    cy.visit('https://hyperform.js.org/examples.html#file=simple')
    cy.get('input').type('This will never appear')
  })
})

Versions

Cypress 3.3.0 and 3.3.1
Chromium 69 and Electron 61

@jennifer-shehane
Copy link
Member

I can recreate this in Cypress 3.3.2 in Chrome 75.

When running in Cypress, I've noticed the same keyup, keypress, and click events firing and being listened to as the same as manually typing. Don't see any obvious reasoning for this.

Failing test @bkucera

describe('Hyperform basic test', function () {
  it('it should be possible to fill a form field', function () {
    cy.visit('https://hyperform.js.org/examples.html#file=simple')
    cy.get('input').type('hello').should('have.value', 'hello')
  })
})

@cypress-bot cypress-bot bot added the stage: needs investigating Someone from Cypress needs to look at this label Jun 28, 2019
@MarS919
Copy link
Author

MarS919 commented Aug 22, 2019

Any news here? This is a major blocker for us.

@kuceb
Copy link
Contributor

kuceb commented Aug 29, 2019

This is because hyperform is overriding the maxLength getter for the input, and forcing it to return 0. We simply need to borrow the property getter from the outer frame when reading maxlength.

I'll have a fix up soon

Edit: fix is in #4870

@kuceb kuceb mentioned this issue Aug 29, 2019
17 tasks
@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: needs investigating Someone from Cypress needs to look at this stage: work in progress labels Sep 23, 2019
@cypress-bot cypress-bot bot added stage: work in progress and removed stage: needs review The PR code is done & tested, needs review labels Oct 22, 2019
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 23, 2019

The code for this is done in cypress-io/cypress#4870, 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 Oct 23, 2019

Released in 3.5.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants