Comments (10)
Can I collaborate in resolving this bug?
from cypress.
Sure @thevladisss.
At initial discovery, this part seems the one responsible.
from cypress.
@Abdillah I spent some time investigating this issue and it appears like your issue is quite natural, as under the hood it calls "stepUp" and "stepDown" on input type number. This method does not trigger any event on the input, unlilke clicking arrows on input type number.
@jennifer-shehane I think that {upArrow} actually implies that user clicks up arrow key, which does trigger events on the input, as it is same as clicking on the arrows. Do you beleive I can work on implementing this behavior?
from cypress.
Yes, that is spot on.
That doesn't match with user expectation using Cypress for real world arrow up behavior.
I believe it can be improved.
from cypress.
@jennifer-shehane Can I start working on this?
from cypress.
Arrow up can be simulated using the following way (a work around).
const arrowDown = $el => {
const v = parseInt($el.val())++
cy.wrap($el).type('{selectAll}' + v)
}
const arrowDown = $el => {
const v = parseInt($el.val())--
cy.wrap($el).type('{selectAll}' + v)
}
cy.get('input[type=number]').then(arrowUp)
cy.get('input[type=number]').then(arrowDown)
Edited: use .type()
instead of val()
from cypress.
Arrow up can be simulated using the following way (a work around).
const arrowUp = $el => $el.val($e.val()++) const arrowDown = $el => $el.val($e.val()--) cy.get('input[type=number]').then(arrowUp) cy.get('input[type=number]').then(arrowDown)
I think there should be a solution rather than workaround. There is certain specific behaviour about type number that cannot be just covered by adding value unfortunately
from cypress.
@thevladisss Actually, Cypress team has considered this as a bug, you can just create a PR and request them for review rather than waiting for them (they have lots of issue to triage). Currently I'm not available to tackle this issue but need to get things done, hence the workaround.
from cypress.
If you need some discussion, @thevladisss, you can throw it here. I can be your second brain.
from cypress.
If you need some discussion, @thevladisss, you can throw it here. I can be your second brain.
Thanks! Once I get something I will comeback here.
from cypress.
Related Issues (20)
- Error in CLI when 'run timeout' is reached as defined in Project Settings
- Ping the Cloud when there is activity in a run to 'keep alive' to prevent unnecessary timeout.
- Angular Component Testing Mismatched Dependencies HOT 2
- Cypress run slow on Cypress Cloud with Bitbucket CI HOT 4
- Cypress in headed mode exits from test execution and in headless mode it hangs forever HOT 4
- patch-package warning for [email protected] HOT 3
- Inconsistent yarn.lock after PR #29571 HOT 1
- Uncommitted change to packages/graphql/schemas/schema.graphql after PR #29420 HOT 3
- Implement correct behavior for all input types supporting arrow up (stepUp) and arrow down (stepDown) HOT 1
- File upload/attaching not working for file size >200MB on Cypress 13
- Some tests failed to execute on Cypress 13.11 HOT 1
- Extend CONTRIBUTING for actions after PR submission HOT 2
- Cross origin Issue
- Command expected to run against origin {365Origin} but the application is at origin {localhost}
- @cypress/grep: Could not find a declaration file for module '@cypress/grep/src/plugin'
- envVar env not being overridden by exported envVar HOT 2
- 12346789 HOT 7
- parent.location gets compiled to self.location causing a runtime error HOT 1
- NextJS 14.2.4: SyntaxError: Unexpected token '<' HOT 1
- Electron tab closed if webpack compiles more then 60000ms.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress.