-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
.type() negative number into input not working #2173
Comments
Hi, @equistx , |
This comment has been minimized.
This comment has been minimized.
@Fenopiu your screenshot and test code don't indicate this has anything to do with failing to type negative numbers |
@Fenopiu You likely want to assert on the 'value' inside of the span, not the span itself. Something like. it("Should be max 10", () => {
cy.get(".count").invoke('text').then((text) => {
expect(text).to.be.lessThan(11);
})
}) |
0--? That's zero? Please show your Cypress test code or a simple case of a negative number failing |
@TheBestPessimist Thanks for this. I see the issue, we don't take into account that the input has a selection. You can workaround this by doing .clear() before .type() for now. I'll open an issue to fix this Edit: see open issue here #4767 |
Current behavior:
When typing negative number into input with type "number" set, minus is ignored and possitive number is typed instead.
used method:
cy.type()
Desired behavior:
Type negative number.
Steps to reproduce:
Versions
Cypress: 3.0.2
Windows 10
Chrome 67
The text was updated successfully, but these errors were encountered: