[XCUITest][iOS]: Unable to zoom out on a MKMapView using "pinch()"

Originator:ccampbell
Number:rdar://FB7555432 Date Originated:1/28/20
Status:Open Resolved:No
Product:XCUITest Product Version:Xcode 11.3.1
Classification:Incorrect/Unexpected Behavior Reproducible:Consistent
 
Xcode 11.3.1 / Swift 4.2 / iOS 11,12,13 Simulators running on MacOS Mojave 10.14.6 (we don't yet support building against Catalina).

XCUI tests consistently fail to zoom out (via "pinch()") on MKMapViews created via IB. 
MKMapViews created programmatically can successfully be zoomed out.

The failure is silent, meaning the test still succeeds when the map failed to zoom.

Zooming in works correctly:
mapView.pinch(withScale: 1.5, velocity: 1.0)

Zooming out does nothing:
mapView.pinch(withScale: 0.5, velocity: -1.0)

I tested different values for both "withScale" and "velocity", to no avail.
I tried hiding the status bar thinking it may be capturing one of the pinch points (via "prefersStatusBarHidden()" in the view controller), to no avail.

I implemented a "pinch" gesture recognizer in the view controller to see if the "pinch" zoom out gesture was captured. It was not. Conversely the zoom in gesture was indeed captured.

Sample project attached to the original feedback report.

Steps:
1. Open the attached sample project.
2. Run "testZoomOutMapView()" against an iOS 11,12, or 13 simulator.

Expected:
The map should zoom out

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!