5982: Clean code and add tests

This commit is contained in:
MaximeE
2022-04-11 10:55:23 +02:00
parent 29bb3a4a68
commit a3758731b9
10 changed files with 93 additions and 134 deletions

View File

@@ -20,7 +20,20 @@ import RiotSwiftUI
@available(iOS 14.0, *)
class StaticLocationSharingViewerUITests: MockScreenTest {
override class var screenType: MockScreenState.Type {
return MockStaticLocationSharingViewerScreenState.self
private var app: XCUIApplication!
override func setUp() {
continueAfterFailure = false
app = XCUIApplication()
app.launch()
}
func testInitialExistingLocation() {
goToScreenWithIdentifier(MockStaticLocationSharingViewerScreenState.showUserLocation.title)
XCTAssertTrue(app.buttons["Cancel"].exists)
XCTAssertTrue(app.buttons["LocationSharingView.shareButton"].exists)
XCTAssertTrue(app.otherElements["Map"].exists)
}
}