diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 14314704e..875a94971 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 182BC42027BE667200A30C33 /* RoomModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 182BC41F27BE667200A30C33 /* RoomModelProtocol.swift */; }; + 182BC42227BE6C6900A30C33 /* MockRoomModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 182BC42127BE6C6900A30C33 /* MockRoomModel.swift */; }; 1850253F27B6918D002E6B18 /* ElementXTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1850253E27B6918D002E6B18 /* ElementXTests.swift */; }; 1850254927B6918D002E6B18 /* ElementXUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1850254827B6918D002E6B18 /* ElementXUITests.swift */; }; 1850254B27B6918D002E6B18 /* ElementXUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1850254A27B6918D002E6B18 /* ElementXUITestsLaunchTests.swift */; }; @@ -74,6 +76,9 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 182BC41F27BE667200A30C33 /* RoomModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomModelProtocol.swift; sourceTree = ""; }; + 182BC42127BE6C6900A30C33 /* MockRoomModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockRoomModel.swift; sourceTree = ""; }; + 184230FE27BD080000033771 /* matrix-rust-components-swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "matrix-rust-components-swift"; path = "../matrix-rust-components-swift"; sourceTree = ""; }; 1850252427B6918C002E6B18 /* ElementX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ElementX.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1850253A27B6918D002E6B18 /* ElementXTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ElementXTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 1850253E27B6918D002E6B18 /* ElementXTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElementXTests.swift; sourceTree = ""; }; @@ -155,6 +160,7 @@ 1850251B27B6918C002E6B18 = { isa = PBXGroup; children = ( + 184230FE27BD080000033771 /* matrix-rust-components-swift */, 1850252627B6918C002E6B18 /* ElementX */, 1850253D27B6918D002E6B18 /* ElementXTests */, 1850254727B6918D002E6B18 /* ElementXUITests */, @@ -402,6 +408,8 @@ isa = PBXGroup; children = ( 1863A49327BAAA6700B52E4D /* RoomModel.swift */, + 182BC41F27BE667200A30C33 /* RoomModelProtocol.swift */, + 182BC42127BE6C6900A30C33 /* MockRoomModel.swift */, ); path = Models; sourceTree = ""; @@ -585,6 +593,7 @@ 1863A45727BA7A7800B52E4D /* WeakDictionaryReference.swift in Sources */, 1863A48927BAA8A900B52E4D /* HomeScreenModels.swift in Sources */, 1863A45027BA79FF00B52E4D /* NavigationRouterType.swift in Sources */, + 182BC42027BE667200A30C33 /* RoomModelProtocol.swift in Sources */, 1863A45627BA7A7800B52E4D /* WeakDictionaryKeyReference.swift in Sources */, 1863A49427BAAA6700B52E4D /* RoomModel.swift in Sources */, 1850256F27B6A135002E6B18 /* AppDelegate.swift in Sources */, @@ -597,6 +606,7 @@ 1863A43F27BA790000B52E4D /* Coordinator.swift in Sources */, 1863A41C27BA76B900B52E4D /* MXLog.swift in Sources */, 1863A44E27BA79FF00B52E4D /* Presentable.swift in Sources */, + 182BC42227BE6C6900A30C33 /* MockRoomModel.swift in Sources */, 1850256C27B6A135002E6B18 /* AppCoordinator.swift in Sources */, 1863A43127BA784300B52E4D /* LoginScreenModels.swift in Sources */, 1863A44A27BA79FF00B52E4D /* NavigationRouter.swift in Sources */, diff --git a/ElementX/Sources/Modules/Authentication/LoginScreen/LoginScreenCoordinator.swift b/ElementX/Sources/Modules/Authentication/LoginScreen/LoginScreenCoordinator.swift index d20888a80..5055b7815 100644 --- a/ElementX/Sources/Modules/Authentication/LoginScreen/LoginScreenCoordinator.swift +++ b/ElementX/Sources/Modules/Authentication/LoginScreen/LoginScreenCoordinator.swift @@ -38,7 +38,6 @@ final class LoginScreenCoordinator: Coordinator, Presentable { // MARK: - Setup - @available(iOS 14.0, *) init(parameters: LoginScreenCoordinatorParameters) { self.parameters = parameters diff --git a/ElementX/Sources/Modules/Authentication/LoginScreen/Test/UI/LoginScreenUITests.swift b/ElementX/Sources/Modules/Authentication/LoginScreen/Test/UI/LoginScreenUITests.swift index ee547b6a1..e6085fff9 100644 --- a/ElementX/Sources/Modules/Authentication/LoginScreen/Test/UI/LoginScreenUITests.swift +++ b/ElementX/Sources/Modules/Authentication/LoginScreen/Test/UI/LoginScreenUITests.swift @@ -15,31 +15,3 @@ // import XCTest -import RiotSwiftUI - -@available(iOS 14.0, *) -class LoginScreenUITests: MockScreenTest { - - override class var screenType: MockScreenState.Type { - return MockLoginScreenScreenState.self - } - - override class func createTest() -> MockScreenTest { - return LoginScreenUITests(selector: #selector(verifyLoginScreenScreen)) - } - - func verifyLoginScreenScreen() throws { - guard let screenState = screenState as? MockLoginScreenScreenState else { fatalError("no screen") } - switch screenState { - case .promptType(let promptType): - verifyLoginScreenPromptType(promptType: promptType) - } - } - - func verifyLoginScreenPromptType(promptType: LoginScreenPromptType) { - let title = app.staticTexts["title"] - XCTAssert(title.exists) - XCTAssertEqual(title.label, promptType.title) - } - -} diff --git a/ElementX/Sources/Modules/Authentication/LoginScreen/Test/Unit/LoginScreenViewModelTests.swift b/ElementX/Sources/Modules/Authentication/LoginScreen/Test/Unit/LoginScreenViewModelTests.swift index 4ec5e7773..8e571e570 100644 --- a/ElementX/Sources/Modules/Authentication/LoginScreen/Test/Unit/LoginScreenViewModelTests.swift +++ b/ElementX/Sources/Modules/Authentication/LoginScreen/Test/Unit/LoginScreenViewModelTests.swift @@ -18,7 +18,6 @@ import XCTest @testable import ElementX -@available(iOS 14.0, *) class LoginScreenViewModelTests: XCTestCase { override func setUpWithError() throws { diff --git a/ElementX/Sources/Modules/Authentication/LoginScreen/View/LoginScreen.swift b/ElementX/Sources/Modules/Authentication/LoginScreen/View/LoginScreen.swift index 3250d9856..3fb86a39b 100644 --- a/ElementX/Sources/Modules/Authentication/LoginScreen/View/LoginScreen.swift +++ b/ElementX/Sources/Modules/Authentication/LoginScreen/View/LoginScreen.swift @@ -16,7 +16,6 @@ import SwiftUI -@available(iOS 14.0, *) struct LoginScreen: View { @ObservedObject var context: LoginScreenViewModel.Context diff --git a/ElementX/Sources/Modules/HomeScreen/Test/UI/HomeScreenUITests.swift b/ElementX/Sources/Modules/HomeScreen/Test/UI/HomeScreenUITests.swift index 9eab6c1fa..e6085fff9 100644 --- a/ElementX/Sources/Modules/HomeScreen/Test/UI/HomeScreenUITests.swift +++ b/ElementX/Sources/Modules/HomeScreen/Test/UI/HomeScreenUITests.swift @@ -15,31 +15,3 @@ // import XCTest -import ElementX - -@available(iOS 14.0, *) -class HomeScreenUITests: MockScreenTest { - - override class var screenType: MockScreenState.Type { - return MockHomeScreenScreenState.self - } - - override class func createTest() -> MockScreenTest { - return HomeScreenUITests(selector: #selector(verifyHomeScreenScreen)) - } - - func verifyHomeScreenScreen() throws { - guard let screenState = screenState as? MockHomeScreenScreenState else { fatalError("no screen") } - switch screenState { - case .promptType(let promptType): - verifyHomeScreenPromptType(promptType: promptType) - } - } - - func verifyHomeScreenPromptType(promptType: HomeScreenPromptType) { - let title = app.staticTexts["title"] - XCTAssert(title.exists) - XCTAssertEqual(title.label, promptType.title) - } - -} diff --git a/ElementX/Sources/Modules/HomeScreen/Test/Unit/HomeScreenViewModelTests.swift b/ElementX/Sources/Modules/HomeScreen/Test/Unit/HomeScreenViewModelTests.swift index 2a8aa1f11..2b5a7a956 100644 --- a/ElementX/Sources/Modules/HomeScreen/Test/Unit/HomeScreenViewModelTests.swift +++ b/ElementX/Sources/Modules/HomeScreen/Test/Unit/HomeScreenViewModelTests.swift @@ -18,7 +18,6 @@ import XCTest @testable import ElementX -@available(iOS 14.0, *) class HomeScreenViewModelTests: XCTestCase { override func setUpWithError() throws { diff --git a/ElementX/Sources/Modules/Routers/NavigationRouter.swift b/ElementX/Sources/Modules/Routers/NavigationRouter.swift index 974f935b8..44f443d2c 100755 --- a/ElementX/Sources/Modules/Routers/NavigationRouter.swift +++ b/ElementX/Sources/Modules/Routers/NavigationRouter.swift @@ -356,7 +356,7 @@ extension NavigationRouter: UINavigationControllerDelegate { func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) { - // TODO: Try to post `NavigationRouter.willPopModule` notification here + // Try to post `NavigationRouter.willPopModule` notification here } func navigationController(_ navigationController: UINavigationController, didShow viewController: UIViewController, animated: Bool) { diff --git a/ElementX/Sources/Modules/Routers/NavigationRouterStore.swift b/ElementX/Sources/Modules/Routers/NavigationRouterStore.swift index 8101eeed1..e847a0ebc 100644 --- a/ElementX/Sources/Modules/Routers/NavigationRouterStore.swift +++ b/ElementX/Sources/Modules/Routers/NavigationRouterStore.swift @@ -25,7 +25,7 @@ class NavigationRouterStore: NavigationRouterStoreProtocol { // MARK: - Properties - // FIXME: WeakDictionary does not work with protocol + // WeakDictionary does not work with protocol // Find a way to use NavigationRouterType as value private var navigationRouters = WeakDictionary() @@ -74,7 +74,7 @@ class NavigationRouterStore: NavigationRouterStoreProtocol { if let existingNavigationRouter = self.findNavigationRouter(for: navigationController) { fatalError("\(existingNavigationRouter) is already tied to the same navigation controller as \(navigationRouter). We should have only one NavigationRouter per navigation controller") } else { - // FIXME: WeakDictionary does not work with protocol + // WeakDictionary does not work with protocol // Find a way to avoid this cast self.navigationRouters[navigationController] = navigationRouter as? NavigationRouter }