cypress icon indicating copy to clipboard operation
cypress copied to clipboard

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

Open thevladisss opened this issue 1 year ago • 10 comments

  • 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

thevladisss avatar Jun 14 '24 01:06 thevladisss

cypress-app-bot avatar Jun 14 '24 01:06 cypress-app-bot

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

jennifer-shehane avatar Jun 21 '24 18:06 jennifer-shehane

@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 avatar Jun 22 '24 06:06 thevladisss

@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

jennifer-shehane avatar Jun 24 '24 16:06 jennifer-shehane

@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

jennifer-shehane avatar Jun 24 '24 17:06 jennifer-shehane

@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

I will take a look today certainly

thevladisss avatar Jun 24 '24 17:06 thevladisss

@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 avatar Jun 24 '24 17:06 thevladisss

@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

thevladisss avatar Jun 25 '24 04:06 thevladisss

@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 avatar Jun 26 '24 15:06 thevladisss

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

jennifer-shehane avatar Jun 27 '24 19:06 jennifer-shehane

@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 avatar Jul 02 '24 00:07 thevladisss

@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 avatar Jul 02 '24 01:07 thevladisss

@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 avatar Jul 03 '24 04:07 thevladisss

@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

jennifer-shehane avatar Jul 03 '24 19:07 jennifer-shehane

@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 avatar Jul 03 '24 21:07 thevladisss

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 avatar Jul 18 '24 01:07 thevladisss

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

thevladisss avatar Jul 20 '24 04:07 thevladisss

@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

MikeMcC399 avatar Jul 24 '24 07:07 MikeMcC399

@thevladisss What is the actual behavior if users try to use these features in Firefox and WebKit?

jennifer-shehane avatar Jul 29 '24 14:07 jennifer-shehane

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

thevladisss avatar Jul 30 '24 06:07 thevladisss

  • 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

jennifer-shehane avatar Aug 05 '24 14:08 jennifer-shehane

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 avatar Aug 12 '24 16:08 thevladisss

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

jennifer-shehane avatar Aug 13 '24 13:08 jennifer-shehane

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

thevladisss avatar Aug 13 '24 15:08 thevladisss

Going to get this in for the release planned Tuesday.

jennifer-shehane avatar Aug 23 '24 15:08 jennifer-shehane

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.

cypress-bot[bot] avatar Aug 27 '24 17:08 cypress-bot[bot]