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

feat: Implement correct behavior for all input types supporting arrow up (stepUp) and arrow down (stepDown) #29678

Open
wants to merge 42 commits into
base: develop
Choose a base branch
from

Conversation

thevladisss
Copy link
Contributor

@thevladisss thevladisss commented Jun 14, 2024

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

@cypress-app-bot
Copy link
Collaborator

@thevladisss thevladisss changed the title Implement correct behavior for all input types supporting arrow up (stepUp) and arrow down (stepDown) feat: Implement correct behavior for all input types supporting arrow up (stepUp) and arrow down (stepDown) Jun 16, 2024
@thevladisss thevladisss marked this pull request as ready for review June 16, 2024 18:43
@jennifer-shehane jennifer-shehane self-requested a review June 18, 2024 18:38
@jennifer-shehane jennifer-shehane added the type: feature New feature that does not currently exist label Jun 18, 2024
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I manually verified this behavior works. It also works correctly when a step attribute is defined. Thanks for adding this and adding thorough tests around this!

@thevladisss
Copy link
Contributor Author

@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

Screenshot 2024-06-24 at 1 16 04 PM

That must be fixed by last commit now

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thevladisss There’s still a failure in the type test file.

@thevladisss
Copy link
Contributor Author

@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

@jennifer-shehane
Copy link
Member

@thevladisss These tests are still failing. You can run them locally and verify the type file is passing.

@thevladisss
Copy link
Contributor Author

@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
Copy link
Contributor Author

@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
Copy link
Contributor Author

@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.

@jennifer-shehane
Copy link
Member

@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
Copy link
Contributor Author

@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...

@thevladisss
Copy link
Contributor Author

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

@thevladisss
Copy link
Contributor Author

@jennifer-shehane I am having issues locally debuggin implementation for Webkit. What would be your best suggestion ?

@MikeMcC399
Copy link
Contributor

@thevladisss

For consistency, you could use the existing isWebKit for exceptions:

const isWebKit = Cypress.isBrowser('webkit')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature that does not currently exist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement correct behavior for all input types supporting arrow up (stepUp) and arrow down (stepDown)
4 participants