Add location related analytics (#1241)

* Refactor trackComposer method

* Track location screen

* Refactor isPinDropSharing -> isSharingUserLocation

* Add trackComposer event

* Fix UTs

* Cleanup

* Add AnalyticsLocationType
This commit is contained in:
Alfonso Grillo
2023-07-05 12:54:03 +02:00
committed by GitHub
parent ce14d13962
commit d15d0e0070
12 changed files with 94 additions and 34 deletions
@@ -32,13 +32,13 @@ class StaticLocationScreenViewModelTests: XCTestCase {
override func setUpWithError() throws {
let viewModel = StaticLocationScreenViewModel(interactionMode: .picker)
viewModel.state.isPinDropSharing = false
viewModel.state.isSharingUserLocation = true
self.viewModel = viewModel
}
func testUserDidPan() async throws {
XCTAssertFalse(context.viewState.isPinDropSharing)
XCTAssertTrue(context.viewState.isSharingUserLocation)
context.send(viewAction: .userDidPan)
XCTAssertTrue(context.viewState.isPinDropSharing)
XCTAssertFalse(context.viewState.isSharingUserLocation)
}
}