Skip to content

Commit

Permalink
Revert "add notes about broken/useless tests"
Browse files Browse the repository at this point in the history
This reverts commit 7d907bf.
  • Loading branch information
michaelkirk committed May 24, 2024
1 parent 708832e commit 44f15c2
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class NavigationViewControllerTests: XCTestCase {
let firstLocation = location(at: firstCoord)

var poi = [CLLocation]()
// REVIEW: What are these variable names? They seem completely unrelated to the intersections in the route.
let taylorStreetIntersection = routeController.routeProgress.route.legs.first!.steps.first!.intersections!.first!
let turkStreetIntersection = routeController.routeProgress.route.legs.first!.steps[3].intersections!.first!
let fultonStreetIntersection = routeController.routeProgress.route.legs.first!.steps[5].intersections!.first!
Expand Down Expand Up @@ -89,7 +88,6 @@ class NavigationViewControllerTests: XCTestCase {
XCTAssertFalse(wayNameView.isHidden, "WayNameView should be visible.")
}

// TODO: This test doesn't seem to be testing anything. Adding a test where `updatedStyleNumberOfTimes = 1` might be illuminating
func testNavigationShouldNotCallStyleManagerDidRefreshAppearanceMoreThanOnceWithOneStyle() {
let navigationViewController = NavigationViewController(for: initialRoute,
dayStyle: DayStyle(demoStyle: ()),
Expand All @@ -100,7 +98,6 @@ class NavigationViewControllerTests: XCTestCase {

let someLocation = self.dependencies.poi.first!

// TODO: Why are we updating with the same location 3 times?
routeController.locationManager(routeController.locationManager, didUpdateLocations: [someLocation])
routeController.locationManager(routeController.locationManager, didUpdateLocations: [someLocation])
routeController.locationManager(routeController.locationManager, didUpdateLocations: [someLocation])
Expand All @@ -109,7 +106,6 @@ class NavigationViewControllerTests: XCTestCase {
self.updatedStyleNumberOfTimes = 0
}

// TODO: This test doesn't seem to be testing anything. The route does not actually go through a tunnel.
// If tunnel flags are enabled and we need to switch styles, we should not force refresh the map style because we have only 1 style.
func testNavigationShouldNotCallStyleManagerDidRefreshAppearanceWhenOnlyOneStyle() {
let navigationViewController = NavigationViewController(for: initialRoute, dayStyle: DayStyle(demoStyle: ()), directions: fakeDirections, voiceController: FakeVoiceController())
Expand All @@ -118,7 +114,6 @@ class NavigationViewControllerTests: XCTestCase {

let someLocation = self.dependencies.poi.first!

// TODO: Why are we updating with the same location 3 times?
routeController.locationManager(routeController.locationManager, didUpdateLocations: [someLocation])
routeController.locationManager(routeController.locationManager, didUpdateLocations: [someLocation])
routeController.locationManager(routeController.locationManager, didUpdateLocations: [someLocation])
Expand All @@ -127,16 +122,13 @@ class NavigationViewControllerTests: XCTestCase {
self.updatedStyleNumberOfTimes = 0
}

// TODO: This test doesn't seem to be testing anything. The route does not actually go through a tunnel or do anything
// that would cause the style to change. Maybe having a positive test where the style *does* change exactly once would be helpful
func testNavigationShouldNotCallStyleManagerDidRefreshAppearanceMoreThanOnceWithTwoStyles() {
let navigationViewController = NavigationViewController(for: initialRoute, dayStyle: DayStyle(demoStyle: ()), nightStyle: NightStyle(demoStyle: ()), directions: fakeDirections, voiceController: FakeVoiceController())
let routeController = navigationViewController.routeController!
navigationViewController.styleManager.delegate = self

let someLocation = self.dependencies.poi.first!

// TODO: Why are we updating with the same location 3 times?
routeController.locationManager(routeController.locationManager, didUpdateLocations: [someLocation])
routeController.locationManager(routeController.locationManager, didUpdateLocations: [someLocation])
routeController.locationManager(routeController.locationManager, didUpdateLocations: [someLocation])
Expand Down

0 comments on commit 44f15c2

Please sign in to comment.