withProps: allow partial matching of a prop that's an object
See original GitHub issueExample I have
<List>
<ListItem someProp={{ type: 'foobar', label: 'some random text' }} />
...
And a selector
ReactSelector('List').findReact('ListItem').withProp({ someProp: { type: 'foobar' } });
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Jest partial matching on objects, arrays and functions
This will let you assert on a specific object in an array (and even a specific value inside of that object). test('should contain...
Read more >React Specific Selectors in TestCafe - DEV Community
withProps will work even if your property value is an object, with matching either being partial or exact. The more you know about...
Read more >React Specific Selectors in TestCafe - by Marques Woodson
withProps will work even if your property value is an object, with matching either being partial or exact. five. The more you know...
Read more >React with TypeScript Cheatsheet - Bits and Pieces
TypeScript will throw a static error when the value of priority or score prop above doesn't match any of the literal values.
Read more >Jest Array/Object partial match with objectContaining and ...
It's possible to do partial matches on Arrays and Objects in Jest ... For example if we wanted to test that the following...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m going to implement it soon. I think the partial matching should be default behaviour, because it’s the more common case. What do you think?
@saikumarr
Hello,
Thank you for your suggestion. I created a new issue about it: https://github.com/DevExpress/testcafe-react-selectors/issues/158.
I cannot give you any estimate as to when this functionality will be implemented. Of course, your PR is welcome.