UI test fixes (#335)

* Remove status bars when running UITests
* Remove simulator OS versions from screenshot names, be less lenient with image diffing
* Rename UITests splash screen to onboarding
* Switch tests to Xcode 14.1, remove version names for used simulators and switched from iPhone 13 Pro Max to iPhone 14
* Fix ServiceLocator and fallbackLaguage for UI tests
* Drop snapshot diffing precision to 0.99 as 0.999 triggers false negatives
* Fix server selection UI tests after exposing the sliding sync proxy configuration
* Update reference screenshots
This commit is contained in:
Stefan Ceriu
2022-11-24 10:35:00 +02:00
committed by GitHub
parent e22c038a0f
commit 1102580d6c
206 changed files with 368 additions and 467 deletions
+6 -6
View File
@@ -44,9 +44,9 @@ Tools/Scripts/element-android
# ignore all # ignore all
/UITests/Sources/__Snapshots__/Application/* /UITests/Sources/__Snapshots__/Application/*
# but keep the references # but keep the references
!/UITests/Sources/__Snapshots__/Application/16-0-de-DE-iPad-9th-generation.*.png !/UITests/Sources/__Snapshots__/Application/de-DE-iPad-9th-generation.*.png
!/UITests/Sources/__Snapshots__/Application/16-0-fr-FR-iPad-9th-generation.*.png !/UITests/Sources/__Snapshots__/Application/fr-FR-iPad-9th-generation.*.png
!/UITests/Sources/__Snapshots__/Application/16-0-en-GB-iPad-9th-generation.*.png !/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.*.png
!/UITests/Sources/__Snapshots__/Application/16-0-de-DE-iPhone-13-Pro-Max.*.png !/UITests/Sources/__Snapshots__/Application/de-DE-iPhone-14.*.png
!/UITests/Sources/__Snapshots__/Application/16-0-fr-FR-iPhone-13-Pro-Max.*.png !/UITests/Sources/__Snapshots__/Application/fr-FR-iPhone-14.*.png
!/UITests/Sources/__Snapshots__/Application/16-0-en-GB-iPhone-13-Pro-Max.*.png !/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.*.png
+12 -52
View File
@@ -3,7 +3,7 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 54; objectVersion = 51;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
@@ -95,6 +95,7 @@
323F36D880363C473B81A9EA /* MediaProxyProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC3D31C2DA6910AA0079678A /* MediaProxyProtocol.swift */; }; 323F36D880363C473B81A9EA /* MediaProxyProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC3D31C2DA6910AA0079678A /* MediaProxyProtocol.swift */; };
3274219F7F26A5C6C2C55630 /* FilePreviewViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F652E88106B855A2A55ADE /* FilePreviewViewModelProtocol.swift */; }; 3274219F7F26A5C6C2C55630 /* FilePreviewViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3F652E88106B855A2A55ADE /* FilePreviewViewModelProtocol.swift */; };
32BA37B01B05261FCF2D4B45 /* WeakDictionaryKeyReference.swift in Sources */ = {isa = PBXBuildFile; fileRef = 090CA61A835C151CEDF8F372 /* WeakDictionaryKeyReference.swift */; }; 32BA37B01B05261FCF2D4B45 /* WeakDictionaryKeyReference.swift in Sources */ = {isa = PBXBuildFile; fileRef = 090CA61A835C151CEDF8F372 /* WeakDictionaryKeyReference.swift */; };
33665CE55037D029ED7D867E /* TimelineScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A627CE1429374617334FA5E9 /* TimelineScrollView.swift */; };
33CAC1226DFB8B5D8447D286 /* SwiftState in Frameworks */ = {isa = PBXBuildFile; productRef = 3853B78FB8531B83936C5DA6 /* SwiftState */; }; 33CAC1226DFB8B5D8447D286 /* SwiftState in Frameworks */ = {isa = PBXBuildFile; productRef = 3853B78FB8531B83936C5DA6 /* SwiftState */; };
33D630461FC4562CC767EE9F /* FileCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5B0B1226DA8DB55918B34CD /* FileCache.swift */; }; 33D630461FC4562CC767EE9F /* FileCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5B0B1226DA8DB55918B34CD /* FileCache.swift */; };
34966D4C1C2C6D37FE3F7F50 /* SettingsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DD2D50A7EAA4FC78417730E /* SettingsCoordinator.swift */; }; 34966D4C1C2C6D37FE3F7F50 /* SettingsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DD2D50A7EAA4FC78417730E /* SettingsCoordinator.swift */; };
@@ -338,8 +339,8 @@
BB01CC19C3D3322308D1B2CF /* ServerSelectionViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 167521635A1CC27624FCEB7F /* ServerSelectionViewModel.swift */; }; BB01CC19C3D3322308D1B2CF /* ServerSelectionViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 167521635A1CC27624FCEB7F /* ServerSelectionViewModel.swift */; };
BB6B0B91CE11E06330017000 /* SessionVerificationScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AC1A01C3A745BDF1D3697D3 /* SessionVerificationScreen.swift */; }; BB6B0B91CE11E06330017000 /* SessionVerificationScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AC1A01C3A745BDF1D3697D3 /* SessionVerificationScreen.swift */; };
BCEC41FB1F2BB663183863E4 /* LoginServerInfoSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D379E13DD9D987470A3C70C /* LoginServerInfoSection.swift */; }; BCEC41FB1F2BB663183863E4 /* LoginServerInfoSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D379E13DD9D987470A3C70C /* LoginServerInfoSection.swift */; };
BD782053BE4C3D2F0BDE5699 /* ServiceLocator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F95CADD0A5DBD76B990FCB /* ServiceLocator.swift */; };
BFB534E338A3D949944FB2F5 /* NotificationServiceProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B490675B8E31423AF116BDA /* NotificationServiceProxy.swift */; }; BFB534E338A3D949944FB2F5 /* NotificationServiceProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B490675B8E31423AF116BDA /* NotificationServiceProxy.swift */; };
BFD1AC03B6F8C5F5897D5B55 /* TimelineScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2DE30233B57761F8AFEB415 /* TimelineScrollView.swift */; };
C3522917C0C367C403429EEC /* CoordinatorProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B251F5B4511D1CA0BA8361FE /* CoordinatorProtocol.swift */; }; C3522917C0C367C403429EEC /* CoordinatorProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B251F5B4511D1CA0BA8361FE /* CoordinatorProtocol.swift */; };
C35CF4DAB1467FE1BBDC204B /* MessageTimelineItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEAF1C75771D9DC75877F4B4 /* MessageTimelineItem.swift */; }; C35CF4DAB1467FE1BBDC204B /* MessageTimelineItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEAF1C75771D9DC75877F4B4 /* MessageTimelineItem.swift */; };
C4180F418235DAD9DD173951 /* TemplateScreenUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9873076F224E4CE09D8BD47D /* TemplateScreenUITests.swift */; }; C4180F418235DAD9DD173951 /* TemplateScreenUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9873076F224E4CE09D8BD47D /* TemplateScreenUITests.swift */; };
@@ -658,6 +659,7 @@
56C1BCB9E83B09A45387FCA2 /* EncryptedRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptedRoomTimelineView.swift; sourceTree = "<group>"; }; 56C1BCB9E83B09A45387FCA2 /* EncryptedRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptedRoomTimelineView.swift; sourceTree = "<group>"; };
5741CD0691019B32FE74CE9E /* UNMutableNotificationContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UNMutableNotificationContent.swift; sourceTree = "<group>"; }; 5741CD0691019B32FE74CE9E /* UNMutableNotificationContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UNMutableNotificationContent.swift; sourceTree = "<group>"; };
5773C86AF04AEF26515AD00C /* sl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sl; path = sl.lproj/Localizable.strings; sourceTree = "<group>"; }; 5773C86AF04AEF26515AD00C /* sl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sl; path = sl.lproj/Localizable.strings; sourceTree = "<group>"; };
57F95CADD0A5DBD76B990FCB /* ServiceLocator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServiceLocator.swift; sourceTree = "<group>"; };
5B2F9D5C39A4494D19F33E38 /* SettingsViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewModelProtocol.swift; sourceTree = "<group>"; }; 5B2F9D5C39A4494D19F33E38 /* SettingsViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewModelProtocol.swift; sourceTree = "<group>"; };
5D26A086A8278D39B5756D6F /* project.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = project.yml; sourceTree = "<group>"; }; 5D26A086A8278D39B5756D6F /* project.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = project.yml; sourceTree = "<group>"; };
5D2D0A6F1ABC99D29462FB84 /* AuthenticationCoordinatorUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationCoordinatorUITests.swift; sourceTree = "<group>"; }; 5D2D0A6F1ABC99D29462FB84 /* AuthenticationCoordinatorUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationCoordinatorUITests.swift; sourceTree = "<group>"; };
@@ -730,12 +732,12 @@
892E29C98C4E8182C9037F84 /* TimelineStyler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineStyler.swift; sourceTree = "<group>"; }; 892E29C98C4E8182C9037F84 /* TimelineStyler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineStyler.swift; sourceTree = "<group>"; };
8A9AE4967817E9608E22EB44 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = "<group>"; }; 8A9AE4967817E9608E22EB44 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = "<group>"; };
8AC1A01C3A745BDF1D3697D3 /* SessionVerificationScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionVerificationScreen.swift; sourceTree = "<group>"; }; 8AC1A01C3A745BDF1D3697D3 /* SessionVerificationScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionVerificationScreen.swift; sourceTree = "<group>"; };
8B9A55AC2FB0FE0AEAA3DF1F /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; }; 8B9A55AC2FB0FE0AEAA3DF1F /* LICENSE */ = {isa = PBXFileReference; path = LICENSE; sourceTree = "<group>"; };
8C0AA893D6F8A2F563E01BB9 /* in */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = in; path = in.lproj/Localizable.stringsdict; sourceTree = "<group>"; }; 8C0AA893D6F8A2F563E01BB9 /* in */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = in; path = in.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
8D6094DEAAEB388E1AE118C6 /* MockRoomTimelineProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockRoomTimelineProvider.swift; sourceTree = "<group>"; }; 8D6094DEAAEB388E1AE118C6 /* MockRoomTimelineProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockRoomTimelineProvider.swift; sourceTree = "<group>"; };
8D8169443E5AC5FF71BFB3DB /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = "<group>"; }; 8D8169443E5AC5FF71BFB3DB /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = "<group>"; };
8DC2C9E0E15C79BBDA80F0A2 /* TimelineStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineStyle.swift; sourceTree = "<group>"; }; 8DC2C9E0E15C79BBDA80F0A2 /* TimelineStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineStyle.swift; sourceTree = "<group>"; };
8E088F2A1B9EC529D3221931 /* UITests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UITests.xctestplan; sourceTree = "<group>"; }; 8E088F2A1B9EC529D3221931 /* UITests.xctestplan */ = {isa = PBXFileReference; path = UITests.xctestplan; sourceTree = "<group>"; };
8ED2D2F6A137A95EA50413BE /* UserNotificationControllerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserNotificationControllerProtocol.swift; sourceTree = "<group>"; }; 8ED2D2F6A137A95EA50413BE /* UserNotificationControllerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserNotificationControllerProtocol.swift; sourceTree = "<group>"; };
8F7D42E66E939B709C1EC390 /* MockRoomSummaryProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockRoomSummaryProvider.swift; sourceTree = "<group>"; }; 8F7D42E66E939B709C1EC390 /* MockRoomSummaryProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockRoomSummaryProvider.swift; sourceTree = "<group>"; };
8FC803282F9268D49F4ABF14 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = "<group>"; }; 8FC803282F9268D49F4ABF14 /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = "<group>"; };
@@ -786,6 +788,7 @@
A4756C5A8C8649AD6C10C615 /* MockUserSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockUserSession.swift; sourceTree = "<group>"; }; A4756C5A8C8649AD6C10C615 /* MockUserSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockUserSession.swift; sourceTree = "<group>"; };
A4B5B19A10D3F7C2BC5315DF /* VideoRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRoomTimelineItem.swift; sourceTree = "<group>"; }; A4B5B19A10D3F7C2BC5315DF /* VideoRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRoomTimelineItem.swift; sourceTree = "<group>"; };
A5B0B1226DA8DB55918B34CD /* FileCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileCache.swift; sourceTree = "<group>"; }; A5B0B1226DA8DB55918B34CD /* FileCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileCache.swift; sourceTree = "<group>"; };
A627CE1429374617334FA5E9 /* TimelineScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineScrollView.swift; sourceTree = "<group>"; };
A64F0DB78E0AC23C91AD89EF /* mk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = mk; path = mk.lproj/Localizable.strings; sourceTree = "<group>"; }; A64F0DB78E0AC23C91AD89EF /* mk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = mk; path = mk.lproj/Localizable.strings; sourceTree = "<group>"; };
A65F140F9FE5E8D4DAEFF354 /* RoomProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomProxy.swift; sourceTree = "<group>"; }; A65F140F9FE5E8D4DAEFF354 /* RoomProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomProxy.swift; sourceTree = "<group>"; };
A6B891A6DA826E2461DBB40F /* PHGPostHogConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PHGPostHogConfiguration.swift; sourceTree = "<group>"; }; A6B891A6DA826E2461DBB40F /* PHGPostHogConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PHGPostHogConfiguration.swift; sourceTree = "<group>"; };
@@ -844,7 +847,6 @@
C070FD43DC6BF4E50217965A /* LocalizationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizationTests.swift; sourceTree = "<group>"; }; C070FD43DC6BF4E50217965A /* LocalizationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizationTests.swift; sourceTree = "<group>"; };
C1198B925F4A88DA74083662 /* OnboardingViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingViewModel.swift; sourceTree = "<group>"; }; C1198B925F4A88DA74083662 /* OnboardingViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingViewModel.swift; sourceTree = "<group>"; };
C2886615BEBAE33A0AA4D5F8 /* RoomScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomScreenModels.swift; sourceTree = "<group>"; }; C2886615BEBAE33A0AA4D5F8 /* RoomScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomScreenModels.swift; sourceTree = "<group>"; };
C2DE30233B57761F8AFEB415 /* TimelineScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineScrollView.swift; sourceTree = "<group>"; };
C3F652E88106B855A2A55ADE /* FilePreviewViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilePreviewViewModelProtocol.swift; sourceTree = "<group>"; }; C3F652E88106B855A2A55ADE /* FilePreviewViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilePreviewViewModelProtocol.swift; sourceTree = "<group>"; };
C444092DB0E4AB393067AC36 /* MediaPlayerViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaPlayerViewModelTests.swift; sourceTree = "<group>"; }; C444092DB0E4AB393067AC36 /* MediaPlayerViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaPlayerViewModelTests.swift; sourceTree = "<group>"; };
C483956FA3D665E3842E319A /* SettingsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsScreen.swift; sourceTree = "<group>"; }; C483956FA3D665E3842E319A /* SettingsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsScreen.swift; sourceTree = "<group>"; };
@@ -928,7 +930,7 @@
EBE5502760CF6CA2D7201883 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ja; path = ja.lproj/Localizable.stringsdict; sourceTree = "<group>"; }; EBE5502760CF6CA2D7201883 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ja; path = ja.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
ED044D00F2176681CC02CD54 /* HomeScreenRoomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeScreenRoomCell.swift; sourceTree = "<group>"; }; ED044D00F2176681CC02CD54 /* HomeScreenRoomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeScreenRoomCell.swift; sourceTree = "<group>"; };
ED1D792EB82506A19A72C8DE /* RoomTimelineItemProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineItemProtocol.swift; sourceTree = "<group>"; }; ED1D792EB82506A19A72C8DE /* RoomTimelineItemProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineItemProtocol.swift; sourceTree = "<group>"; };
ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = message.caf; sourceTree = "<group>"; }; ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; path = message.caf; sourceTree = "<group>"; };
EDAA4472821985BF868CC21C /* ServerSelectionViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionViewModelTests.swift; sourceTree = "<group>"; }; EDAA4472821985BF868CC21C /* ServerSelectionViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionViewModelTests.swift; sourceTree = "<group>"; };
EDB6E40BAD4504D899FAAC9A /* TemplateViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateViewModel.swift; sourceTree = "<group>"; }; EDB6E40BAD4504D899FAAC9A /* TemplateViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateViewModel.swift; sourceTree = "<group>"; };
EE8BCD14EFED23459A43FDFF /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = "<group>"; }; EE8BCD14EFED23459A43FDFF /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -1627,9 +1629,9 @@
5221DFDF809142A2D6AC82B9 /* RoomScreen.swift */, 5221DFDF809142A2D6AC82B9 /* RoomScreen.swift */,
B43AF03660F5FD4FFFA7F1CE /* TimelineItemContextMenu.swift */, B43AF03660F5FD4FFFA7F1CE /* TimelineItemContextMenu.swift */,
804F9B0FABE093C7284CD09B /* TimelineItemList.swift */, 804F9B0FABE093C7284CD09B /* TimelineItemList.swift */,
A627CE1429374617334FA5E9 /* TimelineScrollView.swift */,
0BC588051E6572A1AF51D738 /* TimelineSenderAvatarView.swift */, 0BC588051E6572A1AF51D738 /* TimelineSenderAvatarView.swift */,
874A1842477895F199567BD7 /* TimelineView.swift */, 874A1842477895F199567BD7 /* TimelineView.swift */,
C2DE30233B57761F8AFEB415 /* TimelineScrollView.swift */,
A312471EA62EFB0FD94E60DC /* Style */, A312471EA62EFB0FD94E60DC /* Style */,
CCD48459CA34A1928EC7A26A /* Supplementary */, CCD48459CA34A1928EC7A26A /* Supplementary */,
B7D3886505ECC85A06DA8258 /* Timeline */, B7D3886505ECC85A06DA8258 /* Timeline */,
@@ -1884,6 +1886,7 @@
263B3B811C2B900F12C6F695 /* BuildSettings.swift */, 263B3B811C2B900F12C6F695 /* BuildSettings.swift */,
B251F5B4511D1CA0BA8361FE /* CoordinatorProtocol.swift */, B251F5B4511D1CA0BA8361FE /* CoordinatorProtocol.swift */,
495D3EC4972639C1A87DDF8E /* NavigationController.swift */, 495D3EC4972639C1A87DDF8E /* NavigationController.swift */,
57F95CADD0A5DBD76B990FCB /* ServiceLocator.swift */,
); );
path = Application; path = Application;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -1916,14 +1919,6 @@
path = NSE; path = NSE;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
B3E78735F63FA93FAAAF700A /* MockUserNotificationController.swift~refs */ = {
isa = PBXGroup;
children = (
F798CDE87F83A94B8BC2E18A /* remotes */,
);
path = "MockUserNotificationController.swift~refs";
sourceTree = "<group>";
};
B442FCF47E0A6F28D7D50A4D /* FilePreview */ = { B442FCF47E0A6F28D7D50A4D /* FilePreview */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@@ -2010,13 +2005,6 @@
path = UITests; path = UITests;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
C5A8A8B1C16BBFEA4B9D5988 /* origin */ = {
isa = PBXGroup;
children = (
);
path = origin;
sourceTree = "<group>";
};
CA555F7C7CA382ACACF0D82B /* Keychain */ = { CA555F7C7CA382ACACF0D82B /* Keychain */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@@ -2109,7 +2097,6 @@
CD80F22830C2360F3F39DDCE /* UserNotificationModalView.swift */, CD80F22830C2360F3F39DDCE /* UserNotificationModalView.swift */,
649759084B0C9FE1F8DF8D17 /* UserNotificationPresenter.swift */, 649759084B0C9FE1F8DF8D17 /* UserNotificationPresenter.swift */,
F31A4E5941ACBA4BB9FEF94C /* UserNotificationToastView.swift */, F31A4E5941ACBA4BB9FEF94C /* UserNotificationToastView.swift */,
B3E78735F63FA93FAAAF700A /* MockUserNotificationController.swift~refs */,
); );
path = UserNotifications; path = UserNotifications;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -2208,14 +2195,6 @@
path = Background; path = Background;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
F798CDE87F83A94B8BC2E18A /* remotes */ = {
isa = PBXGroup;
children = (
C5A8A8B1C16BBFEA4B9D5988 /* origin */,
);
path = remotes;
sourceTree = "<group>";
};
FCDF06BDB123505F0334B4F9 /* Timeline */ = { FCDF06BDB123505F0334B4F9 /* Timeline */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@@ -2239,7 +2218,6 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = F1B67CF63C1231AEB14D70E6 /* Build configuration list for PBXNativeTarget "UITests" */; buildConfigurationList = F1B67CF63C1231AEB14D70E6 /* Build configuration list for PBXNativeTarget "UITests" */;
buildPhases = ( buildPhases = (
17364E8B37FC780E07DDEAF7 /* Override Simulator Status Bars */,
BAD5CD7BE53A7C832569B67A /* Sources */, BAD5CD7BE53A7C832569B67A /* Sources */,
86982BD498105258F3778110 /* Resources */, 86982BD498105258F3778110 /* Resources */,
CD30252A70288BD4BF476ED7 /* Frameworks */, CD30252A70288BD4BF476ED7 /* Frameworks */,
@@ -2578,25 +2556,6 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
17364E8B37FC780E07DDEAF7 /* Override Simulator Status Bars */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Override Simulator Status Bars";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "python3 $PROJECT_DIR/Tools/Scripts/bootTestSimulator.py --name 'iPhone 13 Pro Max' --version 'iOS.16.1'\npython3 $PROJECT_DIR/Tools/Scripts/bootTestSimulator.py --name 'iPad (9th generation)' --version 'iOS.16.1'\n";
};
98CA896D84BFD53B2554E891 /* ⚠️ SwiftLint */ = { 98CA896D84BFD53B2554E891 /* ⚠️ SwiftLint */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1; alwaysOutOfDate = 1;
@@ -2889,7 +2848,6 @@
00EA14F62DCEF62CDE4808D6 /* RedactedRoomTimelineItem.swift in Sources */, 00EA14F62DCEF62CDE4808D6 /* RedactedRoomTimelineItem.swift in Sources */,
13853973A5E24374FCEDE8A3 /* RedactedRoomTimelineView.swift in Sources */, 13853973A5E24374FCEDE8A3 /* RedactedRoomTimelineView.swift in Sources */,
A494741843F087881299ACF0 /* RestorationToken.swift in Sources */, A494741843F087881299ACF0 /* RestorationToken.swift in Sources */,
BFD1AC03B6F8C5F5897D5B55 /* TimelineScrollView.swift in Sources */,
04A16B45228F7678A027C079 /* RoomHeaderView.swift in Sources */, 04A16B45228F7678A027C079 /* RoomHeaderView.swift in Sources */,
FE79E2BCCF69E8BF4D21E15A /* RoomMessageFactory.swift in Sources */, FE79E2BCCF69E8BF4D21E15A /* RoomMessageFactory.swift in Sources */,
8D9F646387DF656EF91EE4CB /* RoomMessageFactoryProtocol.swift in Sources */, 8D9F646387DF656EF91EE4CB /* RoomMessageFactoryProtocol.swift in Sources */,
@@ -2924,6 +2882,7 @@
388FD50AC66E9E684DDFA9D8 /* ServerSelectionScreen.swift in Sources */, 388FD50AC66E9E684DDFA9D8 /* ServerSelectionScreen.swift in Sources */,
BB01CC19C3D3322308D1B2CF /* ServerSelectionViewModel.swift in Sources */, BB01CC19C3D3322308D1B2CF /* ServerSelectionViewModel.swift in Sources */,
19839F3526CE8C35AAF241AD /* ServerSelectionViewModelProtocol.swift in Sources */, 19839F3526CE8C35AAF241AD /* ServerSelectionViewModelProtocol.swift in Sources */,
BD782053BE4C3D2F0BDE5699 /* ServiceLocator.swift in Sources */,
237FC70AA257B935F53316BA /* SessionVerificationControllerProxy.swift in Sources */, 237FC70AA257B935F53316BA /* SessionVerificationControllerProxy.swift in Sources */,
94A65DD8A353DF112EBEF67A /* SessionVerificationControllerProxyProtocol.swift in Sources */, 94A65DD8A353DF112EBEF67A /* SessionVerificationControllerProxyProtocol.swift in Sources */,
E5895C74615CBE8462FB840F /* SessionVerificationCoordinator.swift in Sources */, E5895C74615CBE8462FB840F /* SessionVerificationCoordinator.swift in Sources */,
@@ -2964,6 +2923,7 @@
F508683B76EF7B23BB2CBD6D /* TimelineItemPlainStylerView.swift in Sources */, F508683B76EF7B23BB2CBD6D /* TimelineItemPlainStylerView.swift in Sources */,
440123E29E2F9B001A775BBE /* TimelineItemProxy.swift in Sources */, 440123E29E2F9B001A775BBE /* TimelineItemProxy.swift in Sources */,
9B582B3EEFEA615D4A6FBF1A /* TimelineReactionsView.swift in Sources */, 9B582B3EEFEA615D4A6FBF1A /* TimelineReactionsView.swift in Sources */,
33665CE55037D029ED7D867E /* TimelineScrollView.swift in Sources */,
ABF3FAB234AD3565B214309B /* TimelineSenderAvatarView.swift in Sources */, ABF3FAB234AD3565B214309B /* TimelineSenderAvatarView.swift in Sources */,
69BCBB4FB2DC3D61A28D3FD8 /* TimelineStyle.swift in Sources */, 69BCBB4FB2DC3D61A28D3FD8 /* TimelineStyle.swift in Sources */,
FFD3E4FF948E06C7585317FC /* TimelineStyler.swift in Sources */, FFD3E4FF948E06C7585317FC /* TimelineStyler.swift in Sources */,
@@ -18,19 +18,6 @@ import Combine
import MatrixRustSDK import MatrixRustSDK
import SwiftUI import SwiftUI
struct ServiceLocator {
fileprivate static var serviceLocator: ServiceLocator?
static var shared: ServiceLocator {
guard let serviceLocator else {
fatalError("The service locator should be setup at this point")
}
return serviceLocator
}
let userNotificationController: UserNotificationControllerProtocol
}
class AppCoordinator: AppCoordinatorProtocol { class AppCoordinator: AppCoordinatorProtocol {
private let stateMachine: AppCoordinatorStateMachine private let stateMachine: AppCoordinatorStateMachine
private let navigationController: NavigationController private let navigationController: NavigationController
@@ -63,7 +50,7 @@ class AppCoordinator: AppCoordinatorProtocol {
navigationController.setRootCoordinator(SplashScreenCoordinator()) navigationController.setRootCoordinator(SplashScreenCoordinator())
ServiceLocator.serviceLocator = ServiceLocator(userNotificationController: UserNotificationController(rootCoordinator: navigationController)) ServiceLocator.shared.register(userNotificationController: UserNotificationController(rootCoordinator: navigationController))
backgroundTaskService = UIKitBackgroundTaskService(withApplication: UIApplication.shared) backgroundTaskService = UIKitBackgroundTaskService(withApplication: UIApplication.shared)
@@ -39,7 +39,12 @@ struct Application: App {
.task { .task {
applicationCoordinator.start() applicationCoordinator.start()
} }
.statusBarHidden(shouldHideStatusBar)
} }
} }
} }
private var shouldHideStatusBar: Bool {
Tests.isRunningUITests
}
} }
@@ -0,0 +1,29 @@
//
// 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 Foundation
class ServiceLocator {
private(set) static var shared = ServiceLocator()
private init() { }
private(set) var userNotificationController: UserNotificationControllerProtocol!
func register(userNotificationController: UserNotificationControllerProtocol) {
self.userNotificationController = userNotificationController
}
}
@@ -29,7 +29,7 @@ enum UITestScreenIdentifier: String {
case settings case settings
case bugReport case bugReport
case bugReportWithScreenshot case bugReportWithScreenshot
case splash case onboarding
case roomPlainNoAvatar case roomPlainNoAvatar
case roomEncryptedWithAvatar case roomEncryptedWithAvatar
case sessionVerification case sessionVerification
@@ -18,11 +18,14 @@ import SwiftUI
import UIKit import UIKit
class UITestsAppCoordinator: AppCoordinatorProtocol { class UITestsAppCoordinator: AppCoordinatorProtocol {
private var currentRootCoordinator: CoordinatorProtocol?
private let navigationController: NavigationController private let navigationController: NavigationController
let notificationManager: NotificationManagerProtocol? = nil let notificationManager: NotificationManagerProtocol? = nil
init() { init() {
navigationController = NavigationController() navigationController = NavigationController()
ServiceLocator.shared.register(userNotificationController: MockUserNotificationController())
} }
func start() { func start() {
@@ -31,11 +34,17 @@ class UITestsAppCoordinator: AppCoordinatorProtocol {
guard let screen = screens.first(where: { $0.id == id }) else { guard let screen = screens.first(where: { $0.id == id }) else {
fatalError() fatalError()
} }
// Store the initial coordinator so that it stays alive if drops it
// For example when replacing the root in the authentication flows
self.currentRootCoordinator = screen.coordinator
self.navigationController.setRootCoordinator(screen.coordinator) self.navigationController.setRootCoordinator(screen.coordinator)
} }
navigationController.setRootCoordinator(rootCoordinator) navigationController.setRootCoordinator(rootCoordinator)
Bundle.elementFallbackLanguage = "en"
} }
func toPresentable() -> AnyView { func toPresentable() -> AnyView {
@@ -105,7 +114,7 @@ class MockScreen: Identifiable {
userNotificationController: MockUserNotificationController(), userNotificationController: MockUserNotificationController(),
screenshot: Asset.Images.appLogo.image, screenshot: Asset.Images.appLogo.image,
isModallyPresented: false)) isModallyPresented: false))
case .splash: case .onboarding:
return OnboardingCoordinator() return OnboardingCoordinator()
case .roomPlainNoAvatar: case .roomPlainNoAvatar:
let parameters = RoomScreenCoordinatorParameters(navigationController: navigationController, let parameters = RoomScreenCoordinatorParameters(navigationController: navigationController,
@@ -8,23 +8,14 @@ targets:
dependencies: dependencies:
- target: ElementX - target: ElementX
- package: MatrixRustSDK - package: MatrixRustSDK
linkType: static
- package: DeviceKit - package: DeviceKit
linkType: static
- package: DTCoreText - package: DTCoreText
linkType: static
- package: KeychainAccess - package: KeychainAccess
linkType: static
- package: Kingfisher - package: Kingfisher
linkType: static
- package: SwiftyBeaver - package: SwiftyBeaver
linkType: static
- package: SwiftState - package: SwiftState
linkType: static
- package: GZIP - package: GZIP
linkType: static
- package: Sentry - package: Sentry
linkType: static
info: info:
path: ../SupportingFiles/Info.plist path: ../SupportingFiles/Info.plist
-52
View File
@@ -1,52 +0,0 @@
#!/usr/bin/python3
from encodings import utf_8
import os
import subprocess
import json
import argparse
from datetime import datetime
RUNTIME_PREFIX = 'com.apple.CoreSimulator.SimRuntime.'
def device_name(device):
return device['name']
def runtime_name(runtime):
return runtime.replace(RUNTIME_PREFIX, '').replace('-', '.')
parser = argparse.ArgumentParser()
parser.add_argument('--name', type=str, help='Simulator name (like \'iPhone 13 Pro Max\')', required=True)
parser.add_argument('--version', type=str, default='iOS.16.0', help='OS version (defaults to \'iOS.16.0\')', required=False)
args = vars(parser.parse_args())
simulator_name = args['name']
os_version = args['version'].replace('.', '-')
runtimes_map = subprocess.check_output("/usr/bin/xcrun simctl list --json devices available", shell=True)
runtime = RUNTIME_PREFIX + os_version
json_object = json.loads(runtimes_map)
if runtime in json_object['devices']:
devices = json_object['devices'][runtime]
device_found=False
for device in devices:
if device_name(device) == simulator_name:
UDID=device['udid']
print("Found device UDID: " + UDID)
dirname = os.path.dirname(os.path.abspath(__file__))
overridden_time = datetime(2007, 1, 9, 9, 41, 0).astimezone().isoformat()
print("Will override simulator with time: " + overridden_time)
os.system("/usr/bin/xcrun simctl boot '" + UDID + "' > /dev/null 2>&1")
os.system("/usr/bin/xcrun simctl status_bar '" + UDID + "' override --time '" + overridden_time + "' --dataNetwork 'wifi' --wifiMode 'active' --wifiBars 3 --cellularMode 'active' --cellularBars 4 --batteryState 'charged' --batteryLevel 100 > /dev/null 2>&1")
print("Simulator booted and status bar overriden")
device_found=True
break
if device_found == False:
print("Device could not be found. \n\nAvailable devices: " + ', '.join(map(device_name, devices)))
exit(1)
else:
print("Runtime could not be found. \n\nAvailable runtimes: " + ', '.join(map(runtime_name, json_object['devices'].keys())))
exit(1)
+2 -2
View File
@@ -43,7 +43,7 @@ extension XCUIApplication {
/// - Parameter identifier: Identifier of the UI test screen /// - Parameter identifier: Identifier of the UI test screen
func assertScreenshot(_ identifier: UITestScreenIdentifier) { func assertScreenshot(_ identifier: UITestScreenIdentifier) {
let failure = verifySnapshot(matching: screenshot().image, let failure = verifySnapshot(matching: screenshot().image,
as: .image(precision: 0.98, perceptualPrecision: 0.98, scale: nil), as: .image(precision: 0.99, perceptualPrecision: 0.98, scale: nil),
named: identifier.rawValue, named: identifier.rawValue,
testName: testName) testName: testName)
@@ -55,7 +55,7 @@ extension XCUIApplication {
} }
private var testName: String { private var testName: String {
osVersion + "-" + languageCode + "-" + regionCode + "-" + deviceName languageCode + "-" + regionCode + "-" + deviceName
} }
private var deviceName: String { private var deviceName: String {
+3 -3
View File
@@ -20,18 +20,18 @@ import XCTest
class OnboardingUITests: XCTestCase { class OnboardingUITests: XCTestCase {
func testInitialStateComponents() { func testInitialStateComponents() {
let app = Application.launch() let app = Application.launch()
app.goToScreenWithIdentifier(.splash) app.goToScreenWithIdentifier(.onboarding)
let getStartedButton = app.buttons["getStartedButton"] let getStartedButton = app.buttons["getStartedButton"]
XCTAssertTrue(getStartedButton.exists, "The primary action button should be shown.") XCTAssertTrue(getStartedButton.exists, "The primary action button should be shown.")
XCTAssertEqual(getStartedButton.label, ElementL10n.loginSplashSubmit) XCTAssertEqual(getStartedButton.label, ElementL10n.loginSplashSubmit)
app.assertScreenshot(.splash) app.assertScreenshot(.onboarding)
} }
func testSwipingBetweenPages() { func testSwipingBetweenPages() {
let app = Application.launch() let app = Application.launch()
app.goToScreenWithIdentifier(.splash) app.goToScreenWithIdentifier(.onboarding)
// Given the splash screen in its initial state. // Given the splash screen in its initial state.
let page1TitleText = app.staticTexts[ElementL10n.ftueAuthCarouselSecureTitle] let page1TitleText = app.staticTexts[ElementL10n.ftueAuthCarouselSecureTitle]
+8 -14
View File
@@ -27,7 +27,7 @@ class ServerSelectionUITests: XCTestCase {
app.goToScreenWithIdentifier(.serverSelection) app.goToScreenWithIdentifier(.serverSelection)
// Then it should be configured for matrix.org and with a cancel button // Then it should be configured for matrix.org and with a cancel button
let serverTextField = app.textFields.element let serverTextField = app.textFields[textFieldIdentifier]
XCTAssertEqual(serverTextField.value as? String, "matrix.org", "The server shown should be matrix.org with the https scheme hidden.") XCTAssertEqual(serverTextField.value as? String, "matrix.org", "The server shown should be matrix.org with the https scheme hidden.")
let confirmButton = app.buttons["confirmButton"] let confirmButton = app.buttons["confirmButton"]
@@ -35,9 +35,7 @@ class ServerSelectionUITests: XCTestCase {
XCTAssertTrue(confirmButton.exists, "The confirm button should always be shown.") XCTAssertTrue(confirmButton.exists, "The confirm button should always be shown.")
XCTAssertTrue(confirmButton.isEnabled, "The confirm button should be enabled when there is an address.") XCTAssertTrue(confirmButton.isEnabled, "The confirm button should be enabled when there is an address.")
let textFieldFooter = app.staticTexts[textFieldIdentifier] XCTAssertTrue(app.staticTexts[ElementL10n.serverSelectionServerFooter].exists)
XCTAssertTrue(textFieldFooter.exists)
XCTAssertEqual(textFieldFooter.label, ElementL10n.serverSelectionServerFooter)
let dismissButton = app.buttons["dismissButton"] let dismissButton = app.buttons["dismissButton"]
XCTAssertTrue(dismissButton.exists, "The dismiss button should be shown during modal presentation.") XCTAssertTrue(dismissButton.exists, "The dismiss button should be shown during modal presentation.")
@@ -51,12 +49,11 @@ class ServerSelectionUITests: XCTestCase {
app.goToScreenWithIdentifier(.serverSelection) app.goToScreenWithIdentifier(.serverSelection)
// When clearing the server address text field. // When clearing the server address text field.
app.textFields.element.tap() app.textFields[textFieldIdentifier].tap()
app.textFields.element.buttons.element.tap() app.textFields[textFieldIdentifier].buttons.element.tap()
// Then the screen should not allow the user to continue. // Then the screen should not allow the user to continue.
let serverTextField = app.textFields.element XCTAssertEqual(app.textFields[textFieldIdentifier].value as? String, ElementL10n.ftueAuthChooseServerEntryHint, "The text field should show placeholder text in this state.")
XCTAssertEqual(serverTextField.value as? String, ElementL10n.ftueAuthChooseServerEntryHint, "The text field should show placeholder text in this state.")
let confirmButton = app.buttons["confirmButton"] let confirmButton = app.buttons["confirmButton"]
XCTAssertTrue(confirmButton.exists, "The confirm button should always be shown.") XCTAssertTrue(confirmButton.exists, "The confirm button should always be shown.")
@@ -69,21 +66,18 @@ class ServerSelectionUITests: XCTestCase {
app.goToScreenWithIdentifier(.serverSelection) app.goToScreenWithIdentifier(.serverSelection)
// When typing in an invalid homeserver // When typing in an invalid homeserver
app.textFields.element.tap() app.textFields[textFieldIdentifier].tap()
app.textFields.element.buttons.element.tap() app.textFields.element.buttons.element.tap()
app.typeText("thisisbad\n") // The tests only accept an address from LoginHomeserver.mockXYZ app.typeText("thisisbad\n") // The tests only accept an address from LoginHomeserver.mockXYZ
// Then an error should be shown and the confirmation button disabled. // Then an error should be shown and the confirmation button disabled.
let serverTextField = app.textFields.element XCTAssertEqual(app.textFields[textFieldIdentifier].value as? String, "thisisbad", "The text field should show the entered server.")
XCTAssertEqual(serverTextField.value as? String, "thisisbad", "The text field should show the entered server.")
let confirmButton = app.buttons["confirmButton"] let confirmButton = app.buttons["confirmButton"]
XCTAssertTrue(confirmButton.exists, "The confirm button should always be shown.") XCTAssertTrue(confirmButton.exists, "The confirm button should always be shown.")
XCTAssertFalse(confirmButton.isEnabled, "The confirm button should be disabled when there is an error.") XCTAssertFalse(confirmButton.isEnabled, "The confirm button should be disabled when there is an error.")
let textFieldFooter = app.staticTexts[textFieldIdentifier] XCTAssertTrue(app.staticTexts[ElementL10n.loginErrorHomeserverNotFound].exists)
XCTAssertTrue(textFieldFooter.exists)
XCTAssertEqual(textFieldFooter.label, ElementL10n.loginErrorHomeserverNotFound)
} }
func testNonModalPresentation() { func testNonModalPresentation() {
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e1f6e3ade2b485726aa7543c0fb89dd175c0f885d131ccd79126fc518ec8532f
size 151971
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f50d65aac7311b56442b40f9a1b727fa504a8239a9eb46703b2a923fff209ea3
size 91183
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aaa767d2608f006b934ea158d6f9af3558ae3dc93c4e27755339aa0b9eff0cf6
size 130231
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:933fb31039308e36bbb73657bf353239b1b82cf11b2fa9d8c9c3126224dafb2d
size 138795
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1fe7dad4ce902782da61cc8fab9398d34e859b42734cab3f40b796a09e73f7f0
size 86828
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bf76a5b41d5db7251b58b866393fc7f8de74d16caf1bde15b7da69cc321eaeb0
size 97446
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7d1d53975d6cfc7c68b95b6d024c6b0f480aca79b44b0f1342463e06e3b94729
size 216546
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a8577d6de5d143144c005f534aea08d234d83b4c5eafd2132eb846c234816b8
size 216004
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6953c1d7aef468e97ffe28313395cce7c85aa4478c9cb7f46ee4583a6b8e8983
size 100874
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2b8d2e534718157551e4e59f2503f807331e840df7a05eddcd3cfa23fee3a5e3
size 97775
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:840aab831e255fac4ba71439caabd904a04720216894cf0a847588251e1ade23
size 92912
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b623b3822b6a4a0d4ab747d62b58e73a2e14c0bb7a4da0b312dcf4464b723dd3
size 106110
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:40c0eb8c2d32c964cda64cfcdf599aefe9c248f878a13b55748adfe9ed5b00d9
size 87373
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:019cec404a88a8f0ab500ba3d495dc7141d48bf16b7cf89c8ce3799082146330
size 84001
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ab277ca0a8842aaafe4b51ecc2d88a4d739f58a0531f48801d63608ad9490765
size 141162
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7462be5375e9458245c524aca718c9e4a08759821aba28cc54aefdfbca5a3fb7
size 175837
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3054001c41c0e9c1f96a6123e6a17850a4b81010fc0e478c9c44966aa8a24dfb
size 209595
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6721cf0b19febe7ef65fb2118ddb2ad370e20a1bfb35a7d12b24218a60d5f097
size 109992
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:120a42b7ac3865811312246d5c4d0aa18e4eda2cf4ee14b58eda33a026782080
size 185599
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6a447206e6610071763bc14abb979a106ecc0c01fdd6eab15e5452d556d5439f
size 190546
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b44361b93d8df9112b9beec3c7877ffac2c3f450807195f3f997904c1a29a5de
size 106026
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d086a6a5b17e7368514e7ca815ed87b37cc7989ad76d3fea26565479f10ea06b
size 117476
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:32f822ba57bc9cd647cd69b87bb83a006dcb197fdd88fb578e1f6f81426afb05
size 338934
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:662fed51cbd268deb7a855747deac79eab7fc778ac82d1674b454b6856d4742e
size 337968
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:127f56da957668e114d5bc2ff08b5bd2f92facf4c96ee24796a9c4dd62b1fce5
size 122890
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eacffc71c0c86b121c2ef9068a842a1cc3f1a1e39fa4daa0efc8558b7ac7f84a
size 117684
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:67a7e97e02a9f79b81012a5acfcc6d3d2a88f0aeb6a8ffccf655ca155c228ed8
size 118441
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a4cef72a882391e6ae3b1fb7a7a2e8831ecc5876b323b0ac250e872de6d746de
size 136546
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9f553f4fec8c2634b70726c6f4ef79e68328e0654156947e617b7dc578de103d
size 106604
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e82d5f9eb1d4bddc4fb7045acc3d47de650fc8c19e76bbd072b0fbf0b85d27e9
size 101650
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0f1926bc2d942004777dc999954579c7660a2834beb43d3c83c73702761c84f8
size 191772
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:973b7eab05cec065e1f6f3a1166353a92ef41c396da5cea5df21063c53b11398
size 256994
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2f80f06b22aaef2deb56a001683e36448140fe4ea9fb1c8258e5b362d6add32e
size 139709
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:78ce18bd8ea7a8d1aa4e0a3343c187183b3584385bab54cd52369ae41e126d1d
size 88806
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:97050c5e4e001c5c2f255398f50c032577d0ec99d1c09ba55948fc41ee8d95f2
size 119651
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9323af8660ea8fa3eb8be32881bdfaeba0791dd43a3eb238d6907a9bb19e3e43
size 128570
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d1d21ffa3f6cce084de9c36345d2a5fad9e45b3eb990af8f0bfc16d9b4a51378
size 86858
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b773235c656d79328282510443e8cecb4775c4f279651b4b886f9ef395e63dc5
size 92452
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ee83194ea859411d87380b49ad0c5aed1f3d3b8e626f7457617cc4b602de3d36
size 216068
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:693d769b352ae53ce9adae602a0cf73a4cbc5b02aee49027408c00413c358ce6
size 215524
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:01493f209b49f85a82c14767e681ef11ffe942ead65b835fa16d4375a5ee9b8c
size 96068
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7b3a960ee76526c7b9dbcf89f8d509f018cc6655a2bf148ad4ceba50eeb8b0c4
size 93211
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:00ccc67d88a152aa2ee4b7814e420706a90f34a6d488c84fcbc4fb14708d0a34
size 86658
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9935ca485da7cba8d43d415fc622638dc8ef9043dcd17423342995f07746790d
size 106827
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:40c0eb8c2d32c964cda64cfcdf599aefe9c248f878a13b55748adfe9ed5b00d9
size 87373
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:019cec404a88a8f0ab500ba3d495dc7141d48bf16b7cf89c8ce3799082146330
size 84001
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9dc719221789b6c0c8c3488d9ffea34dd300e0be22ab3d0b8099930229a39b49
size 126699
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5736044bbde29059e1334240db2055088552b6c3e9290b4f75aad874fc036263
size 170712
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:32cc123c9bafbf477c4b1e6dd561233f2193ca321934f6068fb641dd46e70098
size 187495
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4a4ade72e7c962ab1a986c2b46b5f40ef2dc6f8c9eab28257e17b559c59f4c9e
size 105645
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:70ad8c98f2cc65b20db79560b61395175d8f52b8d8511dccd5cecc3586f7e006
size 165916
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:58eaa48da13b8e3f07b8b0cd96209f396c2d08ef105d1cdf31057a788db76910
size 175641
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3d1b0905b8141bb2faae942f2072024ac05a32153d634b323c655abcdee1a99b
size 106024
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:43c9374dd27b1177277e6fb3d3b9ebed902ad36277bdece10e9d5efe76f3ab98
size 110127
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2929105c6f1ef9d48c5a64be125065737f16177e34012522ad3b12e61339785a
size 338054
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0430659782fbf9efe771af9a9cdb19a866deaede615fc7e4dcb8b235265e8c5e
size 337106
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:83c2a451b9d214187f39d4bee8f97f09707091dda7e3cd8056248e879c92a7cc
size 118565
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1bb75de7f979d2643cccf9d52d555c36800cf02034568e5405d3288a08fd9f18
size 113979
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4111fd6a524d93658574f7ce6fc1039d0bc4f8b54fa4746443cca034cf2e5981
size 109311
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b65e635bcaa70eca69e6f0a1a183e028064b9ca251d6065613adcd02736b5a18
size 136596
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9f553f4fec8c2634b70726c6f4ef79e68328e0654156947e617b7dc578de103d
size 106604
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e82d5f9eb1d4bddc4fb7045acc3d47de650fc8c19e76bbd072b0fbf0b85d27e9
size 101650
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:541272c5d33b33a6781f93c2e12173764a780c6ee122398c9f217db796378545
size 163117
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0ce2ce2087131a0e528a591eda67c0a31fe7def19cb7e810a8ad3052bacf38d5
size 248888
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:46b230a82a457cbbabc160dae3347ce717911395864628224a32d5c746a5f738
size 154222
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:30e2adeebbad6d99195ab5b9e11e6596bc029f0dc73c445c09310f4838c679a9
size 91210
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:89c0c10c22be5bb997a3938046aed4120065ce6ea3918aca1155e9463f5af8ad
size 128844
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6742dd34300bb28a92f9c65be9bd30b2775affdce6b63f2bdf36746ff78b5861
size 137525
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:77814c5fae9308c316583dab73cfbc7b1d248052bb0a3211f9432ad3349af211
size 89410
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0e3a17c13aaaffdd11d2f30acd5bf06467e393bb683492ce84b33780cecff489
size 96843
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:81864c996f8e9db70238258589b763bc3bca7ab3773e2597d1f631fa8e93a965
size 216288
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6dbffa0936e8743bcd59849354e9a04d00333d403f764a37c185c9d2dea5478b
size 215741
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:24231b27994b3b9183c52203bc5f2e4c74750f5782270fe86847334d9456d47e
size 99866
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b061bad459e2f0c244273ffde69a7da4d6757333eb55004e12377a574c8614f7
size 98294
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8ef677e97cc471c6ce525d87084b1eb595dde704d6e181eb831220aadd7846cc
size 91710
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cbdc9a67eacf93f5c6e023dc29ad19440d5463142ec6695c2505145695fa2e56
size 107221
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:40c0eb8c2d32c964cda64cfcdf599aefe9c248f878a13b55748adfe9ed5b00d9
size 87373
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:019cec404a88a8f0ab500ba3d495dc7141d48bf16b7cf89c8ce3799082146330
size 84001
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7d3121984c83fdb1d21ea0733f9cdd4674bf810b6cfed0d0dd4187d79603253c
size 134963
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6d352034fff1dbc22feb0eabebb77896adab900f9ec8638173e611deafac5396
size 169516
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1441ecb238973572ec9d8b44c8ec956dd619137fb0734bf923ef99c14ddd83fc
size 210941
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:64afe93ba5547c6a1451f6be4cb4897df27fca20ed410820b77b6790e68c358e
size 109131
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e94535ec311ef618ae487e4efae3c4db761e1dabcc3481ef639c10573e152399
size 183120
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2e35a3c14db962aa4a4647371ce7bc244c479d4050de78364a7bc4579caf994d
size 190270
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5139c184a81f3a3bc5fab165d6d47a124d90925f5f98ebd6d5ba3621bb8ac3af
size 110670
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:969e848b922962fd3c68a93637a7df9d5132230a75f41f6e5cf3e16c4280bd0c
size 116290
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0feeaf604db54d94e49d4524f47f916b401a4b0e32321824e4208511e79d6a07
size 338399
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8aafeb1da477f7e35ed5720108d2068c24a2954248bc3390d79c86f5bc7a8a69
size 337444

Some files were not shown because too many files have changed in this diff Show More