Skip to content

Commit

Permalink
Updates test constant in gesture test (#2279)
Browse files Browse the repository at this point in the history
Co-authored-by: Release SDK bot for Maps SDK team <[email protected]>
  • Loading branch information
pjleonard37 and Release SDK bot for Maps SDK team authored Aug 30, 2024
1 parent 6050fda commit b46fb47
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tests/GestureTests/Pinch/ZoomInPinchGesture.test.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ final class ZoomInPinchGestureTestCase: GestureTestCase {
func testQuickZoomIn() async throws {
try eventGenerator.fingerPinchOpen(duration: Constants.pinchDuration)

XCTAssertEqual(mapView.cameraState.zoom, 7.836, accuracy: 0.001)
XCTAssertEqual(mapView.mapboxMap.cameraState.zoom, 7.836, accuracy: 0.001)
}

/// Test that zoom-in gesture change nothing if changed distance is ≤ threshold
Expand All @@ -20,7 +20,7 @@ final class ZoomInPinchGestureTestCase: GestureTestCase {
toDistance: EventGenerator.pinchSmallDistance + Constants.pinchThreshold,
duration: Constants.pinchDuration)

XCTAssertEqual(mapView.cameraState.zoom, 3)
XCTAssertEqual(mapView.mapboxMap.cameraState.zoom, 3)
}

/// Test that zooming-in happens if pinch gesture exceeds threshold by 1 point
Expand All @@ -31,7 +31,7 @@ final class ZoomInPinchGestureTestCase: GestureTestCase {
toDistance: EventGenerator.pinchSmallDistance + Constants.pinchThreshold + 1,
duration: Constants.pinchDuration)

XCTAssertEqual(mapView.cameraState.zoom, 3.050, accuracy: 0.001)
XCTAssertEqual(mapView.mapboxMap.cameraState.zoom, 3.051, accuracy: 0.001)
}

/// Same as ``testZoomInNextAfterThreshold`` on city zoom level
Expand All @@ -42,7 +42,7 @@ final class ZoomInPinchGestureTestCase: GestureTestCase {
toDistance: EventGenerator.pinchSmallDistance + Constants.pinchThreshold + 1,
duration: Constants.pinchDuration)

XCTAssertEqual(mapView.cameraState.zoom, 13.050, accuracy: 0.001)
XCTAssertEqual(mapView.mapboxMap.cameraState.zoom, 13.050, accuracy: 0.001)
}

/// Same as ``testZoomInNextAfterThresholdOnCloseZoom`` but for a few points instead of 1
Expand All @@ -54,6 +54,6 @@ final class ZoomInPinchGestureTestCase: GestureTestCase {
toDistance: EventGenerator.pinchSmallDistance + Constants.pinchThreshold + 4,
duration: Constants.pinchDuration)

XCTAssertEqual(mapView.cameraState.zoom, 13.192, accuracy: 0.001)
XCTAssertEqual(mapView.mapboxMap.cameraState.zoom, 13.192, accuracy: 0.001)
}
}

0 comments on commit b46fb47

Please sign in to comment.