mapbox / mapbox-navigation-ios

Turn-by-turn navigation logic and UI in Swift on iOS
https://docs.mapbox.com/ios/navigation/
Other
860 stars 310 forks source link

TestHelper should not depend on MapboxNavigation #2820

Closed 1ec5 closed 3 years ago

1ec5 commented 3 years ago

TestHelper depends on MapboxNavigation, which has some awkward consequences with SPM:

We should remove TestHelper’s dependency on MapboxNavigation. The only thing that requires MapboxNavigation is Plotter, so perhaps we could change it to plot routes on a static map using MapboxStatic.swift.

/cc @mapbox/navigation-ios

1ec5 commented 3 years ago

First step is to replace usage of RoutePlotter in RouteControllerSnapshotTests and SimulationLocationManagerTests with a simple check that the route has the right coordinates. Then the only usage of RoutePlotter is in ManeuverArrowTests, which is part of MapboxNavigationTests, so we can move NavigationPlotter.swift from the TestHelper target to the MapboxNavigationTests target and remove TestHelper’s dependency on MapboxNavigation (and the map SDK).

1ec5 commented 3 years ago

Fixed in mapbox/mapbox-navigation-ios#2861.