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

Can't find component by props with value of type array of objects. #385

Open
kzahozhy opened this issue Dec 1, 2022 · 1 comment
Open

Comments

@kzahozhy
Copy link

kzahozhy commented Dec 1, 2022

Hi.
I have following component in application:
изображение

When I'm trying to find this component by props 'position' in the following way:
cy.react('', { props: { id: 'googlemap' } }).nthNode(0).getReact('', { props: { polygon: { position: [{lat: 43.49140034397328, lng: -114.28001545783025}, {lat: 43.49062198584881, lng: -114.27894257422429}, {lat: 43.48984361769324, lng: -114.28001545783025}] } } }) I receive error that component is not found. Although when I'm trying to find the same component in a different way:
cy.react('', { props: { id: 'googlemap' } }).nthNode(0).getReact('', { props: { polygon: { type: 'polygon' } } }) - everything is Ok.

I think the problem is with the value type which is array of objects. I have similar case but when I pass as a value a single object not an array of them, and in that case component is found.

Could you please inestigate the case and probably fix it?

@kzahozhy
Copy link
Author

kzahozhy commented Dec 1, 2022

I'm using "cypress": "^10.6.0", "cypress-react-selector": "^3.0.0",

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

1 participant