cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
47.08k stars 3.19k forks source link

cypress didnt type in headless mode, work with normal mode.how to fix? #6715

Closed chobijaeyu closed 4 years ago

chobijaeyu commented 4 years ago

hi goods day.

Current behavior:

Screen Shot 2020-03-13 at 13 03 26

the "name" form field should be input string. it work fine in normal mode. only fail in headless mode.

Screen Shot 2020-03-13 at 13 41 37

Desired behavior:

what I want to happen is headless working just like normal.

Test code to reproduce

// x is testMember object

cy.get('[formcontrolname="name"]').type(x.name)
cy.get('[formcontrolname="phone"]').type(x.phone)
cy.get('[formcontrolname="cardid"]').type(x.cardid)
cy.get('[formcontrolname="birthday"]').type(x.birthday)
cy.get('[formcontrolname="memo"]').type(x.memo)
cy.get('[type="radio"]').check(x.gender, { force: true })
cy.get('.ok-button').should('be.visible').click()
cy.wait('@customers-create').should(xhr => {
      ......
})

Versions

Node: 13.8.0 OS: darwin x64

Angular: 9.0.0 ... animations, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... router, service-worker Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.1
@angular-devkit/build-angular     0.900.1
@angular-devkit/build-optimizer   0.900.1
@angular-devkit/build-webpack     0.900.1
@angular-devkit/core              9.0.1
@angular-devkit/schematics        9.0.1
@angular/cdk                      9.0.0-rc.7
@angular/cli                      9.0.1
@angular/material                 9.0.0-rc.7
@ngtools/webpack                  9.0.1
@schematics/angular               8.0.6
@schematics/update                0.900.1
rxjs                              6.5.4
typescript                        3.6.4
webpack                           4.41.2

"cypress": "^4.0.1",

jennifer-shehane commented 4 years ago

Unfortunately we have to close this issue as there is not enough information to reproduce the problem. This does not mean that your issue is not happening - it just means that we do not have a path to move forward.

We can't run the actual code provided and need to know specifically what about the input is different from the hundreds of tests we have on .type().

Please comment in this issue with a reproducible example - basic HTML, CSS, JS + the test code to run against it - and we will consider reopening the issue.

Also, try updating to the current version of Cypress.

oguzhantx commented 1 year ago

seeing the same issue with cypress v10.10.0