Comments (11)
This is intersting. Can you check if that component really exists or not.
cy.waitForReact();
cy.get(..).click()
cy.react('component name', {props:{your prop}}).should('exist');
cy.getReact(..).getProps(..).should('eq', true);
from cypress-react-selector.
This is what I see when I try the above:
from cypress-react-selector.
it's react
, not getReact
for the exist
command:
cy.react('component name', {props:{your prop}}).should('exist');
from cypress-react-selector.
hey, i'm also having this issue.
This is what I'm seeing in react dev tools.
This is the code I'm using to look for the component.
cy.waitForReact(); cy.react('DisplayLeadDetails').should('exist');
I did notice that if I were to look for say the ba
component you see in the screenshot, it does pick it up correctly. Wonder if that can help debug this issue.
from cypress-react-selector.
Hi, can you guys try with the latest version v2.2.2
and check if still happening.
from cypress-react-selector.
Still getting the same issue, unfortunately.
from cypress-react-selector.
I'm seeing this issue in a component test where each test mounts a new component tree.
The first test works and all other tests work, with .only
, but if I allow them all to run, getReact
and react
queries fail.
This is on cypress 7.2.0.
from cypress-react-selector.
@sovanyio Thanks for bringing the issue under the light. Can you confirm if the window gets reloaded every time you load a component? If so, you need to call waitForReact
each time. I am interested in the codebase, can you share any repository where I can re-produce the bug?
from cypress-react-selector.
Just want to drop a note that this hasn't fell off of my radar, life got unexpectedly busy this week. I will try to get something up next week.
from cypress-react-selector.
i think it is because of forwardref type react components i think this plugin does not support them cz i also tried fetching them but it's not working. i also tried cy.react as well
from cypress-react-selector.
I'm seeing this issue in a component test where each test mounts a new component tree.
The first test works and all other tests work, with.only
, but if I allow them all to run,getReact
andreact
queries fail.This is on cypress 7.2.0.
I have opened this issue, specific to component testing: #235
from cypress-react-selector.
Related Issues (20)
- Cannot read properties of undefined (reading 'waitToLoadReact') HOT 2
- Would this work with 3rd party libraries? Such as Material UI? HOT 2
- getting webpack-dev-server warning on resqInjector.js attaching the error. HOT 1
- Selectors are failing when upgrading to React 18 HOT 12
- Update plugin to be compatible with Cypress 10 HOT 4
- Could not find instance of React in given element HOT 6
- Functions react() and getReact() don't retry upcoming assertions
- Functions react() and getReact() - infinite retrying for failed upcoming assertions HOT 1
- Is it possible to get a component from a portal?
- No "sourceType" field on TSConfig compiler options HOT 1
- Using getCurrentState
- Cypress 12 Compatibility
- Can't find component by props with value of type array of objects. HOT 1
- Not able to access the sample tests (e2e tests) HOT 1
- incompatibility with Reactjs version 18
- Selector is reporting too many/duplicate items
- How to call the function inside of a component? HOT 1
- Option to suppress cy.log in getProps and getCurrentState
- warning message with resq
- Error when using Vite preprocessor due to require.resolve
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress-react-selector.