This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2015-05-22 19:35:25.041 Mapbox GL Tests[56917:4356076] KIFTester loaded
Test Suite 'Selected tests' started at 2015-05-23 02:35:26 +0000
Test Suite 'Test Bundle.xctest' started at 2015-05-23 02:35:26 +0000
Test Suite 'MapViewTests' started at 2015-05-23 02:35:26 +0000
Test Case '-[MapViewTests testBottomLayoutGuide]' started.
Test Case '-[MapViewTests testBottomLayoutGuide]' passed (0.014 seconds).
Test Case '-[MapViewTests testCenterSet]' started.
Test Case '-[MapViewTests testCenterSet]' passed (1.267 seconds).
Test Case '-[MapViewTests testCompassTap]' started.
Test Case '-[MapViewTests testCompassTap]' passed (1.657 seconds).
Test Case '-[MapViewTests testDelegateRegionDidChange]' started.
Test Case '-[MapViewTests testDelegateRegionDidChange]' passed (3.381 seconds).
Test Case '-[MapViewTests testDelegatesStartStopLocatingUser]' started.
Test Case '-[MapViewTests testDelegatesStartStopLocatingUser]' passed (0.003 seconds).
Test Case '-[MapViewTests testDirectionReset]' started.
Test Case '-[MapViewTests testDirectionReset]' passed (1.077 seconds).
Test Case '-[MapViewTests testDirectionSet]' started.
Test Case '-[MapViewTests testDirectionSet]' passed (1.059 seconds).
Test Case '-[MapViewTests testInsetMapView]' started.
Test Case '-[MapViewTests testInsetMapView]' passed (0.602 seconds).
Test Case '-[MapViewTests testPan]' started.
Test Case '-[MapViewTests testPan]' passed (1.062 seconds).
Test Case '-[MapViewTests testPanDisabled]' started.
Test Case '-[MapViewTests testPanDisabled]' passed (0.357 seconds).
Test Case '-[MapViewTests testRotate]' started.
Test Case '-[MapViewTests testRotate]' passed (2.256 seconds).
Test Case '-[MapViewTests testRotateDisabled]' started.
Test Case '-[MapViewTests testRotateDisabled]' passed (0.455 seconds).
Test Case '-[MapViewTests testTopLayoutGuide]' started.
Test Case '-[MapViewTests testTopLayoutGuide]' passed (0.735 seconds).
Test Case '-[MapViewTests testUserTrackingModeFollow]' started.
Test Case '-[MapViewTests testUserTrackingModeFollow]' passed (2.746 seconds).
Test Case '-[MapViewTests testZoom]' started.
Test Case '-[MapViewTests testZoom]' passed (1.648 seconds).
Test Case '-[MapViewTests testZoomDisabled]' started.
Test Case '-[MapViewTests testZoomDisabled]' passed (0.569 seconds).
Test Case '-[MapViewTests testZoomSet]' started.
Test Case '-[MapViewTests testZoomSet]' passed (0.003 seconds).
Test Suite 'MapViewTests' passed at 2015-05-23 02:35:45 +0000.
Executed 17 tests, with 0 failures (0 unexpected) in 18.890 (18.897) seconds
Test Suite 'Test Bundle.xctest' passed at 2015-05-23 02:35:45 +0000.
Executed 17 tests, with 0 failures (0 unexpected) in 18.890 (18.897) seconds
Test Suite 'Selected tests' passed at 2015-05-23 02:35:45 +0000.
Executed 17 tests, with 0 failures (0 unexpected) in 18.890 (18.898) seconds |
@@ -13,7 +22,7 @@ @interface MapViewTests : KIFTestCase <MGLMapViewDelegate> | |||
@implementation MapViewTests | |||
|
|||
- (void)beforeEach { | |||
[tester acknowledgeSystemAlert]; | |||
//[tester acknowledgeSystemAlert]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line can be removed now. (Yay!)
👍 |
@friedbunny, can you rebase and integrate this change? Thanks! |
Yes, I'll hit this today. I'm a little nervous about Travis throwing a tantrum, but we'll take that as it comes. |
- Adds testDelegatesStartStopLocatingUser: Tests mapViewWillStartLocatingUser and mapViewDidStopLocatingUser delegate methods - Adds testUserTrackingModeFollow - Adds testUserTrackingModeFollowWithHeading (disabled because of library bug) Fakes user location via swizzled CLLocationManager and hard-coded mock coordinates and heading.
Passed on Travis, merged in e75e538. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fakes user location via swizzled
CLLocationManager
and hard-coded mock coordinates and heading.testDelegatesStartStopLocatingUser
mapViewWillStartLocatingUser
andmapViewDidStopLocatingUser
delegate methodstestUserTrackingModeFollow
testUserTrackingModeFollowWithHeading
(disabled because of Unable to turn on user location tracking immediately at startup #1145)I've had this sitting around for a bit and finally cleaned it up for a pull request. This uses manual swizzling and predates our use of
OCMock
, but I plan to look into whether or not this would be better if switched.One thing to note: The test app no longer pops-up the location permission alert because the mock
CLLocationManager
does an end-run around permissions. This saves time before every test (by not calling[tester acknowledgeSystemAlert]
), but does diverge significantly from the norm and isn't ideal.I plan to add tests for location permissions handling, so I'll have to confront this problem soon.
/cc @1ec5 @bleege @incanus