.type({uparrow}) doesn't increment the number input.
Additionally I cannot invoke('stepUp') either.
Increments the number input's value on .type({uparrow}) and invoke('stepUp').
https://github.com/hally9k/cypress-test-tiny
Clone this fork, npm install and npm start
macOS 10.13.5
Cypress 3.0.2
@hally9k hi, invoke() calls jQuery functions, so that may be why stepUp is failing. Try this:
cy.get('.numInput').then(($el)=>$el.get(0).stepUp())
@Bkucera Thanks for that, clearly skimmed that part of the docs a little too hastily. Any insight on why the .type({uparrow}) case isn't working?
@hally9k Are you writing the command using quotes? The {uparrow} should be in quotes like this:
.type('{uparrow}')
@jennifer-shehane Sorry this is a typo in the comments here, I am calling it correctly in the example, see the repro here:
https://github.com/hally9k/cypress-test-tiny/blob/bbe451faf33e49536576749a88526566a403fecd/cypress/integration/spec.js#L14
This should be fixed in an upcoming patch release, {uparrow} will be fixed to increment number (not date inputs) , and move cursor on contenteditables and textareas
Same fix for {downarrow}
Has this been released? Using 3.4.1 and still can't get .type('{uparrow}') to increment number input.
@eireland yes, see the test here that verifies that https://github.com/cypress-io/cypress/blob/simulated-type-fixes/packages/driver/test/cypress/integration/commands/actions/type_spec.js#L2184
If it's not working, please post a clear reproducible example including test code
This issue will be closed to further comment as the exact issue here was resolved in Cypress 3.0.3 and tested.
If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix.
Most helpful comment
This should be fixed in an upcoming patch release, {uparrow} will be fixed to increment number (not date inputs) , and move cursor on contenteditables and textareas
Same fix for {downarrow}