5982: Apply PR comments

This commit is contained in:
MaximeE
2022-04-12 11:35:17 +02:00
parent 311a5a69e0
commit 9fa815cf8f
10 changed files with 70 additions and 76 deletions
@@ -18,7 +18,7 @@ import XCTest
import RiotSwiftUI
@available(iOS 14.0, *)
class StaticLocationSharingViewerUITests: MockScreenTest {
class StaticLocationViewingUITests: MockScreenTest {
private var app: XCUIApplication!
@@ -30,10 +30,10 @@ class StaticLocationSharingViewerUITests: MockScreenTest {
}
func testInitialExistingLocation() {
goToScreenWithIdentifier(MockStaticLocationSharingViewerScreenState.showUserLocation.title)
goToScreenWithIdentifier(MockStaticLocationViewingScreenState.showUserLocation.title)
XCTAssertTrue(app.buttons["Cancel"].exists)
XCTAssertTrue(app.buttons["LocationSharingView.shareButton"].exists)
XCTAssertTrue(app.buttons["StaticLocationView.shareButton"].exists)
XCTAssertTrue(app.otherElements["Map"].exists)
}
}
@@ -21,7 +21,7 @@ import CoreLocation
@testable import RiotSwiftUI
@available(iOS 14.0, *)
class StaticLocationSharingViewerViewModelTests: XCTestCase {
class StaticLocationViewingViewModelTests: XCTestCase {
var cancellables = Set<AnyCancellable>()
@@ -81,10 +81,10 @@ class StaticLocationSharingViewerViewModelTests: XCTestCase {
waitForExpectations(timeout: 3)
}
private func buildViewModel() -> StaticLocationSharingViewerViewModel {
StaticLocationSharingViewerViewModel(mapStyleURL: URL(string: "http://empty.com")!,
avatarData: AvatarInput(mxContentUri: "", matrixItemId: "", displayName: ""),
location: CLLocationCoordinate2D(latitude: 51.4932641, longitude: -0.257096),
coordinateType: .user)
private func buildViewModel() -> StaticLocationViewingViewModel {
StaticLocationViewingViewModel(mapStyleURL: URL(string: "http://empty.com")!,
avatarData: AvatarInput(mxContentUri: "", matrixItemId: "", displayName: ""),
location: CLLocationCoordinate2D(latitude: 51.4932641, longitude: -0.257096),
coordinateType: .user)
}
}