Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Add test that setting the center coordinate cancels animations - #2321

Merged
adam-mapbox merged 2 commits into
masterfrom
test_set_center_cancels
Sep 16, 2015
Merged

adam-mapbox merged 2 commits into
masterfrom
test_set_center_cancels

Conversation

@adam-mapbox

Copy link
Copy Markdown
Contributor

No description provided.

@incanus incanus added iOS Mapbox Maps SDK for iOS tests labels Sep 14, 2015
@incanus

incanus commented Sep 14, 2015

Copy link
Copy Markdown
Contributor

Refs #2313. Per @adam-mapbox we don't seem to need to do this on iOS as we did on Android in #2296. These tests help keep it that way.

Comment thread test/ios/MapViewTests.m

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adam-mapbox I think this is actually problematic because KIF/XCTest won't necessarily wait for this async dispatch before assuming the test passed. We should perhaps dispatch_after(), then follow up with a [tester waitForAnimationsToFinish];, then test that the conditions inside the dispatch were met. For example, we should set a variable there, then after waiting, test that the variable is as expected. Otherwise there is no way to guarantee that the block is run.

More: http://www.pumpmybicep.com/2014/08/20/asynchronous-unit-testing-with-xctest/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@incanus I amended this to use the asynchronous testing protocols.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

iOS Mapbox Maps SDK for iOS tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants