Skip to content

Error message regression #20208

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

Closed
pstakoun opened this issue Feb 15, 2022 · 3 comments · Fixed by #20335
Closed

Error message regression #20208

pstakoun opened this issue Feb 15, 2022 · 3 comments · Fixed by #20335
Assignees
Labels
type: regression A bug that didn't appear until a specific Cy version release v9.5.0 🐛 Issue present since 9.5.0

Comments

@pstakoun
Copy link
Contributor

Current behavior

Regression in 9.5.0. Errors are not flowing into the codeframe correctly.

Desired behavior

Errors should display correctly.

Test code to reproduce

it('tries to import an unnexisting fixture', () => {
    cy.fixture('test')
    /**
     * v9.4.1
     * A fixture file could not be found at any of the following paths:
     * 
     * > cypress/fixtures/test
     * > cypress/fixtures/test{{extension}}
     * 
     * Cypress looked for these file extensions at the provided path:
     * 
     * > .json, .js, .coffee, .html, .txt, .csv, .png, .jpg, .jpeg, .gif, .tif, .tiff, .zip
     * 
     * Provide a path to an existing fixture file.
    */
   /**
     * v9.5.0
     * A fixture file could not be found at any of the following paths:
     * 
     * [90m > [39m [94mcypress/fixtures/test [39m
     * [90m > [39m [94mcypress/fixtures/test [39m.[ext]
     * 
     * Cypress looked for these file extensions at the provided path:
     * 
     * [90m > [39m [94.json, .js, .coffee, .html, .txt, .csv, .png, .jpg, .jpeg, .gif, .tif, .tiff, .zip[39m
     * 
     * Provide a path to an existing fixture file.
    */
  })

  it('incorrectly uses aliased element (missing @ sign)', () => {
    cy.get('[data-testid="cart-size"]')
      .as('cartSize')
    cy.get('cartSize').should('contain', '0')
    // v9.4.1
    // Expected to find element: cartSize, but never found it.
    // v9.5.0
    // Expected to find element: [data-test-id="add-item-button"], but never found it.
  })

Cypress Version

9.5.0

Other

No response

@pstakoun pstakoun added the type: regression A bug that didn't appear until a specific Cy version release label Feb 15, 2022
@brian-mann
Copy link
Member

brian-mann commented Feb 15, 2022

Yeah this was/is an unintended regression. I'll make sure ANSI is stripped and looked into why the @alias failure isn't generating the same message - although I can't imagine how that could be related to the same PR as what's causing the ANSI terminal codes to unintentionally show up in the errors.

@jennifer-shehane jennifer-shehane added the v9.5.0 🐛 Issue present since 9.5.0 label Feb 15, 2022
@jennifer-shehane
Copy link
Member

Update from original request:

I'm not able to reproduce the second issue anymore, the one of the missing @ for the aliased fixture. It seems to be some kind of edge case,

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 28, 2022

Released in 9.5.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v9.5.1, please open a new issue.

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label Feb 28, 2022
@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Feb 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: regression A bug that didn't appear until a specific Cy version release v9.5.0 🐛 Issue present since 9.5.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants