diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 9ac9f7454..f36b6bdc3 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -3,11 +3,10 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 56; objects = { /* Begin PBXBuildFile section */ - 000765812BABB81F5174C601 /* AppLockSetupPINScreenUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEDC38E389B89BCF5C1AFD4A /* AppLockSetupPINScreenUITests.swift */; }; 0033481EE363E4914295F188 /* LocalizationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C070FD43DC6BF4E50217965A /* LocalizationTests.swift */; }; 0180C44B997EDA8D21F883AC /* RoomNotificationSettingsCustomSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B746EFA112532A7B701FB914 /* RoomNotificationSettingsCustomSectionView.swift */; }; 020C530986D7B97631877FEF /* TimelineItemMacContextMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4AD793D50748F8997E5B15 /* TimelineItemMacContextMenu.swift */; }; @@ -251,6 +250,7 @@ 440123E29E2F9B001A775BBE /* TimelineItemProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D505843AB66822EB91F0DF0 /* TimelineItemProxy.swift */; }; 44121202B4A260C98BF615A7 /* RoomMembersListScreenUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5B7A755E985FA14469E86B2 /* RoomMembersListScreenUITests.swift */; }; 44BDD670FF9095ACE240A3A2 /* VoiceMessageMediaManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC4F10BDD56FA77FEC742333 /* VoiceMessageMediaManagerTests.swift */; }; + 44DA28B1E1F9C97C5795F7B3 /* AppLockSetupUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8A1BBEF7318CA6B6ACCF4AE /* AppLockSetupUITests.swift */; }; 44F0E1B576C7599DF8022071 /* SwiftOGG in Frameworks */ = {isa = PBXBuildFile; productRef = 391D11F92DFC91666AA1503F /* SwiftOGG */; }; 454F8DDC4442C0DE54094902 /* LABiometryType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3F219838588C62198E726E3 /* LABiometryType.swift */; }; 4557192F5B15A8D9BB920232 /* AdvancedSettingsScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E492690C8B27A892C194CC4 /* AdvancedSettingsScreenCoordinator.swift */; }; @@ -542,6 +542,8 @@ 9095B9E40DB5CF8BA26CE0D8 /* ReactionsSummaryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 153726EDCE1ACBB3D466A916 /* ReactionsSummaryView.swift */; }; 90DF83A6A347F7EE7EDE89EE /* AttributedStringBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF25E364AE85090A70AE4644 /* AttributedStringBuilderTests.swift */; }; 90EB25D13AE6EEF034BDE9D2 /* Assets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71D52BAA5BADB06E5E8C295D /* Assets.swift */; }; + 915E65C12AFA8F3F00DFB3BA /* LAContextMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 915E65C02AFA8F3F00DFB3BA /* LAContextMock.swift */; }; + 915E65C32AFA969D00DFB3BA /* BlanckFormCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 915E65C22AFA969D00DFB3BA /* BlanckFormCoordinator.swift */; }; 91ABC91758A6E4A5FAA2E9C4 /* ReadReceipt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 314F1C79850BE46E8ABEAFCB /* ReadReceipt.swift */; }; 92133B170A1F917685E9FF78 /* OnboardingScreenUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D168471461717AF5689F64B /* OnboardingScreenUITests.swift */; }; 9219640F4D980CFC5FE855AD /* target.yml in Resources */ = {isa = PBXBuildFile; fileRef = 536E72DCBEEC4A1FE66CFDCE /* target.yml */; }; @@ -1036,7 +1038,7 @@ 033DB41C51865A2E83174E87 /* target.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = target.yml; sourceTree = ""; }; 035177BCD8E8308B098AC3C2 /* WindowManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowManager.swift; sourceTree = ""; }; 0376C429FAB1687C3D905F3E /* MockCoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockCoder.swift; sourceTree = ""; }; - 0392E3FDE372C9B56FEEED8B /* test_voice_message.m4a */ = {isa = PBXFileReference; path = test_voice_message.m4a; sourceTree = ""; }; + 0392E3FDE372C9B56FEEED8B /* test_voice_message.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_voice_message.m4a; sourceTree = ""; }; 03DD998E523D4EC93C7ED703 /* RoomNotificationSettingsScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomNotificationSettingsScreenViewModelProtocol.swift; sourceTree = ""; }; 03FABD73FD8086EFAB699F42 /* MediaUploadPreviewScreenViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaUploadPreviewScreenViewModelTests.swift; sourceTree = ""; }; 045253F9967A535EE5B16691 /* Label.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Label.swift; sourceTree = ""; }; @@ -1096,7 +1098,7 @@ 127C8472672A5BA09EF1ACF8 /* CurrentValuePublisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurrentValuePublisher.swift; sourceTree = ""; }; 12EDAFB64FA5F6812D54F39A /* MigrationScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MigrationScreenViewModel.swift; sourceTree = ""; }; 12F1E7F9C2BE8BB751037826 /* WaitlistScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistScreenCoordinator.swift; sourceTree = ""; }; - 1304D9191300873EADA52D6E /* IntegrationTests.xctestplan */ = {isa = PBXFileReference; path = IntegrationTests.xctestplan; sourceTree = ""; }; + 1304D9191300873EADA52D6E /* IntegrationTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = IntegrationTests.xctestplan; sourceTree = ""; }; 130ED565A078F7E0B59D9D25 /* UNTextInputNotificationResponse+Creator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UNTextInputNotificationResponse+Creator.swift"; sourceTree = ""; }; 13802897C7AFA360EA74C0B0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = ""; }; 1423AB065857FA546444DB15 /* NotificationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationManager.swift; sourceTree = ""; }; @@ -1514,7 +1516,7 @@ 8D55702474F279D910D2D162 /* RoomStateEventStringBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomStateEventStringBuilder.swift; sourceTree = ""; }; 8D8169443E5AC5FF71BFB3DB /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = ""; }; 8DC2C9E0E15C79BBDA80F0A2 /* TimelineStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineStyle.swift; sourceTree = ""; }; - 8E088F2A1B9EC529D3221931 /* UITests.xctestplan */ = {isa = PBXFileReference; path = UITests.xctestplan; sourceTree = ""; }; + 8E088F2A1B9EC529D3221931 /* UITests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UITests.xctestplan; sourceTree = ""; }; 8E1BBA73B611EDEEA6E20E05 /* InvitesScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvitesScreenModels.swift; sourceTree = ""; }; 8EC57A32ABC80D774CC663DB /* SettingsScreenUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsScreenUITests.swift; sourceTree = ""; }; 8F21ED7205048668BEB44A38 /* AppActivityView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppActivityView.swift; sourceTree = ""; }; @@ -1526,6 +1528,8 @@ 90A55430639712CFACA34F43 /* TextRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextRoomTimelineItem.swift; sourceTree = ""; }; 90F2F8998E5632668B0AD848 /* RoomTimelineItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineItemView.swift; sourceTree = ""; }; 913C8E13B8B602C7B6C0C4AE /* PillTextAttachmentData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PillTextAttachmentData.swift; sourceTree = ""; }; + 915E65C02AFA8F3F00DFB3BA /* LAContextMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LAContextMock.swift; sourceTree = ""; }; + 915E65C22AFA969D00DFB3BA /* BlanckFormCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlanckFormCoordinator.swift; sourceTree = ""; }; 91831D7042EADD0CC2B5EC36 /* SecureBackupScreenUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureBackupScreenUITests.swift; sourceTree = ""; }; 91CF6F7D08228D16BA69B63B /* zh-Hant-TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant-TW"; path = "zh-Hant-TW.lproj/Localizable.strings"; sourceTree = ""; }; 923485F85E1D765EF9D20E88 /* UserProfileCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserProfileCell.swift; sourceTree = ""; }; @@ -1626,7 +1630,6 @@ AE40D4A5DD857AC16EED945A /* URLSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSession.swift; sourceTree = ""; }; AE52983FAFB4E0998C00EE8A /* CancellableTask.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CancellableTask.swift; sourceTree = ""; }; AE5DDBEBBA17973ED4638823 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = de; path = de.lproj/Localizable.stringsdict; sourceTree = ""; }; - AEDC38E389B89BCF5C1AFD4A /* AppLockSetupPINScreenUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLockSetupPINScreenUITests.swift; sourceTree = ""; }; AEEAFB646E583655652C3D04 /* RoomStateEventStringBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomStateEventStringBuilderTests.swift; sourceTree = ""; }; AF042B0FB2EE88977C91E330 /* portrait_test_image.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = portrait_test_image.jpg; sourceTree = ""; }; AF11DD57D9FACF2A757AB024 /* AnalyticsPromptUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsPromptUITests.swift; sourceTree = ""; }; @@ -1649,7 +1652,7 @@ B4CFE236419E830E8946639C /* Analytics+SwiftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Analytics+SwiftUI.swift"; sourceTree = ""; }; B590BD4507D4F0A377FDE01A /* LoadableAvatarImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadableAvatarImage.swift; sourceTree = ""; }; B5B243E7818E5E9F6A4EDC7A /* NoticeRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticeRoomTimelineView.swift; sourceTree = ""; }; - B61C339A2FDDBD067FF6635C /* ConfettiScene.scn */ = {isa = PBXFileReference; path = ConfettiScene.scn; sourceTree = ""; }; + B61C339A2FDDBD067FF6635C /* ConfettiScene.scn */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; path = ConfettiScene.scn; sourceTree = ""; }; B6311F21F911E23BE4DF51B4 /* ReadMarkerRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadMarkerRoomTimelineView.swift; sourceTree = ""; }; B63B69F9A2BC74DD40DC75C8 /* AdvancedSettingsScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedSettingsScreenViewModel.swift; sourceTree = ""; }; B697816AF93DA06EC58C5D70 /* WaitlistScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistScreenViewModelProtocol.swift; sourceTree = ""; }; @@ -1754,7 +1757,7 @@ CD95B3714F806AC9CF9A557B /* ComposerToolbarViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposerToolbarViewModel.swift; sourceTree = ""; }; CDB3227C7A74B734924942E9 /* RoomSummaryProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSummaryProvider.swift; sourceTree = ""; }; CEE0E6043EFCF6FD2A341861 /* TimelineReplyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineReplyView.swift; sourceTree = ""; }; - CEE41494C837AA403A06A5D9 /* UnitTests.xctestplan */ = {isa = PBXFileReference; path = UnitTests.xctestplan; sourceTree = ""; }; + CEE41494C837AA403A06A5D9 /* UnitTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UnitTests.xctestplan; sourceTree = ""; }; CF48AF076424DBC1615C74AD /* AuthenticationServiceProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationServiceProxy.swift; sourceTree = ""; }; D0140615D2232612C813FD6C /* EncryptedHistoryRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptedHistoryRoomTimelineItem.swift; sourceTree = ""; }; D071F86CD47582B9196C9D16 /* UserDiscoverySection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDiscoverySection.swift; sourceTree = ""; }; @@ -1843,6 +1846,7 @@ E80F9E9B93B6ECE9A937B1C6 /* FormRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormRow.swift; sourceTree = ""; }; E8294DB9E95C0C0630418466 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = ""; }; E8774CF614849664B5B3C2A1 /* UserSessionFlowCoordinatorStateMachine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSessionFlowCoordinatorStateMachine.swift; sourceTree = ""; }; + E8A1BBEF7318CA6B6ACCF4AE /* AppLockSetupUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLockSetupUITests.swift; sourceTree = ""; }; E8A1F98AE670377B20679FF5 /* MediaPlayerProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaPlayerProvider.swift; sourceTree = ""; }; E8AE4B3273BA189FDCD4055C /* UserIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserIndicator.swift; sourceTree = ""; }; E8CA187FE656EE5A3F6C7DE5 /* UIFont+AttributedStringBuilder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIFont+AttributedStringBuilder.m"; sourceTree = ""; }; @@ -1858,7 +1862,7 @@ ECF79FB25E2D4BD6F50CE7C9 /* RoomMembersListScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMembersListScreenViewModel.swift; sourceTree = ""; }; ED044D00F2176681CC02CD54 /* HomeScreenRoomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeScreenRoomCell.swift; sourceTree = ""; }; ED1D792EB82506A19A72C8DE /* RoomTimelineItemProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineItemProtocol.swift; sourceTree = ""; }; - ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; path = message.caf; sourceTree = ""; }; + ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = message.caf; sourceTree = ""; }; ED983D4DCA5AFA6E1ED96099 /* StateRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StateRoomTimelineView.swift; sourceTree = ""; }; EDAA4472821985BF868CC21C /* ServerSelectionViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionViewModelTests.swift; sourceTree = ""; }; EE378083653EF0C9B5E9D580 /* EmoteRoomTimelineItemContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmoteRoomTimelineItemContent.swift; sourceTree = ""; }; @@ -1873,7 +1877,7 @@ F174A5627CDB3CAF280D1880 /* EmojiPickerScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiPickerScreenModels.swift; sourceTree = ""; }; F17EFA1D3D09FC2F9C5E1CB2 /* MediaProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaProvider.swift; sourceTree = ""; }; F1B8500C152BC59445647DA8 /* UnsupportedRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnsupportedRoomTimelineItem.swift; sourceTree = ""; }; - F2D513D2477B57F90E98EEC0 /* portrait_test_video.mp4 */ = {isa = PBXFileReference; path = portrait_test_video.mp4; sourceTree = ""; }; + F2D513D2477B57F90E98EEC0 /* portrait_test_video.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = portrait_test_video.mp4; sourceTree = ""; }; F31F59030205A6F65B057E1A /* MatrixEntityRegexTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatrixEntityRegexTests.swift; sourceTree = ""; }; F348B5F2C12F9D4F4B4D3884 /* VideoRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRoomTimelineItem.swift; sourceTree = ""; }; F36C0A6D59717193F49EA986 /* UserSessionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSessionTests.swift; sourceTree = ""; }; @@ -2399,6 +2403,7 @@ 46C208DA43CE25D13E670F40 /* UITestsAppCoordinator.swift */, 6CEBE5EA91E8691EDF364EC2 /* UITestsScreenIdentifier.swift */, B7F0192CE2F891141A25B49F /* UITestsSignalling.swift */, + 915E65C22AFA969D00DFB3BA /* BlanckFormCoordinator.swift */, ); path = UITests; sourceTree = ""; @@ -3342,6 +3347,7 @@ 851B95BB98649B8E773D6790 /* AppLockService.swift */, 26EAAB54C6CE91D64B69A9F8 /* AppLockServiceProtocol.swift */, 490BEADEFB2D6B7C9F618AE8 /* AppLockTimer.swift */, + 915E65C02AFA8F3F00DFB3BA /* LAContextMock.swift */, ); path = AppLock; sourceTree = ""; @@ -3691,7 +3697,7 @@ 16037EE9E9A52AF37B7818E3 /* AnalyticsSettingsScreenUITests.swift */, 7D0CBC76C80E04345E11F2DB /* Application.swift */, 349C633291427A0F29C28C54 /* AppLockScreenUITests.swift */, - AEDC38E389B89BCF5C1AFD4A /* AppLockSetupPINScreenUITests.swift */, + E8A1BBEF7318CA6B6ACCF4AE /* AppLockSetupUITests.swift */, 5D2D0A6F1ABC99D29462FB84 /* AuthenticationCoordinatorUITests.swift */, C6FEA87EA3752203065ECE27 /* BugReportUITests.swift */, 1D8866FE1CCCF10305FCACBC /* CallScreenUITests.swift */, @@ -5497,6 +5503,7 @@ EEAE954289DE813A61656AE0 /* LayoutDirection.swift in Sources */, 42B084FDE621FBEE433AF444 /* LegalInformationScreen.swift in Sources */, 9EBDC79CAC9B63A0D626E333 /* LegalInformationScreenCoordinator.swift in Sources */, + 915E65C12AFA8F3F00DFB3BA /* LAContextMock.swift in Sources */, F40B097470D3110DFDB1FAAA /* LegalInformationScreenModels.swift in Sources */, BDED6DA7AD1E76018C424143 /* LegalInformationScreenViewModel.swift in Sources */, A9D349478F7D4A2B1E40CEF9 /* LegalInformationScreenViewModelProtocol.swift in Sources */, @@ -5779,6 +5786,7 @@ E0B6A569AC3E81D233B43D60 /* SettingsScreenViewModel.swift in Sources */, A009BDFB0A6816D4C392ADCB /* SettingsScreenViewModelProtocol.swift in Sources */, 1C8BC70A18060677E295A846 /* ShareToMapsAppActivity.swift in Sources */, + 915E65C32AFA969D00DFB3BA /* BlanckFormCoordinator.swift in Sources */, 8922219C5C934C4155E8CA50 /* SharedUserDefaultsKeys.swift in Sources */, 274CE3C986841D15FD530BF5 /* ShimmerModifier.swift in Sources */, 77920AFA8091AC6B9F190C90 /* Signposter.swift in Sources */, @@ -5933,7 +5941,7 @@ 8024BE37156FF0A95A7A3465 /* AnalyticsPromptUITests.swift in Sources */, BF675964C9159F718589C36A /* AnalyticsSettingsScreenUITests.swift in Sources */, F05516474DB42369FD976CEF /* AppLockScreenUITests.swift in Sources */, - 000765812BABB81F5174C601 /* AppLockSetupPINScreenUITests.swift in Sources */, + 44DA28B1E1F9C97C5795F7B3 /* AppLockSetupUITests.swift in Sources */, 7405B4824D45BA7C3D943E76 /* Application.swift in Sources */, ACF094CF3BF02DBFA6DFDE60 /* AuthenticationCoordinatorUITests.swift in Sources */, 7756C4E90CABE6F14F7920A0 /* BugReportUITests.swift in Sources */, diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index aaeb4e22a..ac87ac380 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -263,7 +263,7 @@ { "identity" : "swiftui-introspect", "kind" : "remoteSourceControl", - "location" : "https://github.com/siteline/SwiftUI-Introspect.git", + "location" : "https://github.com/siteline/SwiftUI-Introspect", "state" : { "revision" : "b94da693e57eaf79d16464b8b7c90d09cba4e290", "version" : "0.9.2" diff --git a/ElementX/Sources/Mocks/Generated/GeneratedMocks.swift b/ElementX/Sources/Mocks/Generated/GeneratedMocks.swift index 4e241209b..c7037fb31 100644 --- a/ElementX/Sources/Mocks/Generated/GeneratedMocks.swift +++ b/ElementX/Sources/Mocks/Generated/GeneratedMocks.swift @@ -1,4 +1,4 @@ -// Generated using Sourcery 2.1.1 — https://github.com/krzysztofzablocki/Sourcery +// Generated using Sourcery 2.1.2 — https://github.com/krzysztofzablocki/Sourcery // DO NOT EDIT // swiftlint:disable all diff --git a/ElementX/Sources/Other/AccessibilityIdentifiers.swift b/ElementX/Sources/Other/AccessibilityIdentifiers.swift index f7d74cc3d..e09b4d5c1 100644 --- a/ElementX/Sources/Other/AccessibilityIdentifiers.swift +++ b/ElementX/Sources/Other/AccessibilityIdentifiers.swift @@ -16,8 +16,12 @@ import Foundation -struct A11yIdentifiers { +enum A11yIdentifiers { + static let alertInfo = AlertInfo() static let analyticsPromptScreen = AnalyticsPromptScreen() + static let appLockSetupBiometricsScreen = AppLockSetupBiometricsScreen() + static let appLockSetupPINScreen = AppLockSetupPINScreen() + static let appLockSetupSettingsScreen = AppLockSetupSettingsScreen() static let bugReportScreen = BugReportScreen() static let changeServerScreen = ChangeServer() static let homeScreen = HomeScreen() @@ -41,6 +45,25 @@ struct A11yIdentifiers { static let notificationSettingsScreen = NotificationSettingsScreen() static let notificationSettingsEditScreen = NotificationSettingsEditScreen() static let createPollScreen = CreatePollScreen() + + struct AlertInfo { + let primaryButton = "alert_info-primary_button" + let secondaryButton = "alert_info-secondary_button" + } + + struct AppLockSetupBiometricsScreen { + let allow = "app_lock_setup_biometrics-allow" + } + + struct AppLockSetupPINScreen { + let cancel = "app_lock_setup_pin-cancel" + } + + struct AppLockSetupSettingsScreen { + let changePIN = "app_lock_setup_settings-change_pin" + let removePIN = "app_lock_setup_settings-remove_pin" + let removePINAlertYes = "app_lock_setup_settings-remove_pin_alert_yes" + } struct AnalyticsPromptScreen { let title = "analytics_prompt-title" diff --git a/ElementX/Sources/Other/Extensions/Alert.swift b/ElementX/Sources/Other/Extensions/Alert.swift index a67911b2e..051a18811 100644 --- a/ElementX/Sources/Other/Extensions/Alert.swift +++ b/ElementX/Sources/Other/Extensions/Alert.swift @@ -129,11 +129,13 @@ extension View { Button(item.primaryButton.title, role: item.primaryButton.role) { item.primaryButton.action?() } + .accessibilityIdentifier(A11yIdentifiers.alertInfo.primaryButton) if let secondaryButton = item.secondaryButton { Button(secondaryButton.title, role: secondaryButton.role) { secondaryButton.action?() } + .accessibilityIdentifier(A11yIdentifiers.alertInfo.secondaryButton) } } message: { item in if let message = item.message { diff --git a/ElementX/Sources/Screens/AppLock/AppLockSetupBiometricsScreen/View/AppLockSetupBiometricsScreen.swift b/ElementX/Sources/Screens/AppLock/AppLockSetupBiometricsScreen/View/AppLockSetupBiometricsScreen.swift index 833f62e1e..11afc6236 100644 --- a/ElementX/Sources/Screens/AppLock/AppLockSetupBiometricsScreen/View/AppLockSetupBiometricsScreen.swift +++ b/ElementX/Sources/Screens/AppLock/AppLockSetupBiometricsScreen/View/AppLockSetupBiometricsScreen.swift @@ -49,6 +49,7 @@ struct AppLockSetupBiometricsScreen: View { .font(.system(size: 72)) .padding(.top, 58) .padding(.bottom, 26) + .accessibilityHidden(true) Text(context.viewState.title) .font(.compound.headingMDBold) @@ -66,6 +67,7 @@ struct AppLockSetupBiometricsScreen: View { VStack(spacing: 16) { Button(context.viewState.title) { context.send(viewAction: .allow) } .buttonStyle(.compound(.primary)) + .accessibilityIdentifier(A11yIdentifiers.appLockSetupBiometricsScreen.allow) Button { context.send(viewAction: .skip) } label: { Text(L10n.screenAppLockSetupBiometricUnlockSkip) diff --git a/ElementX/Sources/Screens/AppLock/AppLockSetupPINScreen/View/AppLockSetupPINScreen.swift b/ElementX/Sources/Screens/AppLock/AppLockSetupPINScreen/View/AppLockSetupPINScreen.swift index 552995727..22a80d7cb 100644 --- a/ElementX/Sources/Screens/AppLock/AppLockSetupPINScreen/View/AppLockSetupPINScreen.swift +++ b/ElementX/Sources/Screens/AppLock/AppLockSetupPINScreen/View/AppLockSetupPINScreen.swift @@ -83,6 +83,7 @@ struct AppLockSetupPINScreen: View { Button(L10n.actionCancel) { context.send(viewAction: .cancel) } + .accessibilityIdentifier(A11yIdentifiers.appLockSetupPINScreen.cancel) } } } diff --git a/ElementX/Sources/Screens/AppLock/AppLockSetupSettingsScreen/View/AppLockSetupSettingsScreen.swift b/ElementX/Sources/Screens/AppLock/AppLockSetupSettingsScreen/View/AppLockSetupSettingsScreen.swift index b4049019a..c9991edea 100644 --- a/ElementX/Sources/Screens/AppLock/AppLockSetupSettingsScreen/View/AppLockSetupSettingsScreen.swift +++ b/ElementX/Sources/Screens/AppLock/AppLockSetupSettingsScreen/View/AppLockSetupSettingsScreen.swift @@ -25,10 +25,12 @@ struct AppLockSetupSettingsScreen: View { Section { ListRow(label: .plain(title: L10n.screenAppLockSettingsChangePin), kind: .button { context.send(viewAction: .changePINCode) }) + .accessibilityIdentifier(A11yIdentifiers.appLockSetupSettingsScreen.changePIN) if !context.viewState.isMandatory { ListRow(label: .plain(title: L10n.screenAppLockSettingsRemovePin, role: .destructive), kind: .button { context.send(viewAction: .disable) }) + .accessibilityIdentifier(A11yIdentifiers.appLockSetupSettingsScreen.removePIN) } } diff --git a/ElementX/Sources/Services/AppLock/LAContextMock.swift b/ElementX/Sources/Services/AppLock/LAContextMock.swift new file mode 100644 index 000000000..0640693c4 --- /dev/null +++ b/ElementX/Sources/Services/AppLock/LAContextMock.swift @@ -0,0 +1,48 @@ +// +// Copyright 2023 New Vector Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import LocalAuthentication + +/// A customised context that allows injecting a few mock values but otherwise behaves as expected. +/// It works as the actual context does and won't update the return values of `biometryType` and +/// `evaluatedPolicyDomainStateValue` until either `canEvaluatePolicy` or +/// `evaluatePolicy` have been called. +class LAContextMock: LAContext { + var biometryTypeValue: LABiometryType! + private var internalBiometryTypeValue: LABiometryType! + override var biometryType: LABiometryType { internalBiometryTypeValue } + + var evaluatedPolicyDomainStateValue: Data? + private var internalEvaluatedPolicyDomainStateValue: Data? + override var evaluatedPolicyDomainState: Data? { internalEvaluatedPolicyDomainStateValue } + + override func canEvaluatePolicy(_ policy: LAPolicy, error: NSErrorPointer) -> Bool { + let result = super.canEvaluatePolicy(policy, error: error) + updateInternalValues() + return result + } + + var evaluatePolicyReturnValue: Bool! + override func evaluatePolicy(_ policy: LAPolicy, localizedReason: String) async throws -> Bool { + updateInternalValues() + return evaluatePolicyReturnValue + } + + private func updateInternalValues() { + internalBiometryTypeValue = biometryTypeValue + internalEvaluatedPolicyDomainStateValue = evaluatedPolicyDomainStateValue + } +} diff --git a/UITests/Sources/AppLockSetupPINScreenUITests.swift b/ElementX/Sources/UITests/BlanckFormCoordinator.swift similarity index 53% rename from UITests/Sources/AppLockSetupPINScreenUITests.swift rename to ElementX/Sources/UITests/BlanckFormCoordinator.swift index a47d4613b..0f1d30fca 100644 --- a/UITests/Sources/AppLockSetupPINScreenUITests.swift +++ b/ElementX/Sources/UITests/BlanckFormCoordinator.swift @@ -1,5 +1,5 @@ // -// Copyright 2022 New Vector Ltd +// Copyright 2023 New Vector Ltd // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,13 +14,26 @@ // limitations under the License. // -import ElementX -import XCTest +import SwiftUI -@MainActor -class AppLockSetupUITests: XCTestCase { - func testScreen() async throws { - let app = Application.launch(.appLockSetupFlow) - try await app.assertScreenshot(.appLockSetupFlow, step: 0) +class BlankFormCoordinator: CoordinatorProtocol { + func toPresentable() -> AnyView { + AnyView(BlankForm()) + } +} + +/// An empty Form used for UI tests, behind a sheet. +private struct BlankForm: View { + var body: some View { + Form { + Text("Nothing to see here.") + } + .compoundForm() + } +} + +struct BlankForm_Previews: PreviewProvider { + static var previews: some View { + BlankForm() } } diff --git a/ElementX/Sources/UITests/UITestsAppCoordinator.swift b/ElementX/Sources/UITests/UITestsAppCoordinator.swift index a7bc94dde..22dd3f40e 100644 --- a/ElementX/Sources/UITests/UITestsAppCoordinator.swift +++ b/ElementX/Sources/UITests/UITestsAppCoordinator.swift @@ -42,12 +42,12 @@ class UITestsAppCoordinator: AppCoordinatorProtocol { } func start() { - // disabling CA animations + // Fix the app tint colour. UIApplication.shared.connectedScenes.forEach { scene in guard let delegate = scene.delegate as? UIWindowSceneDelegate else { return } - delegate.window??.layer.speed = 0 + delegate.window??.tintColor = .compound.textActionPrimary } guard let screenID = ProcessInfo.testScreenID else { fatalError("Unable to launch with unknown screen.") } @@ -162,15 +162,36 @@ class MockScreen: Identifiable { let appLockService = AppLockService(keychainController: KeychainControllerMock(), appSettings: ServiceLocator.shared.settings) let coordinator = AppLockScreenCoordinator(parameters: .init(appLockService: appLockService)) return coordinator - case .appLockSetupFlow: + case .appLockSetupFlow, .appLockSetupFlowUnlock: let navigationStackCoordinator = NavigationStackCoordinator() - let keychainController = KeychainControllerMock() - keychainController.containsPINCodeReturnValue = false - let appLockService = AppLockService(keychainController: keychainController, appSettings: ServiceLocator.shared.settings) + // The flow expects an existing root coordinator, use the placeholder as a placeholder 😅 + navigationStackCoordinator.setRootCoordinator(BlankFormCoordinator()) + + let keychainController = KeychainController(service: .tests, accessGroup: InfoPlistReader.main.keychainAccessGroupIdentifier) + keychainController.resetSecrets() + if id == .appLockSetupFlowUnlock { + do { + try keychainController.setPINCode("2023") + } catch { + fatalError("Failed to pre-set the PIN code") + } + } + + let context = LAContextMock() + context.biometryTypeValue = UIDevice.current.isPhone ? .faceID : .touchID // (iPhone 14 & iPad 9th gen) + context.evaluatePolicyReturnValue = true + context.evaluatedPolicyDomainStateValue = "😎".data(using: .utf8) + + let appLockService = AppLockService(keychainController: keychainController, + appSettings: ServiceLocator.shared.settings, + context: context) + let coordinator = AppLockSetupFlowCoordinator(presentingFlow: .settings, appLockService: appLockService, navigationStackCoordinator: navigationStackCoordinator) coordinator.start() + retainedState.append(coordinator) + return navigationStackCoordinator case .home: let navigationStackCoordinator = NavigationStackCoordinator() diff --git a/ElementX/Sources/UITests/UITestsScreenIdentifier.swift b/ElementX/Sources/UITests/UITestsScreenIdentifier.swift index ea8358aed..67b7c6c70 100644 --- a/ElementX/Sources/UITests/UITestsScreenIdentifier.swift +++ b/ElementX/Sources/UITests/UITestsScreenIdentifier.swift @@ -31,6 +31,7 @@ enum UITestsScreenIdentifier: String { case templateScreen case appLockScreen case appLockSetupFlow + case appLockSetupFlowUnlock case home case settings case bugReport diff --git a/UITests/Sources/AppLockSetupUITests.swift b/UITests/Sources/AppLockSetupUITests.swift new file mode 100644 index 000000000..8db9cc216 --- /dev/null +++ b/UITests/Sources/AppLockSetupUITests.swift @@ -0,0 +1,130 @@ +// +// Copyright 2022 New Vector Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import XCTest + +@testable import ElementX + +@MainActor +class AppLockSetupUITests: XCTestCase { + var app: XCUIApplication! + + @MainActor enum Step { + static let createPIN = 0 + static let confirmPIN = 1 + static let setupBiometrics = 2 + static let settings = 3 + + /// iPad shows the settings screen behind the modal, iPhone doesn't. + static let changePIN = isPhone ? createPIN : 4 + /// iPad shows the settings screen behind the modal, iPhone doesn't. + static let confirmChangePIN = isPhone ? confirmPIN : 5 + + /// Not part of the flow, only to verify the stack is cleared. + static let clearedStack = 99 + + static var isPhone: Bool { UIDevice.current.userInterfaceIdiom == .phone } + } + + func testCreateFlow() async throws { + app = Application.launch(.appLockSetupFlow) + + // Create PIN screen. + try await app.assertScreenshot(.appLockSetupFlow, step: Step.createPIN) + + enterPIN() + + // Confirm PIN screen. + try await app.assertScreenshot(.appLockSetupFlow, step: Step.confirmPIN) + + enterPIN() + + // Setup biometrics screen. + try await app.assertScreenshot(.appLockSetupFlow, step: Step.setupBiometrics) + + app.buttons[A11yIdentifiers.appLockSetupBiometricsScreen.allow].tap() + + // Settings screen. + try await app.assertScreenshot(.appLockSetupFlow, step: Step.settings) + + app.buttons[A11yIdentifiers.appLockSetupSettingsScreen.changePIN].tap() + + // Change PIN (create). + try await app.assertScreenshot(.appLockSetupFlow, step: Step.changePIN) + + enterDifferentPIN() + + // Change PIN (confirm). + try await app.assertScreenshot(.appLockSetupFlow, step: Step.confirmChangePIN) + + enterDifferentPIN() + + // Settings screen. + try await app.assertScreenshot(.appLockSetupFlow, step: Step.settings) + + app.buttons[A11yIdentifiers.appLockSetupSettingsScreen.removePIN].tap() + app.alerts.element.buttons[A11yIdentifiers.alertInfo.primaryButton].tap() + + // Pop the stack returning to whatever was last presented. + try await app.assertScreenshot(.appLockSetupFlow, step: Step.clearedStack) + } + + func testUnlockFlow() async throws { + app = Application.launch(.appLockSetupFlowUnlock) + + // Create PIN screen. + try await app.assertScreenshot(.appLockSetupFlowUnlock) + + enterPIN() + + // Settings screen. + try await app.assertScreenshot(.appLockSetupFlow, step: Step.settings) + + app.buttons[A11yIdentifiers.appLockSetupSettingsScreen.removePIN].tap() + app.alerts.element.buttons[A11yIdentifiers.alertInfo.primaryButton].tap() + + // Pop the stack returning to whatever was last presented. + try await app.assertScreenshot(.appLockSetupFlow, step: Step.clearedStack) + } + + func testCancel() async throws { + app = Application.launch(.appLockSetupFlowUnlock) + + // Create PIN screen. + try await app.assertScreenshot(.appLockSetupFlowUnlock) + + app.buttons[A11yIdentifiers.appLockSetupPINScreen.cancel].tap() + + // Return to whatever was last presented. + try await app.assertScreenshot(.appLockSetupFlow, step: Step.clearedStack) + } + + // MARK: - Helpers + + private func enterPIN() { + app.keys["2"].tap() + app.keys["0"].tap() + app.keys["2"].tap() + app.keys["3"].tap() + } + + private func enterDifferentPIN() { + app.keys["2"].tap() + app.keys["2"].tap() + app.keys["3"].tap() + app.keys["3"].tap() + } +} diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-0.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-0.png index c27ea0ccd..bcc2b1b57 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-0.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf66d4809566af646252cf16b7582ef3bbb56b55308041d264902de44ea91463 -size 164655 +oid sha256:3fa48241f385c2b3753523823d29471f4ecae890021ec47b01e739783d955a2b +size 165984 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-1.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-1.png new file mode 100644 index 000000000..8e2660be4 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bfe62fbf4c949e2d67b1920a9df0a1bb7cfd6f2587cf4073a491ae94fc6839d5 +size 165645 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-2.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-2.png new file mode 100644 index 000000000..491ae8db0 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98fb37018e18b24257791b5e4f67db1ff3701b3ef4afe9d1afcd62323c135bf0 +size 118118 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-3.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-3.png new file mode 100644 index 000000000..24d0efafc --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9981e05d8e7b867dd804efeaa97d312b70925d23d959dedfed4e4bc97781eb0a +size 74989 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-4.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-4.png new file mode 100644 index 000000000..3e768bf82 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26ffbeae8df9be41d80be48d111ef47fac633bf8c575db6028597c7c5faec2b4 +size 181587 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-5.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-5.png new file mode 100644 index 000000000..6aa447f48 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4256ee8ceb61e8cd34c8c06cfb97c134b5122ce28de9747cee2b1bf2ed0ff418 +size 181244 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-99.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-99.png new file mode 100644 index 000000000..dd616b53e --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlow-99.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d09d2089cd5d540e12aaa823da60e20806c25202f0f3b60bfd4cebc8978e8a9 +size 58054 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlowUnlock.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlowUnlock.png new file mode 100644 index 000000000..4bdd65c79 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.appLockSetupFlowUnlock.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4b8b221641b9d86d3f7e32a650a262cc4a51dbc7cf3b7c65253d6c71d5bb454 +size 99772 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-0.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-0.png index 1060ce326..26e4b3f16 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-0.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1b0e2fe4e868bce1a4c758c8cc7026c17604bfe666c284ef83859ad0ac0aa001 -size 138452 +oid sha256:f65a97c728faec3735d6fcb51b482af57c7158193734a011e703936d14f50ed3 +size 137591 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-1.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-1.png new file mode 100644 index 000000000..54d132a73 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62b02511b19c2ede3866f769eea6e1d65e267ae3da2c8faede3df9b3f18b825e +size 137206 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-2.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-2.png new file mode 100644 index 000000000..b45f9451e --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a46bf902af6a4220639073f83ff1db87a4ac8187521b7ae296639c56d7a85367 +size 96519 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-3.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-3.png new file mode 100644 index 000000000..3140c8b9c --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:881928cca9fe3a67e50e6c332fac59508e886bc34b1ca762b53e8764382c3e10 +size 83140 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-99.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-99.png new file mode 100644 index 000000000..c0bb272bc --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlow-99.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6038391cadd1f8d589f07d21a743a6ad708295ebe127a45c13720ddd464e1bfd +size 55754 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlowUnlock.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlowUnlock.png new file mode 100644 index 000000000..fbe87c381 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.appLockSetupFlowUnlock.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05500566e71142c4c80b9781f3cb3fe20412690c9bcc11156d14fbbb1ac3812c +size 81393 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-0.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-0.png index 70e559ac1..0077feb66 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-0.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fee0ecd3529882e1799122602775c15cc0eb1f766885998b35cf078a06396640 -size 184338 +oid sha256:44c3f9224626c915af17c0c9358b5049490b4fdfc56e1a0f132ee138a7cd0f3f +size 187197 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-1.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-1.png new file mode 100644 index 000000000..f726f1b58 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce09ad0d0ef60d14807709fd9194ba1ea7863280545c6bcf183534411bab850c +size 186740 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-2.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-2.png new file mode 100644 index 000000000..f14033fe8 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee6a9bf60a1d58da80cfe07847586917d9d7220eff61072c9ca1c975b3054d10 +size 134319 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-3.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-3.png new file mode 100644 index 000000000..332459ca1 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0cbfbd855a17721fc7ec0886127154971225f4fb7aefcfd8e334ef49a0ee17c1 +size 79354 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-4.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-4.png new file mode 100644 index 000000000..de1c02b27 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88a548c90dcc19b981719b92648cb017b803c2e6c367c9614a06d59e5da83c72 +size 203681 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-5.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-5.png new file mode 100644 index 000000000..16c96e0c4 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f4094e6baaebfd781e8cf5bc3f6dfbc8f1e51b16d875e1812248e71c57b92be +size 203186 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-99.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-99.png new file mode 100644 index 000000000..2f46b7b51 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlow-99.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4f8dfd9c3e7bf9c5b7fe6ccd94c7a710b331ee9920a658c664287fa4d6403f7 +size 58873 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlowUnlock.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlowUnlock.png new file mode 100644 index 000000000..734950d55 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.appLockSetupFlowUnlock.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:869f30858095d8e245a2efc84ef996ddcf11864112123b68e4a784c55770e618 +size 101543 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-0.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-0.png index 1a76e6cf3..3259420ae 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-0.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01d584c4c83f2abded3b6d929cf4ef3781c18c1ee2a1d6d88174458a1b117e12 -size 168409 +oid sha256:1d5cb48de5d8d0c1f04a0a12488249871c128b87e3dffe4e025ded9a26fc8555 +size 168378 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-1.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-1.png new file mode 100644 index 000000000..497307424 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6501ff36b6204c2083c0121468fcdeef5e0d5a873c86693c1a8757091ece7915 +size 168194 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-2.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-2.png new file mode 100644 index 000000000..d7ab7fd39 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7c4ca0ea8597654e7974ca38e5a1e17b8dd07b0660dc3c6082357fcd871976e +size 120377 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-3.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-3.png new file mode 100644 index 000000000..967491f5b --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a33cdbdc0917ca8ac04e03e0fb2998de93a769ddf2fa553d8a4eb7894ce8890 +size 87382 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-99.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-99.png new file mode 100644 index 000000000..55ded4827 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlow-99.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6f97fa428f0cccd0b72f2033c3b7c54c5f15f80a7293fb1b58da88704cf91b7 +size 60147 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlowUnlock.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlowUnlock.png new file mode 100644 index 000000000..91fe54c95 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.appLockSetupFlowUnlock.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ea1cbd5eb3bd03cfe2fb1358c796634de153bf6b492c9e8602ec4a1d27e4ad4 +size 82102 diff --git a/UnitTests/Sources/AppLock/AppLockServiceTests.swift b/UnitTests/Sources/AppLock/AppLockServiceTests.swift index 63a21c377..b34ba19d8 100644 --- a/UnitTests/Sources/AppLock/AppLockServiceTests.swift +++ b/UnitTests/Sources/AppLock/AppLockServiceTests.swift @@ -14,7 +14,6 @@ // limitations under the License. // -import LocalAuthentication import XCTest @testable import ElementX @@ -348,36 +347,3 @@ class AppLockServiceTests: XCTestCase { XCTAssertEqual(appSettings.appLockNumberOfPINAttempts, 0, "The PIN attempts should be reset.") } } - -// MARK: - Mocks - -/// A customised context that allows injecting a few mock values but otherwise behaves as expected. -/// It works as the actual context does and won't update the return values of `biometryType` and -/// `evaluatedPolicyDomainStateValue` until either `canEvaluatePolicy` or -/// `evaluatePolicy` have been called. -private class LAContextMock: LAContext { - var biometryTypeValue: LABiometryType! - private var internalBiometryTypeValue: LABiometryType! - override var biometryType: LABiometryType { internalBiometryTypeValue } - - var evaluatedPolicyDomainStateValue: Data? - private var internalEvaluatedPolicyDomainStateValue: Data? - override var evaluatedPolicyDomainState: Data? { internalEvaluatedPolicyDomainStateValue } - - override func canEvaluatePolicy(_ policy: LAPolicy, error: NSErrorPointer) -> Bool { - let result = super.canEvaluatePolicy(policy, error: error) - updateInternalValues() - return result - } - - var evaluatePolicyReturnValue: Bool! - override func evaluatePolicy(_ policy: LAPolicy, localizedReason: String) async throws -> Bool { - updateInternalValues() - return evaluatePolicyReturnValue - } - - private func updateInternalValues() { - internalBiometryTypeValue = biometryTypeValue - internalEvaluatedPolicyDomainStateValue = evaluatedPolicyDomainStateValue - } -}