Giter Club home page Giter Club logo

Comments (9)

abhinaba-ghosh avatar abhinaba-ghosh commented on August 23, 2024

Hi @laurence-myers , if it is undefined what output Node information you want to get from the .react()?

Can you suggest any sample output structure?

from cypress-react-selector.

laurence-myers avatar laurence-myers commented on August 23, 2024

Sorry, I'm just learning Cypress, so I'm not really sure how the API should work. 🙁 Maybe I'm using it incorrectly. I was hoping calling .react('ErrorMessage').should('not.be.visible') would check for existence of the node, but maybe I should be asserting .should('not.exist') or similar? I'll double check if that works.

from cypress-react-selector.

abhinaba-ghosh avatar abhinaba-ghosh commented on August 23, 2024

Thanks @laurence-myers . Let us know if that works.

from cypress-react-selector.

abhinaba-ghosh avatar abhinaba-ghosh commented on August 23, 2024

Hi @laurence-myers , any update you like to share?

from cypress-react-selector.

abhinaba-ghosh avatar abhinaba-ghosh commented on August 23, 2024

closing due to staleness.

from cypress-react-selector.

caseyjhol avatar caseyjhol commented on August 23, 2024

.should('not.exist') doesn't work either. I'm trying to assert that there are 0 AccountCards on the page.

cy.react("AccountCard").should('not.exist') throws

Timed out retrying: Expected to find element: undefined, but never found it.

I also tried cy.react("AccountCard").should("eq", undefined);, but that returns the same error.

from cypress-react-selector.

caseyjhol avatar caseyjhol commented on August 23, 2024

After updating to v2.2.1, cy.react("AccountCard").should("not.exist") now throws:

image

@abhinaba-ghosh Any ideas for a workaround?

from cypress-react-selector.

abhinaba-ghosh avatar abhinaba-ghosh commented on August 23, 2024

so, the expectation is AccountCard should not exist right? I think it's not handled correctly now. Can you raise a ticket explaining the whole scenario?

from cypress-react-selector.

caseyjhol avatar caseyjhol commented on August 23, 2024

That's correct. I'll get some more info for you and open a new ticket.

from cypress-react-selector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.