Closed xmarduel closed 4 years ago
Hi @xmarduel
The getReact
method returns only serialized objects. It looks like state.map
contains a DOM element, which cannot be serialized.
You need to filter the React component properties that you want to check in a test using the following predicate: .getReact( ({ props, state, key }) => )
. See an example of how to do this in here.
how to use the ReactSelector inside the TestCafe Studio?
See detailed instructions here.
ReactSelector works perfectly well. But for a standard react component used to display an openlayers map, the "getReact()" method return the error message
1) getReact cannot return DOM elements. Use Selector functions for this purpose.
The standard way to use openlayerwith react is the following:and the openlayers map is created in the
componentDidMount()
method, giving theol Map
constructor the "target""mapContainer"
:So yes, in the test, after I would like to have apointer on the real openlayers map instance
Another question: how to use the ReactSelector inside the TestCafe Studio ?
Thanks in advance.