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

Better messaging when failing by type #2050

Closed
duvanmonsa opened this issue Jun 27, 2018 · 3 comments
Closed

Better messaging when failing by type #2050

duvanmonsa opened this issue Jun 27, 2018 · 3 comments
Assignees

Comments

@duvanmonsa
Copy link

duvanmonsa commented Jun 27, 2018

Current behavior:

When you try to validate values if the type is not the same, the message is so confusing

screen shot 2018-06-27 at 2 43 42 pm

Desired behavior:

It should say that the types are different! like

Steps to reproduce:

const amount = 2000;
cy.get('.input-class')
      .type(amount)
      .should('have.value', amount);

Versions

Cypress package version: 3.0.1
Cypress binary version: 3.0.1

@jennifer-shehane jennifer-shehane self-assigned this Jun 27, 2018
@jennifer-shehane
Copy link
Member

I thought we had fixed this before - and indeed we had fixed this within the Cypress Error printed below this message:

screen shot 2018-06-27 at 5 41 35 pm

I feel like this message is printed from chai, but is editable. Here? @brian-mann? https://github.com/cypress-io/cypress/blob/develop/packages/driver/src/cypress/chai_jquery.coffee#L116

@jennifer-shehane jennifer-shehane added the stage: investigating Someone from Cypress is looking into this label Jun 27, 2018
@jennifer-shehane
Copy link
Member

Also, some related conversation: #1360 (comment)

@jennifer-shehane
Copy link
Member

This was fixed in 3.7.0 as part of this PR #5619. Please update to the current version of Cypress.

Screen Shot 2020-01-07 at 3 03 12 PM

@jennifer-shehane jennifer-shehane removed the stage: investigating Someone from Cypress is looking into this label Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants