Skip to content

Selector is reporting too many/duplicate items #418

@mkascel

Description

@mkascel

I'm evaluating this lib and have run into a strange issue, selecting my component via cy.react is returning more results than are rendered. Here the selector/assertion I'm using is:

cy.react('ProductPlacement').should('have.length', 1);

But the assertion is failing as cy.react() is returning two items.

Screenshot 2023-03-31 at 16 10 10

However, I've verified that only one item is rendering, by querying the DOM directly

Screenshot 2023-03-31 at 16 11 05

This is against Cypress 12.8.1 using the latest version of this lib. Any ideas how I could start debugging this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions