question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

withProps: allow partial matching of a prop that's an object

See original GitHub issue

Example 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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
kirovboriscommented, Aug 2, 2018

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?

0reactions
Farfurixcommented, Dec 18, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found