Skip to content

Filling forms using Hyperform #4587

Closed
@MarS919

Description

@MarS919

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

Activity

jennifer-shehane

jennifer-shehane commented on Jun 28, 2019

@jennifer-shehane
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')
  })
})
MarS919

MarS919 commented on Aug 22, 2019

@MarS919
Author

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

kuceb

kuceb commented on Aug 29, 2019

@kuceb
Contributor

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

7 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Filling forms using Hyperform · Issue #4587 · cypress-io/cypress