You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading from 0.71 to 0.72 one of my test fails because fireEvent no longer triggers the event. If I disable the new isPointerEventEnabled check the test passes again.
Steps to Reproduce
I am mocking react-native-maps like so:
/* eslint-disable no-shadow, max-classes-per-file */constReact=jest.requireActual('react');constMapView=jest.requireActual('react-native-maps');/* eslint-enable no-shadow */constmockShowCallout=jest.fn();// eslint-disable-next-line react/prefer-stateless-function, react/no-multi-compclassMockMarkerextendsReact.Component{constructor(props){super(props);this.showCallout=mockShowCallout;}render(){const{ children }=this.props;returnReact.createElement('Marker',this.props,children);}}// eslint-disable-next-line react/prefer-stateless-function, react/no-multi-compclassMockMapViewextendsReact.Component{staticPROVIDER_GOOGLE='google';render(){const{ children }=this.props;returnReact.createElement('MapView',this.props,children);}}MockMarker.propTypes=MapView.Marker.propTypes;MockMapView.propTypes=MapView.propTypes;MockMapView.Marker=MockMarker;MockMapView.Callout=MapView.Callout;MockMapView.exposedMarkerShowCallout=mockShowCallout;module.exports=MockMapView;
The MapView implements the event onRegionChangeComplete which is what I trigger in the test like so: fireEvent(wrapper.UNSAFE_getByType(RNMapView), 'RegionChangeComplete');
@ccfz could you verify that the issue you reported does still occur on the latest version of RNTL (& React Native, React, React Test Renderer). If so, could you please provide repro repository hopefully based on ours examples/basic app in our repo.
Describe the bug
After upgrading from 0.71 to 0.72 one of my test fails because
fireEvent
no longer triggers the event. If I disable the newisPointerEventEnabled
check the test passes again.Steps to Reproduce
I am mocking react-native-maps like so:
The
MapView
implements the eventonRegionChangeComplete
which is what I trigger in the test like so:fireEvent(wrapper.UNSAFE_getByType(RNMapView), 'RegionChangeComplete');
Screenshots
Versions
The text was updated successfully, but these errors were encountered: