testcafe-react-selectors
testcafe-react-selectors copied to clipboard
Improve the `withProps` partial matching: the `props` property value is represented by an array
https://github.com/DevExpress/testcafe-react-selectors/issues/98#issuecomment-566378483:
Can we do the same with array of strings. withProps to allow partial matching of a prop that' an array.
<Card tags=['tag1','tag2']/>
ReactSelector('Card').withProps('tags', ['tag1'])
should give me all the ones that has 'tag1' but the partial matches are not returned
class Hello extends React.Component {
render() {
return <div>Hello {this.props.names.join(", ")}</div>;
}
}
ReactDOM.render(
<Hello names={["one", "two", "three"]} />,
document.getElementById('container')
);