feat: Implement correct behavior for all input types supporting arrow up (stepUp) and arrow down (stepDown)
- Closes #29665
Additional details
This feature implements natural behavior of inputs that support key down and key up and also support stepper functionality (stepUp and stepDown) according to MDN Docs., affecting
cy.type action and enforcing that it mathces expected user experience
Steps to test
How has the user experience changed?
PR Tasks
- [x] Have tests been added/updated?
- [ ] Has a PR for user-facing changes been opened in
cypress-documentation? - [ ] Have API changes been updated in the
type definitions?
- Create a Draft Pull Request if your PR is not ready for review. Mark the PR as Ready for Review when you're ready for a Cypress team member to review the PR.
@thevladisss I think it'd be nice to add this as an example to our docs. That's not a requirement to merge this though.
@thevladisss I think it'd be nice to add this as an example to our docs. That's not a requirement to merge this though.
Sorry, what exactly do you mean? Are you talking about the feature added e.g. that user now can trigger "arrow up" on these new inputs?
@thevladisss Having an example added to the type doc, showing the upArrow/downArrow and explaining that that triggers the stepUp/stepDown. https://docs.cypress.io/api/commands/type#Examples
@thevladisss There's actually some failures in CI if you have time to take a look.
https://app.circleci.com/pipelines/github/cypress-io/cypress/62518/workflows/2ad52bdb-432c-45f0-8e2e-e94bd4c1a4e2/jobs/2588309
@thevladisss There's actually some failures in CI if you have time to take a look.
https://app.circleci.com/pipelines/github/cypress-io/cypress/62518/workflows/2ad52bdb-432c-45f0-8e2e-e94bd4c1a4e2/jobs/2588309
I will take a look today certainly
@thevladisss Having an example added to the type doc, showing the upArrow/downArrow and explaining that that triggers the stepUp/stepDown. https://docs.cypress.io/api/commands/type#Examples
Sure, I will take care of it
@thevladisss There's actually some failures in CI if you have time to take a look.
https://app.circleci.com/pipelines/github/cypress-io/cypress/62518/workflows/2ad52bdb-432c-45f0-8e2e-e94bd4c1a4e2/jobs/2588309
That must be fixed by last commit now
@thevladisss There’s still a failure in the type test file.
Whoops, I can see, just did not have enough time to check. I will fix in the evening
@thevladisss These tests are still failing. You can run them locally and verify the type file is passing.
@thevladisss These tests are still failing. You can run them locally and verify the type file is passing.
Actually I did, I wonder why they are failing on CI. Let me troubleshoot it
@thevladisss These tests are still failing. You can run them locally and verify the type file is passing.
Actually I did, I wonder why they are failing on CI. Let me troubleshoot it
I see what the issue is. I actually only tested Chromium browsers. Appears like there is certain specific behavior with Webkit and Firefox for "stepUp" and "stepDown" functions that I would have to account for. I'll do my best to fix it during this week.
@thevladisss These tests are still failing. You can run them locally and verify the type file is passing.
Actually I did, I wonder why they are failing on CI. Let me troubleshoot it
I see what the issue is. I actually only tested Chromium browsers. Appears like there is certain specific behavior with Webkit and Firefox for "stepUp" and "stepDown" functions that I would have to account for. I'll do my best to fix it during this week.
This has been addressed. Now I am facing issue with "sessions.ui.cy.js" and hopefully because my branch is not up-to-date with development.
@thevladisss It seems the webkit type tests are still failing around the stepUp/stepDown implementation: https://app.circleci.com/pipelines/github/cypress-io/cypress/62710/workflows/7da0f09a-5165-4c47-a7a4-d4e7789f58fa/jobs/2595993
@thevladisss It seems the webkit type tests are still failing around the stepUp/stepDown implementation: https://app.circleci.com/pipelines/github/cypress-io/cypress/62710/workflows/7da0f09a-5165-4c47-a7a4-d4e7789f58fa/jobs/2595993
I figured that could happen, I just cannot run tests on Webkit locally for some reason...
I do not want to delay release of this feature, therefore I added check for webkit browser, that for some reason I cannot locally debug. I am acutally struggling to run tests for some reason. I also talked to the teamember in Discord, but that unfortunately did not help me to able to run tests
@jennifer-shehane I am having issues locally debuggin implementation for Webkit. What would be your best suggestion ?
@thevladisss
For consistency, you could use the existing isWebKit for exceptions:
https://github.com/cypress-io/cypress/blob/5c20476f419905939f315d63f2c56641ac933774/packages/driver/cypress/e2e/commands/actions/type.cy.js#L25
@thevladisss What is the actual behavior if users try to use these features in Firefox and WebKit?
@thevladisss What is the actual behavior if users try to use these features in Firefox and WebKit?
Month and week inputs are not supported for both Safari and Firefox, therefore there is no support for them as well as tests are suppressed for Webkit and Firefox. In Safari input[type=time] and input[type=datetime-local] are supported, however in Playwright Webkit implementation, they are shown as plain text input, tests are therefore skipped.
- input type='month' browser compatibility: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month#browser_compatibility - there is no support in Firefox or Safari
- input type='week' browser compatibility: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/week#browser_compatibility - there is no support in Firefox or Safari
I am sorry this process takes so long from my end, can you please help me in understanding how I can accelerate it or fix anything that prevents the pace?
@thevladisss Let me get reviewers assigned to thoroughly finish reviewing this sprint. Thanks for your patience. We just want to make sure everything is thoroughly tested and understood since these things could impact so many users.
@thevladisss Let me get reviewers assigned to thoroughly finish reviewing this sprint. Thanks for your patience. We just want to make sure everything is thoroughly tested and understood since these things could impact so many users.
Of course. I am not trying to push it asap, I am trying to be here once certain changes / fixes required for this feature to be released. I am on same site with on on having it well-tested.
Going to get this in for the release planned Tuesday.
Released in 13.14.0.
This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v13.14.0, please open a new issue.

