зеркало из https://github.com/nextcloud/talk-ios.git
Merge pull request #1474 from nextcloud/unit-tests
Add unit/integration tests and add test structure
This commit is contained in:
Коммит
aba89f437a
|
@ -79,6 +79,18 @@
|
|||
1F59446225B8EDF5002AD65F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2C7F47AC20289B9600081CC7 /* Localizable.strings */; };
|
||||
1F59446625B8EDF5002AD65F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2C7F47AC20289B9600081CC7 /* Localizable.strings */; };
|
||||
1F5A24332ADA77DA009939FE /* InputbarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F5A24322ADA77DA009939FE /* InputbarViewController.swift */; };
|
||||
1F5CDAE72B3B05110040ECC0 /* UnitColorGeneratorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F5CDAE62B3B05110040ECC0 /* UnitColorGeneratorTest.swift */; };
|
||||
1F5CDAEA2B3C436C0040ECC0 /* SDWebImage in Frameworks */ = {isa = PBXBuildFile; productRef = 1F5CDAE92B3C436C0040ECC0 /* SDWebImage */; };
|
||||
1F5CDAEC2B3C436C0040ECC0 /* SDWebImageSVGKitPlugin in Frameworks */ = {isa = PBXBuildFile; productRef = 1F5CDAEB2B3C436C0040ECC0 /* SDWebImageSVGKitPlugin */; };
|
||||
1F5CDAEE2B3C48670040ECC0 /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 1F5CDAED2B3C48670040ECC0 /* Realm */; };
|
||||
1F5CDAF02B3C486D0040ECC0 /* SwiftyAttributes in Frameworks */ = {isa = PBXBuildFile; productRef = 1F5CDAEF2B3C486D0040ECC0 /* SwiftyAttributes */; };
|
||||
1F5CDAF22B3C48720040ECC0 /* CDMarkdownKit in Frameworks */ = {isa = PBXBuildFile; productRef = 1F5CDAF12B3C48720040ECC0 /* CDMarkdownKit */; };
|
||||
1F5CDAF42B3C48790040ECC0 /* NextcloudKit in Frameworks */ = {isa = PBXBuildFile; productRef = 1F5CDAF32B3C48790040ECC0 /* NextcloudKit */; };
|
||||
1F5CDAF62B3C487E0040ECC0 /* OpenSSL in Frameworks */ = {isa = PBXBuildFile; productRef = 1F5CDAF52B3C487E0040ECC0 /* OpenSSL */; };
|
||||
1F5CDAF82B3C48870040ECC0 /* QRCodeReader in Frameworks */ = {isa = PBXBuildFile; productRef = 1F5CDAF72B3C48870040ECC0 /* QRCodeReader */; };
|
||||
1F5CDAFA2B3C488E0040ECC0 /* SwiftUIIntrospect in Frameworks */ = {isa = PBXBuildFile; productRef = 1F5CDAF92B3C488E0040ECC0 /* SwiftUIIntrospect */; };
|
||||
1F5CDAFC2B3C48940040ECC0 /* TOCropViewController in Frameworks */ = {isa = PBXBuildFile; productRef = 1F5CDAFB2B3C48940040ECC0 /* TOCropViewController */; };
|
||||
1F5CDAFE2B3C489B0040ECC0 /* WebRTC in Frameworks */ = {isa = PBXBuildFile; productRef = 1F5CDAFD2B3C489B0040ECC0 /* WebRTC */; };
|
||||
1F5CDF642584E78900B0026E /* NCChatFileStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F5CDF632584E78900B0026E /* NCChatFileStatus.m */; };
|
||||
1F61C767285E35A6004D74D8 /* DiagnosticsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F61C766285E35A6004D74D8 /* DiagnosticsTableViewController.swift */; };
|
||||
1F61C76B285F65E1004D74D8 /* SimpleTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F61C76A285F65E1004D74D8 /* SimpleTableViewController.swift */; };
|
||||
|
@ -88,6 +100,14 @@
|
|||
1F66B72929FA936E003FB168 /* SLKDefaultReplyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F66B72829FA936E003FB168 /* SLKDefaultReplyView.m */; };
|
||||
1F66B72C29FA9414003FB168 /* SLKDefaultTypingIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F66B72B29FA9414003FB168 /* SLKDefaultTypingIndicatorView.m */; };
|
||||
1F66B72F29FABD01003FB168 /* SwiftyAttributes in Frameworks */ = {isa = PBXBuildFile; productRef = 1F66B72E29FABD01003FB168 /* SwiftyAttributes */; };
|
||||
1F6D8C332B2E3756004376B8 /* IntegrationRoomTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6D8C322B2E3756004376B8 /* IntegrationRoomTest.swift */; };
|
||||
1F6D8C3D2B2F23C4004376B8 /* Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6D8C3C2B2F23C4004376B8 /* Helpers.swift */; };
|
||||
1F6D8C412B2F26D5004376B8 /* TestConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6D8C402B2F26D5004376B8 /* TestConstants.swift */; };
|
||||
1F6D8C432B2F26EE004376B8 /* Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6D8C422B2F26EE004376B8 /* Helpers.swift */; };
|
||||
1F6D8C442B2F2791004376B8 /* TestConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6D8C402B2F26D5004376B8 /* TestConstants.swift */; };
|
||||
1F6D8C492B2F2FB7004376B8 /* AAAALoginTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6D8C472B2F2F69004376B8 /* AAAALoginTest.swift */; };
|
||||
1F6D8C4B2B2F5B61004376B8 /* TestBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6D8C4A2B2F5B61004376B8 /* TestBase.swift */; };
|
||||
1F6D8C4D2B2F8FE5004376B8 /* IntegrationChatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6D8C4C2B2F8FE5004376B8 /* IntegrationChatTest.swift */; };
|
||||
1F7625E52901B0DB00834869 /* CallsFromOldAccountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F7625E42901B0DB00834869 /* CallsFromOldAccountViewController.swift */; };
|
||||
1F7625E72901B0E800834869 /* CallsFromOldAccountViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1F7625E62901B0E800834869 /* CallsFromOldAccountViewController.xib */; };
|
||||
1F77A5EB2AB9A3EE007B6037 /* BGTaskHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD9182828C55A73009092AB /* BGTaskHelper.swift */; };
|
||||
|
@ -161,7 +181,7 @@
|
|||
1FB6678F28CE381300D29F8D /* SubtitleTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FB6678E28CE381300D29F8D /* SubtitleTableViewCell.swift */; };
|
||||
1FC940B92A5F21FC00FFFADE /* SwiftMarkdownObjCBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0A1D432A5F1FA800A25433 /* SwiftMarkdownObjCBridge.swift */; };
|
||||
1FC940BA2A5F21FD00FFFADE /* SwiftMarkdownObjCBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0A1D432A5F1FA800A25433 /* SwiftMarkdownObjCBridge.swift */; };
|
||||
1FD8AE6B2A3A216300787C16 /* NextcloudTalkUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8AD8C2A3A162100787C16 /* NextcloudTalkUITests.swift */; };
|
||||
1FD8AE6B2A3A216300787C16 /* UIRoomTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8AD8C2A3A162100787C16 /* UIRoomTest.swift */; };
|
||||
1FD9182928C55A73009092AB /* BGTaskHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD9182828C55A73009092AB /* BGTaskHelper.swift */; };
|
||||
1FDCC3D429EBF6E700DEB39B /* AvatarImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FDCC3D329EBF6E700DEB39B /* AvatarImageView.swift */; };
|
||||
1FDCC3E329EC787400DEB39B /* AvatarManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F90DA0329E9A28E00E81E3D /* AvatarManager.swift */; };
|
||||
|
@ -443,6 +463,7 @@
|
|||
2CF8AD402A0010FB00A4D3E6 /* MessageTranslationViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2CF8AD3E2A0010FB00A4D3E6 /* MessageTranslationViewController.xib */; };
|
||||
2CF9CBFF26025F65002246EF /* TextInputTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2CF9CBFB26025F64002246EF /* TextInputTableViewCell.xib */; };
|
||||
3FCA62550CD1442D28E8A7C6 /* libPods-NotificationServiceExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B81BB7A4920C391CC2CACFD /* libPods-NotificationServiceExtension.a */; };
|
||||
7684F1574066434C5A073F93 /* libPods-NextcloudTalkTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FE0DC028175FB2FB27A7EB9E /* libPods-NextcloudTalkTests.a */; };
|
||||
807E30762A83A90F00089D28 /* UserStatusOptionsSwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 807E30752A83A90F00089D28 /* UserStatusOptionsSwiftUI.swift */; };
|
||||
80832B762A822E5100195A97 /* UserStatusSwiftUIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80832B752A822E5100195A97 /* UserStatusSwiftUIView.swift */; };
|
||||
80832B782A823D0700195A97 /* UserStatusMessageSwiftUIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80832B772A823D0700195A97 /* UserStatusMessageSwiftUIView.swift */; };
|
||||
|
@ -463,6 +484,13 @@
|
|||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
1F6D8C342B2E3756004376B8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 2C0574751EDD9E8E00D9E7F2 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 2C05747C1EDD9E8E00D9E7F2;
|
||||
remoteInfo = NextcloudTalk;
|
||||
};
|
||||
1FD8AD902A3A162100787C16 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 2C0574751EDD9E8E00D9E7F2 /* Project object */;
|
||||
|
@ -536,6 +564,7 @@
|
|||
1F5813F628EB23EF00318FC3 /* NCSplitViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCSplitViewController.swift; sourceTree = "<group>"; };
|
||||
1F5813F728EB23EF00318FC3 /* NCSplitViewPlaceholderViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCSplitViewPlaceholderViewController.swift; sourceTree = "<group>"; };
|
||||
1F5A24322ADA77DA009939FE /* InputbarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputbarViewController.swift; sourceTree = "<group>"; };
|
||||
1F5CDAE62B3B05110040ECC0 /* UnitColorGeneratorTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = UnitColorGeneratorTest.swift; path = NextcloudTalkTests/Unit/UnitColorGeneratorTest.swift; sourceTree = SOURCE_ROOT; };
|
||||
1F5CDF622584E78900B0026E /* NCChatFileStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NCChatFileStatus.h; sourceTree = "<group>"; };
|
||||
1F5CDF632584E78900B0026E /* NCChatFileStatus.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NCChatFileStatus.m; sourceTree = "<group>"; };
|
||||
1F61C766285E35A6004D74D8 /* DiagnosticsTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiagnosticsTableViewController.swift; sourceTree = "<group>"; };
|
||||
|
@ -546,6 +575,14 @@
|
|||
1F66B72829FA936E003FB168 /* SLKDefaultReplyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLKDefaultReplyView.m; sourceTree = "<group>"; };
|
||||
1F66B72A29FA9414003FB168 /* SLKDefaultTypingIndicatorView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLKDefaultTypingIndicatorView.h; sourceTree = "<group>"; };
|
||||
1F66B72B29FA9414003FB168 /* SLKDefaultTypingIndicatorView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLKDefaultTypingIndicatorView.m; sourceTree = "<group>"; };
|
||||
1F6D8C302B2E3756004376B8 /* NextcloudTalkTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NextcloudTalkTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1F6D8C322B2E3756004376B8 /* IntegrationRoomTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntegrationRoomTest.swift; sourceTree = "<group>"; };
|
||||
1F6D8C3C2B2F23C4004376B8 /* Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Helpers.swift; sourceTree = "<group>"; };
|
||||
1F6D8C402B2F26D5004376B8 /* TestConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestConstants.swift; sourceTree = "<group>"; };
|
||||
1F6D8C422B2F26EE004376B8 /* Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Helpers.swift; sourceTree = "<group>"; };
|
||||
1F6D8C472B2F2F69004376B8 /* AAAALoginTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AAAALoginTest.swift; sourceTree = "<group>"; };
|
||||
1F6D8C4A2B2F5B61004376B8 /* TestBase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestBase.swift; sourceTree = "<group>"; };
|
||||
1F6D8C4C2B2F8FE5004376B8 /* IntegrationChatTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntegrationChatTest.swift; sourceTree = "<group>"; };
|
||||
1F7625E42901B0DB00834869 /* CallsFromOldAccountViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallsFromOldAccountViewController.swift; sourceTree = "<group>"; };
|
||||
1F7625E62901B0E800834869 /* CallsFromOldAccountViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CallsFromOldAccountViewController.xib; sourceTree = "<group>"; };
|
||||
1F77A6112AB9B161007B6037 /* ScreenCaptureController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreenCaptureController.m; sourceTree = "<group>"; };
|
||||
|
@ -580,7 +617,7 @@
|
|||
1FB52E752842C75E00AC741B /* QRCodeLoginController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRCodeLoginController.swift; sourceTree = "<group>"; };
|
||||
1FB6678E28CE381300D29F8D /* SubtitleTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubtitleTableViewCell.swift; sourceTree = "<group>"; };
|
||||
1FD8AD8A2A3A162100787C16 /* NextcloudTalkUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NextcloudTalkUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1FD8AD8C2A3A162100787C16 /* NextcloudTalkUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NextcloudTalkUITests.swift; sourceTree = "<group>"; };
|
||||
1FD8AD8C2A3A162100787C16 /* UIRoomTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIRoomTest.swift; sourceTree = "<group>"; };
|
||||
1FD9182828C55A73009092AB /* BGTaskHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BGTaskHelper.swift; sourceTree = "<group>"; };
|
||||
1FDCC3D329EBF6E700DEB39B /* AvatarImageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AvatarImageView.swift; sourceTree = "<group>"; };
|
||||
1FDCC3EC29EC7DD400DEB39B /* NextcloudTalk-Bridging-Header-Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NextcloudTalk-Bridging-Header-Extensions.h"; sourceTree = "<group>"; };
|
||||
|
@ -959,6 +996,7 @@
|
|||
2CF8AD3D2A0010FB00A4D3E6 /* MessageTranslationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageTranslationViewController.swift; sourceTree = "<group>"; };
|
||||
2CF8AD3E2A0010FB00A4D3E6 /* MessageTranslationViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MessageTranslationViewController.xib; sourceTree = "<group>"; };
|
||||
2CF9CBFB26025F64002246EF /* TextInputTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TextInputTableViewCell.xib; sourceTree = "<group>"; };
|
||||
2EEE832C09F1555E6F2B1187 /* Pods-NextcloudTalkTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NextcloudTalkTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-NextcloudTalkTests/Pods-NextcloudTalkTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
4202C63030F0FFBB1C16D75E /* Pods-NextcloudTalk.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NextcloudTalk.debug.xcconfig"; path = "Pods/Target Support Files/Pods-NextcloudTalk/Pods-NextcloudTalk.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
4D4C7BF2F97F47B0D9094618 /* Pods-NextcloudTalk.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NextcloudTalk.release.xcconfig"; path = "Pods/Target Support Files/Pods-NextcloudTalk/Pods-NextcloudTalk.release.xcconfig"; sourceTree = "<group>"; };
|
||||
4F7C31E9D74F550EAF89931B /* libPods-NextcloudTalk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NextcloudTalk.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
|
@ -968,6 +1006,7 @@
|
|||
80832B752A822E5100195A97 /* UserStatusSwiftUIView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserStatusSwiftUIView.swift; sourceTree = "<group>"; };
|
||||
80832B772A823D0700195A97 /* UserStatusMessageSwiftUIView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserStatusMessageSwiftUIView.swift; sourceTree = "<group>"; };
|
||||
82CD0527E04B844CAD762ADE /* Pods-BroadcastUploadExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BroadcastUploadExtension.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BroadcastUploadExtension/Pods-BroadcastUploadExtension.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
86A7F2BE457F181CCBF79C14 /* Pods-NextcloudTalkTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NextcloudTalkTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-NextcloudTalkTests/Pods-NextcloudTalkTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
95D756208A81284B975853EC /* Pods-ShareExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ShareExtension.release.xcconfig"; path = "Pods/Target Support Files/Pods-ShareExtension/Pods-ShareExtension.release.xcconfig"; sourceTree = "<group>"; };
|
||||
9A3D305FCD7BF7E727A62F35 /* libPods-BroadcastUploadExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BroadcastUploadExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9B81BB7A4920C391CC2CACFD /* libPods-NotificationServiceExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationServiceExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
|
@ -984,9 +1023,29 @@
|
|||
DA7558122790D65700A48A1B /* AccountTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DA8801A127A2DA00009EF248 /* UserProfileTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserProfileTableViewController.swift; sourceTree = "<group>"; };
|
||||
DA8801A327AC52AC009EF248 /* TextInputTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextInputTableViewCell.swift; sourceTree = "<group>"; };
|
||||
FE0DC028175FB2FB27A7EB9E /* libPods-NextcloudTalkTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NextcloudTalkTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
1F6D8C2D2B2E3756004376B8 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1F5CDAEA2B3C436C0040ECC0 /* SDWebImage in Frameworks */,
|
||||
1F5CDAFE2B3C489B0040ECC0 /* WebRTC in Frameworks */,
|
||||
1F5CDAF82B3C48870040ECC0 /* QRCodeReader in Frameworks */,
|
||||
1F5CDAF22B3C48720040ECC0 /* CDMarkdownKit in Frameworks */,
|
||||
1F5CDAFA2B3C488E0040ECC0 /* SwiftUIIntrospect in Frameworks */,
|
||||
1F5CDAEC2B3C436C0040ECC0 /* SDWebImageSVGKitPlugin in Frameworks */,
|
||||
1F5CDAF62B3C487E0040ECC0 /* OpenSSL in Frameworks */,
|
||||
1F5CDAF02B3C486D0040ECC0 /* SwiftyAttributes in Frameworks */,
|
||||
1F5CDAEE2B3C48670040ECC0 /* Realm in Frameworks */,
|
||||
7684F1574066434C5A073F93 /* libPods-NextcloudTalkTests.a in Frameworks */,
|
||||
1F5CDAFC2B3C48940040ECC0 /* TOCropViewController in Frameworks */,
|
||||
1F5CDAF42B3C48790040ECC0 /* NextcloudKit in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1FD8AD872A3A162100787C16 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
@ -1115,6 +1174,54 @@
|
|||
name = References;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1F6D8C312B2E3756004376B8 /* NextcloudTalkTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1F6D8C452B2F27A3004376B8 /* Common */,
|
||||
1F6D8C462B2F27BB004376B8 /* UI */,
|
||||
1F6D8C3A2B2F236D004376B8 /* Integration */,
|
||||
1F6D8C3B2B2F237F004376B8 /* Unit */,
|
||||
);
|
||||
path = NextcloudTalkTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1F6D8C3A2B2F236D004376B8 /* Integration */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1F6D8C422B2F26EE004376B8 /* Helpers.swift */,
|
||||
1F6D8C4A2B2F5B61004376B8 /* TestBase.swift */,
|
||||
1F6D8C322B2E3756004376B8 /* IntegrationRoomTest.swift */,
|
||||
1F6D8C4C2B2F8FE5004376B8 /* IntegrationChatTest.swift */,
|
||||
);
|
||||
path = Integration;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1F6D8C3B2B2F237F004376B8 /* Unit */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1F5CDAE62B3B05110040ECC0 /* UnitColorGeneratorTest.swift */,
|
||||
);
|
||||
path = Unit;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1F6D8C452B2F27A3004376B8 /* Common */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1F6D8C402B2F26D5004376B8 /* TestConstants.swift */,
|
||||
);
|
||||
path = Common;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1F6D8C462B2F27BB004376B8 /* UI */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1F6D8C3C2B2F23C4004376B8 /* Helpers.swift */,
|
||||
1F6D8C472B2F2F69004376B8 /* AAAALoginTest.swift */,
|
||||
1FD8AD8C2A3A162100787C16 /* UIRoomTest.swift */,
|
||||
);
|
||||
path = UI;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1F77A60E2AB9B14D007B6037 /* Screensharing */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -1140,14 +1247,6 @@
|
|||
name = Siri;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1FD8AD8B2A3A162100787C16 /* NextcloudTalkUITests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1FD8AD8C2A3A162100787C16 /* NextcloudTalkUITests.swift */,
|
||||
);
|
||||
path = NextcloudTalkUITests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1FF2FD5E2AB99CCB000C9905 /* BroadcastUploadExtension */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -1167,8 +1266,8 @@
|
|||
children = (
|
||||
2CC0015024A1F0E900A20167 /* NotificationServiceExtension */,
|
||||
2C62AFA424C08845007E460A /* ShareExtension */,
|
||||
1FD8AD8B2A3A162100787C16 /* NextcloudTalkUITests */,
|
||||
1FF2FD5E2AB99CCB000C9905 /* BroadcastUploadExtension */,
|
||||
1F6D8C312B2E3756004376B8 /* NextcloudTalkTests */,
|
||||
2C05747E1EDD9E8E00D9E7F2 /* Products */,
|
||||
2C05749C1EDDA01700D9E7F2 /* ThirdParty */,
|
||||
2C05747F1EDD9E8E00D9E7F2 /* NextcloudTalk */,
|
||||
|
@ -1185,6 +1284,7 @@
|
|||
2C62AFA324C08845007E460A /* ShareExtension.appex */,
|
||||
1FD8AD8A2A3A162100787C16 /* NextcloudTalkUITests.xctest */,
|
||||
1FF2FD5B2AB99CCB000C9905 /* BroadcastUploadExtension.appex */,
|
||||
1F6D8C302B2E3756004376B8 /* NextcloudTalkTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -1624,6 +1724,7 @@
|
|||
4F7C31E9D74F550EAF89931B /* libPods-NextcloudTalk.a */,
|
||||
1FF2FD5C2AB99CCB000C9905 /* ReplayKit.framework */,
|
||||
9A3D305FCD7BF7E727A62F35 /* libPods-BroadcastUploadExtension.a */,
|
||||
FE0DC028175FB2FB27A7EB9E /* libPods-NextcloudTalkTests.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
|
@ -1783,6 +1884,8 @@
|
|||
4D4C7BF2F97F47B0D9094618 /* Pods-NextcloudTalk.release.xcconfig */,
|
||||
82CD0527E04B844CAD762ADE /* Pods-BroadcastUploadExtension.debug.xcconfig */,
|
||||
A8F95DE6635ABC1E64CA8E4A /* Pods-BroadcastUploadExtension.release.xcconfig */,
|
||||
86A7F2BE457F181CCBF79C14 /* Pods-NextcloudTalkTests.debug.xcconfig */,
|
||||
2EEE832C09F1555E6F2B1187 /* Pods-NextcloudTalkTests.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
|
@ -1790,6 +1893,40 @@
|
|||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
1F6D8C2F2B2E3756004376B8 /* NextcloudTalkTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1F6D8C362B2E3756004376B8 /* Build configuration list for PBXNativeTarget "NextcloudTalkTests" */;
|
||||
buildPhases = (
|
||||
136C010C4905A923E7DB2A58 /* [CP] Check Pods Manifest.lock */,
|
||||
1F6D8C2C2B2E3756004376B8 /* Sources */,
|
||||
1F6D8C2D2B2E3756004376B8 /* Frameworks */,
|
||||
1F6D8C2E2B2E3756004376B8 /* Resources */,
|
||||
5E5096E23D32642C5DE7B4C8 /* [CP] Embed Pods Frameworks */,
|
||||
7089D1DF404E8B1CB25FF3ED /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
1F6D8C352B2E3756004376B8 /* PBXTargetDependency */,
|
||||
);
|
||||
name = NextcloudTalkTests;
|
||||
packageProductDependencies = (
|
||||
1F5CDAE92B3C436C0040ECC0 /* SDWebImage */,
|
||||
1F5CDAEB2B3C436C0040ECC0 /* SDWebImageSVGKitPlugin */,
|
||||
1F5CDAED2B3C48670040ECC0 /* Realm */,
|
||||
1F5CDAEF2B3C486D0040ECC0 /* SwiftyAttributes */,
|
||||
1F5CDAF12B3C48720040ECC0 /* CDMarkdownKit */,
|
||||
1F5CDAF32B3C48790040ECC0 /* NextcloudKit */,
|
||||
1F5CDAF52B3C487E0040ECC0 /* OpenSSL */,
|
||||
1F5CDAF72B3C48870040ECC0 /* QRCodeReader */,
|
||||
1F5CDAF92B3C488E0040ECC0 /* SwiftUIIntrospect */,
|
||||
1F5CDAFB2B3C48940040ECC0 /* TOCropViewController */,
|
||||
1F5CDAFD2B3C489B0040ECC0 /* WebRTC */,
|
||||
);
|
||||
productName = NextcloudTalkTests;
|
||||
productReference = 1F6D8C302B2E3756004376B8 /* NextcloudTalkTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
1FD8AD892A3A162100787C16 /* NextcloudTalkUITests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1FD8AD922A3A162100787C16 /* Build configuration list for PBXNativeTarget "NextcloudTalkUITests" */;
|
||||
|
@ -1931,10 +2068,14 @@
|
|||
2C0574751EDD9E8E00D9E7F2 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1430;
|
||||
LastSwiftUpdateCheck = 1510;
|
||||
LastUpgradeCheck = 1320;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
1F6D8C2F2B2E3756004376B8 = {
|
||||
CreatedOnToolsVersion = 15.1;
|
||||
TestTargetID = 2C05747C1EDD9E8E00D9E7F2;
|
||||
};
|
||||
1FD8AD892A3A162100787C16 = {
|
||||
CreatedOnToolsVersion = 14.3;
|
||||
TestTargetID = 2C05747C1EDD9E8E00D9E7F2;
|
||||
|
@ -2023,13 +2164,21 @@
|
|||
2C05747C1EDD9E8E00D9E7F2 /* NextcloudTalk */,
|
||||
2CC0014E24A1F0E900A20167 /* NotificationServiceExtension */,
|
||||
2C62AFA224C08845007E460A /* ShareExtension */,
|
||||
1FD8AD892A3A162100787C16 /* NextcloudTalkUITests */,
|
||||
1FF2FD5A2AB99CCB000C9905 /* BroadcastUploadExtension */,
|
||||
1FD8AD892A3A162100787C16 /* NextcloudTalkUITests */,
|
||||
1F6D8C2F2B2E3756004376B8 /* NextcloudTalkTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
1F6D8C2E2B2E3756004376B8 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1FD8AD882A3A162100787C16 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
@ -2131,6 +2280,28 @@
|
|||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
136C010C4905A923E7DB2A58 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-NextcloudTalkTests-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
25F3EB565BD21EF2FF15F197 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
@ -2183,6 +2354,44 @@
|
|||
shellPath = /bin/sh;
|
||||
shellScript = "APP_PATH=\"${TARGET_BUILD_DIR}/${WRAPPER_NAME}\"\n\n# This script loops through the frameworks embedded in the application and\n# removes unused architectures.\nfind \"$APP_PATH\" -name '*.framework' -type d | while read -r FRAMEWORK\ndo\nFRAMEWORK_EXECUTABLE_NAME=$(defaults read \"$FRAMEWORK/Info.plist\" CFBundleExecutable)\nFRAMEWORK_EXECUTABLE_PATH=\"$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME\"\necho \"Executable is $FRAMEWORK_EXECUTABLE_PATH\"\n\nEXTRACTED_ARCHS=()\n\nfor ARCH in $ARCHS\ndo\necho \"Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME\"\nlipo -extract \"$ARCH\" \"$FRAMEWORK_EXECUTABLE_PATH\" -o \"$FRAMEWORK_EXECUTABLE_PATH-$ARCH\"\nEXTRACTED_ARCHS+=(\"$FRAMEWORK_EXECUTABLE_PATH-$ARCH\")\ndone\n\necho \"Merging extracted architectures: ${ARCHS}\"\nlipo -o \"$FRAMEWORK_EXECUTABLE_PATH-merged\" -create \"${EXTRACTED_ARCHS[@]}\"\nrm \"${EXTRACTED_ARCHS[@]}\"\n\necho \"Replacing original executable with thinned version\"\nrm \"$FRAMEWORK_EXECUTABLE_PATH\"\nmv \"$FRAMEWORK_EXECUTABLE_PATH-merged\" \"$FRAMEWORK_EXECUTABLE_PATH\"\n\ndone\n";
|
||||
};
|
||||
5E5096E23D32642C5DE7B4C8 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-NextcloudTalkTests/Pods-NextcloudTalkTests-frameworks.sh",
|
||||
"${PODS_XCFRAMEWORKS_BUILD_DIR}/MobileVLCKit/MobileVLCKit.framework/MobileVLCKit",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MobileVLCKit.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NextcloudTalkTests/Pods-NextcloudTalkTests-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
7089D1DF404E8B1CB25FF3ED /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-NextcloudTalkTests/Pods-NextcloudTalkTests-resources.sh",
|
||||
"${PODS_ROOT}/DateTools/DateTools/DateTools/DateTools.bundle",
|
||||
"${PODS_ROOT}/MaterialComponents/components/ActivityIndicator/src/MaterialActivityIndicator.bundle",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DateTools.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialActivityIndicator.bundle",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NextcloudTalkTests/Pods-NextcloudTalkTests-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
902A7A3EC0BDCC947AEF3EBF /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
@ -2286,11 +2495,27 @@
|
|||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
1F6D8C2C2B2E3756004376B8 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1F6D8C4B2B2F5B61004376B8 /* TestBase.swift in Sources */,
|
||||
1F6D8C332B2E3756004376B8 /* IntegrationRoomTest.swift in Sources */,
|
||||
1F6D8C4D2B2F8FE5004376B8 /* IntegrationChatTest.swift in Sources */,
|
||||
1F5CDAE72B3B05110040ECC0 /* UnitColorGeneratorTest.swift in Sources */,
|
||||
1F6D8C412B2F26D5004376B8 /* TestConstants.swift in Sources */,
|
||||
1F6D8C432B2F26EE004376B8 /* Helpers.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1FD8AD862A3A162100787C16 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1FD8AE6B2A3A216300787C16 /* NextcloudTalkUITests.swift in Sources */,
|
||||
1FD8AE6B2A3A216300787C16 /* UIRoomTest.swift in Sources */,
|
||||
1F6D8C3D2B2F23C4004376B8 /* Helpers.swift in Sources */,
|
||||
1F6D8C442B2F2791004376B8 /* TestConstants.swift in Sources */,
|
||||
1F6D8C492B2F2FB7004376B8 /* AAAALoginTest.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -2667,6 +2892,11 @@
|
|||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
1F6D8C352B2E3756004376B8 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 2C05747C1EDD9E8E00D9E7F2 /* NextcloudTalk */;
|
||||
targetProxy = 1F6D8C342B2E3756004376B8 /* PBXContainerItemProxy */;
|
||||
};
|
||||
1FD8AD912A3A162100787C16 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 2C05747C1EDD9E8E00D9E7F2 /* NextcloudTalk */;
|
||||
|
@ -2778,6 +3008,65 @@
|
|||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1F6D8C372B2E3756004376B8 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 86A7F2BE457F181CCBF79C14 /* Pods-NextcloudTalkTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = NKUJUXUJ3B;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.nextcloud.Talk.NextcloudTalkTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NextcloudTalk.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/NextcloudTalk";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1F6D8C382B2E3756004376B8 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 2EEE832C09F1555E6F2B1187 /* Pods-NextcloudTalkTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = NKUJUXUJ3B;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.nextcloud.Talk.NextcloudTalkTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NextcloudTalk.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/NextcloudTalk";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1FD8AD932A3A162100787C16 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
|
@ -3459,6 +3748,15 @@
|
|||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1F6D8C362B2E3756004376B8 /* Build configuration list for PBXNativeTarget "NextcloudTalkTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1F6D8C372B2E3756004376B8 /* Debug */,
|
||||
1F6D8C382B2E3756004376B8 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1FD8AD922A3A162100787C16 /* Build configuration list for PBXNativeTarget "NextcloudTalkUITests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
@ -3577,7 +3875,7 @@
|
|||
repositoryURL = "https://github.com/nextcloud/NextcloudKit";
|
||||
requirement = {
|
||||
kind = exactVersion;
|
||||
version = 1.6.0;
|
||||
version = 2.6.0;
|
||||
};
|
||||
};
|
||||
1FAB2E7B2AC99326001214EB /* XCRemoteSwiftPackageReference "TOCropViewController" */ = {
|
||||
|
@ -3685,6 +3983,61 @@
|
|||
package = 1F468E7428DCC6C60099597B /* XCRemoteSwiftPackageReference "Dynamic" */;
|
||||
productName = Dynamic;
|
||||
};
|
||||
1F5CDAE92B3C436C0040ECC0 /* SDWebImage */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 1F45A1142A01D6EC005FE87D /* XCRemoteSwiftPackageReference "SDWebImage" */;
|
||||
productName = SDWebImage;
|
||||
};
|
||||
1F5CDAEB2B3C436C0040ECC0 /* SDWebImageSVGKitPlugin */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 1F45A11F2A01D8BA005FE87D /* XCRemoteSwiftPackageReference "SDWebImageSVGKitPlugin" */;
|
||||
productName = SDWebImageSVGKitPlugin;
|
||||
};
|
||||
1F5CDAED2B3C48670040ECC0 /* Realm */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 1F0ECBFB2A73F21A00921E90 /* XCRemoteSwiftPackageReference "realm-swift" */;
|
||||
productName = Realm;
|
||||
};
|
||||
1F5CDAEF2B3C486D0040ECC0 /* SwiftyAttributes */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 1F66B72D29FABD01003FB168 /* XCRemoteSwiftPackageReference "SwiftyAttributes" */;
|
||||
productName = SwiftyAttributes;
|
||||
};
|
||||
1F5CDAF12B3C48720040ECC0 /* CDMarkdownKit */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 1F0ECBF32A68274400921E90 /* XCRemoteSwiftPackageReference "CDMarkdownKit" */;
|
||||
productName = CDMarkdownKit;
|
||||
};
|
||||
1F5CDAF32B3C48790040ECC0 /* NextcloudKit */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 1F7AE07629142CA1009F72AD /* XCRemoteSwiftPackageReference "NextcloudKit" */;
|
||||
productName = NextcloudKit;
|
||||
};
|
||||
1F5CDAF52B3C487E0040ECC0 /* OpenSSL */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 2CCCD21B2835088F00F076CE /* XCRemoteSwiftPackageReference "OpenSSL" */;
|
||||
productName = OpenSSL;
|
||||
};
|
||||
1F5CDAF72B3C48870040ECC0 /* QRCodeReader */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 1F628CB82842BAAF0083A425 /* XCRemoteSwiftPackageReference "QRCodeReader" */;
|
||||
productName = QRCodeReader;
|
||||
};
|
||||
1F5CDAF92B3C488E0040ECC0 /* SwiftUIIntrospect */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 80CDF8C22A8E098900CB57AE /* XCRemoteSwiftPackageReference "swiftui-introspect" */;
|
||||
productName = SwiftUIIntrospect;
|
||||
};
|
||||
1F5CDAFB2B3C48940040ECC0 /* TOCropViewController */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 1FAB2E7B2AC99326001214EB /* XCRemoteSwiftPackageReference "TOCropViewController" */;
|
||||
productName = TOCropViewController;
|
||||
};
|
||||
1F5CDAFD2B3C489B0040ECC0 /* WebRTC */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 1FAB2E862ACD44CF001214EB /* XCRemoteSwiftPackageReference "talk-clients-webrtc" */;
|
||||
productName = WebRTC;
|
||||
};
|
||||
1F628CB92842BAAF0083A425 /* QRCodeReader */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 1F628CB82842BAAF0083A425 /* XCRemoteSwiftPackageReference "QRCodeReader" */;
|
||||
|
|
|
@ -32,12 +32,22 @@
|
|||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1F6795D82A3A02FE00EAF142"
|
||||
BlueprintIdentifier = "1FD8AD892A3A162100787C16"
|
||||
BuildableName = "NextcloudTalkUITests.xctest"
|
||||
BlueprintName = "NextcloudTalkUITests"
|
||||
ReferencedContainer = "container:NextcloudTalk.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1F6D8C2F2B2E3756004376B8"
|
||||
BuildableName = "NextcloudTalkTests.xctest"
|
||||
BlueprintName = "NextcloudTalkTests"
|
||||
ReferencedContainer = "container:NextcloudTalk.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
|
|
|
@ -32,6 +32,9 @@ import CryptoKit
|
|||
private let steps = 6
|
||||
private let finalPalette: [UIColor]
|
||||
|
||||
// See: https://stackoverflow.com/a/22334560
|
||||
private static let multiplier = CGFloat(255.999999)
|
||||
|
||||
private override init() {
|
||||
finalPalette = ColorGenerator.genColors(steps)
|
||||
|
||||
|
@ -81,9 +84,9 @@ import CryptoKit
|
|||
}
|
||||
|
||||
public static func genColors(_ steps: Int) -> [UIColor] {
|
||||
let red = UIColor(red: 182 / 255, green: 70 / 255, blue: 157 / 255, alpha: 1)
|
||||
let yellow = UIColor(red: 221 / 255, green: 203 / 255, blue: 85 / 255, alpha: 1)
|
||||
let blue = UIColor(red: 0, green: 130 / 255, blue: 201 / 255, alpha: 1)
|
||||
let red = UIColor(red: 182 / multiplier, green: 70 / multiplier, blue: 157 / multiplier, alpha: 1)
|
||||
let yellow = UIColor(red: 221 / multiplier, green: 203 / multiplier, blue: 85 / multiplier, alpha: 1)
|
||||
let blue = UIColor(red: 0, green: 130 / multiplier, blue: 201 / multiplier, alpha: 1)
|
||||
|
||||
var palette1 = mixPalette(steps, red, yellow)
|
||||
let palette2 = mixPalette(steps, yellow, blue)
|
||||
|
|
|
@ -100,7 +100,7 @@ extern NSString * const kMinimumRequiredTalkCapability;
|
|||
- (TalkAccount *)activeAccount;
|
||||
- (NSArray *)allAccounts;
|
||||
- (NSArray *)inactiveAccounts;
|
||||
- (TalkAccount *)talkAccountForAccountId:(NSString *)accountId;
|
||||
- (TalkAccount * _Nullable)talkAccountForAccountId:(NSString *)accountId;
|
||||
- (TalkAccount *)talkAccountForUserId:(NSString *)userId inServer:(NSString *)server;
|
||||
- (void)setActiveAccountWithAccountId:(NSString *)accountId;
|
||||
- (NSString *)accountIdForUser:(NSString *)user inServer:(NSString *)server;
|
||||
|
|
|
@ -377,13 +377,25 @@ import UniformTypeIdentifiers
|
|||
}
|
||||
|
||||
public static func hexString(fromColor color: UIColor) -> String {
|
||||
let components = color.cgColor.components
|
||||
let r: CGFloat = components?[0] ?? 0.0
|
||||
let g: CGFloat = components?[1] ?? 0.0
|
||||
let b: CGFloat = components?[2] ?? 0.0
|
||||
// See: https://stackoverflow.com/a/39358741
|
||||
var red: CGFloat = 0
|
||||
var green: CGFloat = 0
|
||||
var blue: CGFloat = 0
|
||||
var alpha: CGFloat = 0
|
||||
|
||||
// Returns hex color string format (e.g."#00FF00")
|
||||
return String(format: "#%02lX%02lX%02lX", lroundf(Float(r * 255)), lroundf(Float(g * 255)), lroundf(Float(b * 255)))
|
||||
let multiplier = CGFloat(255.999999)
|
||||
|
||||
guard color.getRed(&red, green: &green, blue: &blue, alpha: &alpha) else {
|
||||
return ""
|
||||
}
|
||||
|
||||
// We don't expect an alpha component right now
|
||||
return String(
|
||||
format: "#%02lX%02lX%02lX",
|
||||
Int(red * multiplier),
|
||||
Int(green * multiplier),
|
||||
Int(blue * multiplier)
|
||||
)
|
||||
}
|
||||
|
||||
public static func isValid(indexPath: IndexPath, forTableView tableView: UITableView) -> Bool {
|
||||
|
|
|
@ -106,4 +106,7 @@
|
|||
#import "ScreenCapturer.h"
|
||||
#import "ScreenCaptureController.h"
|
||||
|
||||
#import "NCAPISessionManager.h"
|
||||
#import "AFNetworking.h"
|
||||
|
||||
#endif /* NextcloudTalk_Bridging_Header_h */
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
//
|
||||
// Copyright (c) 2023 Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// Author Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// GNU GPL version 3 or any later version
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public class TestConstants {
|
||||
static let timeoutLong: Double = 60
|
||||
static let timeoutShort: Double = 15
|
||||
static let server = "http://localhost:8080"
|
||||
static let username = "admin"
|
||||
static let password = "admin"
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
//
|
||||
// Copyright (c) 2023 Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// Author Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// GNU GPL version 3 or any later version
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import NextcloudTalk
|
||||
import XCTest
|
||||
|
||||
extension XCTestCase {
|
||||
|
||||
// TODO: This should probably be part of APIController
|
||||
func getRoomDict(from rawRoomDict: [Any]) -> [NCRoom] {
|
||||
var rooms: [NCRoom] = []
|
||||
for roomDict in rawRoomDict {
|
||||
if let roomDict = roomDict as? [AnyHashable: Any] {
|
||||
rooms.append(NCRoom(dictionary: roomDict))
|
||||
}
|
||||
}
|
||||
|
||||
return rooms
|
||||
}
|
||||
|
||||
func checkRoomExists(roomName: String, withAccoun account: TalkAccount) {
|
||||
let exp = expectation(description: "\(#function)\(#line)")
|
||||
|
||||
NCAPIController.sharedInstance().getRoomsFor(account, updateStatus: false, modifiedSince: 0) { roomsDict, _, errorCode in
|
||||
XCTAssertEqual(errorCode, 0)
|
||||
|
||||
let rooms = self.getRoomDict(from: roomsDict!)
|
||||
XCTAssertNotNil(rooms.first(where: { $0.displayName == roomName }))
|
||||
|
||||
exp.fulfill()
|
||||
}
|
||||
|
||||
waitForExpectations(timeout: TestConstants.timeoutLong, handler: nil)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
//
|
||||
// Copyright (c) 2023 Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// Author Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// GNU GPL version 3 or any later version
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import NextcloudTalk
|
||||
|
||||
final class IntegrationChatTest: TestBase {
|
||||
|
||||
func testSendMessage() throws {
|
||||
let activeAccount = NCDatabaseManager.sharedInstance().activeAccount()
|
||||
let roomName = "Integration Test Room 👍"
|
||||
let chatMessage = "Test Message 😀😆"
|
||||
|
||||
var exp = expectation(description: "\(#function)\(#line)")
|
||||
var roomToken = ""
|
||||
|
||||
// Create a room
|
||||
NCAPIController.sharedInstance().createRoom(for: activeAccount, with: nil, of: kNCRoomTypePublic, andName: roomName) { token, error in
|
||||
XCTAssertNil(error)
|
||||
|
||||
roomToken = token ?? ""
|
||||
|
||||
exp.fulfill()
|
||||
}
|
||||
waitForExpectations(timeout: TestConstants.timeoutLong, handler: nil)
|
||||
|
||||
// Send a message
|
||||
exp = expectation(description: "\(#function)\(#line)")
|
||||
NCAPIController.sharedInstance().sendChatMessage(chatMessage, toRoom: roomToken, displayName: "", replyTo: 0, referenceId: "", silently: false, for: activeAccount) { error in
|
||||
XCTAssertNil(error)
|
||||
|
||||
exp.fulfill()
|
||||
}
|
||||
waitForExpectations(timeout: TestConstants.timeoutLong, handler: nil)
|
||||
|
||||
// Try to receive the sent message
|
||||
exp = expectation(description: "\(#function)\(#line)")
|
||||
NCAPIController.sharedInstance().receiveChatMessages(ofRoom: roomToken,
|
||||
fromLastMessageId: 0,
|
||||
history: true,
|
||||
includeLastMessage: true,
|
||||
timeout: false,
|
||||
lastCommonReadMessage: 0,
|
||||
setReadMarker: false,
|
||||
markNotificationsAsRead: false,
|
||||
for: activeAccount) { messages, _, _, error, errorCode in
|
||||
|
||||
XCTAssertNil(error)
|
||||
XCTAssertEqual(errorCode, 0)
|
||||
|
||||
for rawMessage in messages! {
|
||||
if let message = rawMessage as? NSDictionary {
|
||||
// swiftlint:disable:next force_cast
|
||||
if message.object(forKey: "message") as! String == chatMessage {
|
||||
exp.fulfill()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
waitForExpectations(timeout: TestConstants.timeoutLong, handler: nil)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
//
|
||||
// Copyright (c) 2023 Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// Author Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// GNU GPL version 3 or any later version
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import NextcloudTalk
|
||||
|
||||
final class IntegrationRoomTest: TestBase {
|
||||
|
||||
func testRoomList() throws {
|
||||
let activeAccount = NCDatabaseManager.sharedInstance().activeAccount()
|
||||
|
||||
let exp = expectation(description: "\(#function)\(#line)")
|
||||
NCAPIController.sharedInstance().getRoomsFor(activeAccount, updateStatus: false, modifiedSince: 0) { rooms, error, errorCode in
|
||||
XCTAssertEqual(errorCode, 0)
|
||||
XCTAssertNil(error)
|
||||
|
||||
// By default, the room list should never be empty, it should contain atleast the talk changelog room
|
||||
XCTAssertGreaterThan(rooms?.count ?? 0, 0)
|
||||
|
||||
exp.fulfill()
|
||||
}
|
||||
|
||||
waitForExpectations(timeout: TestConstants.timeoutLong, handler: nil)
|
||||
}
|
||||
|
||||
func testRoomCreation() throws {
|
||||
let activeAccount = NCDatabaseManager.sharedInstance().activeAccount()
|
||||
let roomName = "Integration Test Room"
|
||||
|
||||
let exp = expectation(description: "\(#function)\(#line)")
|
||||
|
||||
// Create a room
|
||||
NCAPIController.sharedInstance().createRoom(for: activeAccount, with: nil, of: kNCRoomTypePublic, andName: roomName) { _, error in
|
||||
XCTAssertNil(error)
|
||||
exp.fulfill()
|
||||
}
|
||||
|
||||
waitForExpectations(timeout: TestConstants.timeoutLong, handler: nil)
|
||||
|
||||
self.checkRoomExists(roomName: roomName, withAccoun: activeAccount)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
//
|
||||
// Copyright (c) 2023 Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// Author Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// GNU GPL version 3 or any later version
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
import XCTest
|
||||
import NextcloudTalk
|
||||
|
||||
class TestBase: XCTestCase {
|
||||
|
||||
var appToken = ""
|
||||
var apiSessionManager: NCAPISessionManager?
|
||||
|
||||
func setupAppToken() {
|
||||
let appPasswordRoute = "\(TestConstants.server)/ocs/v2.php/core/getapppassword"
|
||||
|
||||
let credentialsString = "\(TestConstants.username):\(TestConstants.password)"
|
||||
let authHeader = "Basic \(credentialsString.data(using: .utf8)!.base64EncodedString())"
|
||||
|
||||
let configuration = URLSessionConfiguration.default
|
||||
let apiSessionManager = NCAPISessionManager(sessionConfiguration: configuration)
|
||||
apiSessionManager.requestSerializer.setValue(authHeader, forHTTPHeaderField: "Authorization")
|
||||
|
||||
let exp = expectation(description: "\(#function)\(#line)")
|
||||
|
||||
_ = apiSessionManager.get(appPasswordRoute, parameters: nil, progress: nil) { _, result in
|
||||
if let resultDict = result as? [String: AnyObject],
|
||||
let ocs = resultDict["ocs"] as? [String: AnyObject],
|
||||
let data = ocs["data"] as? [String: AnyObject],
|
||||
let apppassword = data["apppassword"] as? String {
|
||||
|
||||
self.appToken = apppassword
|
||||
exp.fulfill()
|
||||
}
|
||||
} failure: { _, error in
|
||||
print(error)
|
||||
exp.fulfill()
|
||||
}
|
||||
|
||||
waitForExpectations(timeout: TestConstants.timeoutLong, handler: nil)
|
||||
}
|
||||
|
||||
func setupApiSessionManager() {
|
||||
let authHeader = "Basic \(self.appToken.data(using: .utf8)!.base64EncodedString())"
|
||||
|
||||
let configuration = URLSessionConfiguration.default
|
||||
let apiSessionManager = NCAPISessionManager(sessionConfiguration: configuration)
|
||||
apiSessionManager.requestSerializer.setValue(authHeader, forHTTPHeaderField: "Authorization")
|
||||
|
||||
self.apiSessionManager = apiSessionManager
|
||||
}
|
||||
|
||||
override func setUpWithError() throws {
|
||||
if appToken.isEmpty {
|
||||
let accountId = NCDatabaseManager.sharedInstance().accountId(forUser: TestConstants.username, inServer: TestConstants.server)
|
||||
let talkAccount = NCDatabaseManager.sharedInstance().talkAccount(forAccountId: accountId)
|
||||
|
||||
// Remove the account in case it already exists
|
||||
if talkAccount != nil {
|
||||
NCSettingsController.sharedInstance().logoutAccount(withAccountId: accountId, withCompletionBlock: nil)
|
||||
}
|
||||
|
||||
self.setupAppToken()
|
||||
self.setupApiSessionManager()
|
||||
|
||||
NCSettingsController.sharedInstance().addNewAccount(forUser: TestConstants.username, withToken: appToken, inServer: TestConstants.server)
|
||||
let activeAccount = NCDatabaseManager.sharedInstance().activeAccount()
|
||||
let exp = expectation(description: "\(#function)\(#line)")
|
||||
|
||||
// Make sure the capabilities are up to date
|
||||
NCSettingsController.sharedInstance().getCapabilitiesForAccountId(activeAccount.accountId) { _ in
|
||||
exp.fulfill()
|
||||
}
|
||||
|
||||
waitForExpectations(timeout: TestConstants.timeoutLong, handler: nil)
|
||||
}
|
||||
|
||||
XCTAssertFalse(appToken.isEmpty)
|
||||
XCTAssertNotNil(apiSessionManager)
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
//
|
||||
// Copyright (c) 2023 Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// Author Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// GNU GPL version 3 or any later version
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import XCTest
|
||||
|
||||
final class AAAALoginTest: XCTestCase {
|
||||
|
||||
override func setUpWithError() throws {
|
||||
// In UI tests it is usually best to stop immediately when a failure occurs.
|
||||
continueAfterFailure = false
|
||||
}
|
||||
|
||||
// Tests are done in alphabetical order, so we want to always test login first
|
||||
func test_Login() {
|
||||
let app = launchAndLogin()
|
||||
|
||||
// Check if the profile button is available
|
||||
let profileButton = app.buttons["User profile and settings"]
|
||||
XCTAssert(profileButton.waitForExistence(timeout: TestConstants.timeoutLong))
|
||||
|
||||
// Open profile menu
|
||||
profileButton.tap()
|
||||
|
||||
// At this point we should be logged in, so check if username and server is displayed somewhere
|
||||
XCTAssert(app.staticTexts[TestConstants.server].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
XCTAssert(app.staticTexts[TestConstants.username].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
//
|
||||
// Copyright (c) 2023 Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// Author Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// GNU GPL version 3 or any later version
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import XCTest
|
||||
|
||||
extension XCTestCase {
|
||||
|
||||
func waitForEnabled(object: Any?) {
|
||||
let enabledPredicate = NSPredicate(format: "enabled == true")
|
||||
expectation(for: enabledPredicate, evaluatedWith: object, handler: nil)
|
||||
waitForExpectations(timeout: TestConstants.timeoutLong, handler: nil)
|
||||
}
|
||||
|
||||
func waitForHittable(object: Any?) {
|
||||
let enabledPredicate = NSPredicate(format: "hittable == true")
|
||||
expectation(for: enabledPredicate, evaluatedWith: object, handler: nil)
|
||||
waitForExpectations(timeout: TestConstants.timeoutLong, handler: nil)
|
||||
}
|
||||
|
||||
// Based on https://stackoverflow.com/a/47947315
|
||||
@discardableResult
|
||||
func waitForEitherElementToExist(_ elementA: XCUIElement, _ elementB: XCUIElement, _ timeout: TimeInterval) -> XCUIElement? {
|
||||
let startTime = NSDate.timeIntervalSinceReferenceDate
|
||||
while !elementA.exists && !elementB.exists { // while neither element exists
|
||||
if NSDate.timeIntervalSinceReferenceDate - startTime > timeout {
|
||||
XCTFail("Timed out waiting for either element to exist.")
|
||||
break
|
||||
}
|
||||
sleep(1)
|
||||
}
|
||||
|
||||
if elementA.exists { return elementA }
|
||||
if elementB.exists { return elementB }
|
||||
return nil
|
||||
}
|
||||
|
||||
func launchAndLogin() -> XCUIApplication {
|
||||
let app = XCUIApplication()
|
||||
app.launchArguments += ["-AppleLanguages", "(en-US)"]
|
||||
app.launchArguments += ["-AppleLocale", "\"en-US\""]
|
||||
app.launchArguments += ["-TestEnvironment"]
|
||||
app.launch()
|
||||
|
||||
let accountSwitcherButton = app.buttons["Nextcloud Talk"]
|
||||
let serverAddressHttpsTextField = app.textFields["Server address https://…"]
|
||||
|
||||
// Wait shortly until the app is fully started
|
||||
let foundElement = waitForEitherElementToExist(accountSwitcherButton, serverAddressHttpsTextField, TestConstants.timeoutLong)
|
||||
XCTAssertNotNil(foundElement)
|
||||
|
||||
// When the account switcher button exists, we have atleast one account configured
|
||||
if foundElement == accountSwitcherButton {
|
||||
return app
|
||||
}
|
||||
|
||||
serverAddressHttpsTextField.tap()
|
||||
serverAddressHttpsTextField.typeText(TestConstants.server)
|
||||
|
||||
let loginButton = app.buttons["Log in"]
|
||||
XCTAssert(loginButton.waitForExistence(timeout: TestConstants.timeoutLong))
|
||||
loginButton.tap()
|
||||
|
||||
let webViewsQuery = app.webViews.webViews.webViews
|
||||
let main = webViewsQuery.otherElements["main"]
|
||||
|
||||
// Wait for the webview to be available
|
||||
XCTAssert(main.waitForExistence(timeout: TestConstants.timeoutLong))
|
||||
|
||||
// Wait for the login button to be available and to get enabled/hittable
|
||||
let loginButtonWeb = webViewsQuery.buttons["Log in"]
|
||||
XCTAssert(loginButtonWeb.waitForExistence(timeout: TestConstants.timeoutLong))
|
||||
waitForEnabled(object: loginButtonWeb)
|
||||
waitForHittable(object: loginButtonWeb)
|
||||
|
||||
loginButtonWeb.tap()
|
||||
|
||||
XCTAssert(main.waitForExistence(timeout: TestConstants.timeoutLong))
|
||||
|
||||
let usernameTextField = main.descendants(matching: .textField).firstMatch
|
||||
let passwordTextField = main.descendants(matching: .secureTextField).firstMatch
|
||||
|
||||
XCTAssert(usernameTextField.waitForExistence(timeout: TestConstants.timeoutLong))
|
||||
XCTAssert(passwordTextField.waitForExistence(timeout: TestConstants.timeoutLong))
|
||||
|
||||
usernameTextField.tap()
|
||||
usernameTextField.typeText(TestConstants.username + "\n")
|
||||
|
||||
passwordTextField.tap()
|
||||
passwordTextField.typeText(TestConstants.password + "\n")
|
||||
|
||||
let grantAccessButton = webViewsQuery.buttons["Grant access"]
|
||||
XCTAssert(grantAccessButton.waitForExistence(timeout: TestConstants.timeoutLong))
|
||||
waitForEnabled(object: grantAccessButton)
|
||||
waitForHittable(object: grantAccessButton)
|
||||
|
||||
grantAccessButton.tap()
|
||||
|
||||
// When the account switcher gets enabled, we have atleast 1 account in the app and are online
|
||||
XCTAssert(accountSwitcherButton.waitForExistence(timeout: TestConstants.timeoutLong))
|
||||
waitForEnabled(object: accountSwitcherButton)
|
||||
|
||||
return app
|
||||
}
|
||||
}
|
|
@ -0,0 +1,130 @@
|
|||
//
|
||||
// Copyright (c) 2023 Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// Author Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// GNU GPL version 3 or any later version
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class UIRoomTest: XCTestCase {
|
||||
|
||||
override func setUpWithError() throws {
|
||||
// In UI tests it is usually best to stop immediately when a failure occurs.
|
||||
continueAfterFailure = false
|
||||
}
|
||||
|
||||
func testCreateConversation() {
|
||||
let app = launchAndLogin()
|
||||
let newConversationName = "Test conversation"
|
||||
|
||||
app.navigationBars["Nextcloud Talk"].buttons["Create a new conversation"].tap()
|
||||
XCTAssert(app.tables.cells.staticTexts["Create a new group conversation"].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
XCTAssert(app.tables.cells.staticTexts["Create a new public conversation"].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
XCTAssert(app.tables.cells.staticTexts["Show list of open conversations"].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
app.tables.cells.staticTexts["Create a new group conversation"].tap()
|
||||
app.navigationBars["RoomCreationTableView"].buttons["Next"].tap()
|
||||
app.typeText(newConversationName)
|
||||
XCTAssert(app.navigationBars["New group conversation"].buttons["Create"].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
app.navigationBars["New group conversation"].buttons["Create"].tap()
|
||||
|
||||
let chatNavBar = app.navigationBars["NextcloudTalk.ChatView"]
|
||||
|
||||
// Wait for navigationBar
|
||||
XCTAssert(chatNavBar.waitForExistence(timeout: TestConstants.timeoutLong))
|
||||
|
||||
// Wait for titleView
|
||||
let chatTitleView = chatNavBar.textViews[newConversationName]
|
||||
XCTAssert(chatTitleView.waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
|
||||
// Wait until we joined the room and the call buttons get active
|
||||
let voiceCallButton = chatNavBar.buttons["Voice call"]
|
||||
XCTAssert(voiceCallButton.waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
waitForEnabled(object: voiceCallButton)
|
||||
waitForHittable(object: voiceCallButton)
|
||||
|
||||
// Open conversation settings
|
||||
chatTitleView.tap()
|
||||
|
||||
// Check if if the name of the conversation is shown
|
||||
XCTAssert(app.textFields[newConversationName].waitForExistence(timeout: TestConstants.timeoutLong))
|
||||
|
||||
// Go back to conversation list
|
||||
app.navigationBars["Conversation settings"].buttons["Back"].tap()
|
||||
chatNavBar.buttons["Back"].tap()
|
||||
|
||||
// Check if the conversation appears in the conversation list
|
||||
XCTAssert(app.tables.cells.staticTexts[newConversationName].waitForExistence(timeout: TestConstants.timeoutLong))
|
||||
}
|
||||
|
||||
func testChatViewControllerDeallocation() {
|
||||
let app = launchAndLogin()
|
||||
let newConversationName = "DeAllocTest"
|
||||
|
||||
// Create a new test conversion
|
||||
app.navigationBars["Nextcloud Talk"].buttons["Create a new conversation"].tap()
|
||||
XCTAssert(app.tables.cells.staticTexts["Create a new group conversation"].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
XCTAssert(app.tables.cells.staticTexts["Create a new public conversation"].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
XCTAssert(app.tables.cells.staticTexts["Show list of open conversations"].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
app.tables.cells.staticTexts["Create a new group conversation"].tap()
|
||||
app.navigationBars["RoomCreationTableView"].buttons["Next"].tap()
|
||||
app.typeText(newConversationName)
|
||||
XCTAssert(app.navigationBars["New group conversation"].buttons["Create"].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
app.navigationBars["New group conversation"].buttons["Create"].tap()
|
||||
|
||||
// Check if we have one chat view controller allocated
|
||||
XCTAssert(app.staticTexts["ChatVC: 1 / CallVC: 0"].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
|
||||
// Send a test message
|
||||
let testMessage = "TestMessage"
|
||||
let toolbar = app.toolbars["Toolbar"]
|
||||
let textView = toolbar.textViews["Write message, @ to mention someone …"]
|
||||
XCTAssert(textView.waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
textView.tap()
|
||||
app.typeText(testMessage)
|
||||
let sendMessageButton = toolbar.buttons["Send message"]
|
||||
sendMessageButton.tap()
|
||||
|
||||
// Wait for temporary message to be replaced
|
||||
XCTAssert(app.images["MessageSent"].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
|
||||
// Open context menu
|
||||
let tables = app.tables
|
||||
XCTAssert(tables.staticTexts[TestConstants.username].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
let message = tables.staticTexts[TestConstants.username]
|
||||
message.press(forDuration: 2.0)
|
||||
|
||||
// Add a reaction to close the context menu
|
||||
let reactionExists = app.staticTexts["👍"].waitForExistence(timeout: TestConstants.timeoutShort)
|
||||
|
||||
if reactionExists {
|
||||
app.staticTexts["👍"].tap()
|
||||
} else {
|
||||
// In case we are testing against a nextcloud version that does not support reactions (<= NC 23)
|
||||
// we simply tap the "Reply" button from the context menu
|
||||
XCTAssert(app.buttons["Reply"].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
app.buttons["Reply"].tap()
|
||||
}
|
||||
|
||||
// Go back to the main view controller
|
||||
let chatNavBar = app.navigationBars["NextcloudTalk.ChatView"]
|
||||
chatNavBar.buttons["Back"].tap()
|
||||
|
||||
// Check if all chat view controllers are deallocated
|
||||
XCTAssert(app.staticTexts["ChatVC: 0 / CallVC: 0"].waitForExistence(timeout: TestConstants.timeoutShort))
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
//
|
||||
// Copyright (c) 2023 Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// Author Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// GNU GPL version 3 or any later version
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@testable import NextcloudTalk
|
||||
|
||||
final class UnitColorGeneratorTest: XCTestCase {
|
||||
|
||||
func testUsernameToColor() throws {
|
||||
// See: https://github.com/nextcloud-libraries/nextcloud-vue/blob/76cc5dec7305f8e83b6380893e391d53770fb272/tests/unit/functions/usernameToColor/usernameToColor.spec.js#L10
|
||||
usernameToColorHexHelper(username: "", expectedHexColor: "#0082c9")
|
||||
usernameToColorHexHelper(username: ",", expectedHexColor: "#1e78c1")
|
||||
usernameToColorHexHelper(username: ".", expectedHexColor: "#c98879")
|
||||
usernameToColorHexHelper(username: "admin", expectedHexColor: "#d09e6d")
|
||||
usernameToColorHexHelper(username: "123e4567-e89b-12d3-a456-426614174000", expectedHexColor: "#bc5c91")
|
||||
usernameToColorHexHelper(username: "Akeel Robertson", expectedHexColor: "#9750a4")
|
||||
usernameToColorHexHelper(username: "Brayden Truong", expectedHexColor: "#d09e6d")
|
||||
usernameToColorHexHelper(username: "Daphne Roy", expectedHexColor: "#9750a4")
|
||||
usernameToColorHexHelper(username: "Ellena Wright Frederic Conway", expectedHexColor: "#c37285")
|
||||
usernameToColorHexHelper(username: "Gianluca Hills", expectedHexColor: "#d6b461")
|
||||
usernameToColorHexHelper(username: "Haseeb Stephens", expectedHexColor: "#d6b461")
|
||||
usernameToColorHexHelper(username: "Idris Mac", expectedHexColor: "#9750a4")
|
||||
usernameToColorHexHelper(username: "Kristi Fisher", expectedHexColor: "#0082c9")
|
||||
usernameToColorHexHelper(username: "Lillian Wall", expectedHexColor: "#bc5c91")
|
||||
usernameToColorHexHelper(username: "Lorelai Taylor", expectedHexColor: "#ddcb55")
|
||||
usernameToColorHexHelper(username: "Madina Knight", expectedHexColor: "#9750a4")
|
||||
usernameToColorHexHelper(username: "Meeting", expectedHexColor: "#c98879")
|
||||
usernameToColorHexHelper(username: "Private Circle", expectedHexColor: "#c37285")
|
||||
usernameToColorHexHelper(username: "Rae Hope", expectedHexColor: "#795aab")
|
||||
usernameToColorHexHelper(username: "Santiago Singleton", expectedHexColor: "#bc5c91")
|
||||
usernameToColorHexHelper(username: "Sid Combs", expectedHexColor: "#d09e6d")
|
||||
usernameToColorHexHelper(username: "TestCircle", expectedHexColor: "#499aa2")
|
||||
usernameToColorHexHelper(username: "Tom Mörtel", expectedHexColor: "#248eb5")
|
||||
usernameToColorHexHelper(username: "Vivienne Jacobs", expectedHexColor: "#1e78c1")
|
||||
usernameToColorHexHelper(username: "Zaki Cortes", expectedHexColor: "#6ea68f")
|
||||
usernameToColorHexHelper(username: "a user", expectedHexColor: "#5b64b3")
|
||||
usernameToColorHexHelper(username: "admin@cloud.example.com", expectedHexColor: "#9750a4")
|
||||
usernameToColorHexHelper(username: "another user", expectedHexColor: "#ddcb55")
|
||||
usernameToColorHexHelper(username: "asd", expectedHexColor: "#248eb5")
|
||||
usernameToColorHexHelper(username: "bar", expectedHexColor: "#0082c9")
|
||||
usernameToColorHexHelper(username: "foo", expectedHexColor: "#d09e6d")
|
||||
usernameToColorHexHelper(username: "wasd", expectedHexColor: "#b6469d")
|
||||
usernameToColorHexHelper(username: "مرحبا بالعالم", expectedHexColor: "#c98879")
|
||||
usernameToColorHexHelper(username: "🙈", expectedHexColor: "#b6469d")
|
||||
}
|
||||
|
||||
private func usernameToColorHexHelper(username: String, expectedHexColor: String) {
|
||||
let userColor = ColorGenerator.shared.usernameToColor(username)
|
||||
let userHexColor = NCUtils.hexString(fromColor: userColor)
|
||||
|
||||
XCTAssertEqual(userHexColor.lowercased(), expectedHexColor.lowercased())
|
||||
}
|
||||
}
|
|
@ -1,253 +0,0 @@
|
|||
//
|
||||
// Copyright (c) 2023 Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// Author Marcel Müller <marcel-mueller@gmx.de>
|
||||
//
|
||||
// GNU GPL version 3 or any later version
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class NextcloudTalkUITests: XCTestCase {
|
||||
|
||||
let timeoutLong: Double = 60
|
||||
let timeoutShort: Double = 15
|
||||
let server = "http://localhost:8080"
|
||||
let username = "admin"
|
||||
let password = "admin"
|
||||
|
||||
override func setUpWithError() throws {
|
||||
// In UI tests it is usually best to stop immediately when a failure occurs.
|
||||
continueAfterFailure = false
|
||||
}
|
||||
|
||||
override func tearDownWithError() throws {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
func waitForEnabled(object: Any?) {
|
||||
let enabledPredicate = NSPredicate(format: "enabled == true")
|
||||
expectation(for: enabledPredicate, evaluatedWith: object, handler: nil)
|
||||
waitForExpectations(timeout: timeoutLong, handler: nil)
|
||||
}
|
||||
|
||||
func waitForHittable(object: Any?) {
|
||||
let enabledPredicate = NSPredicate(format: "hittable == true")
|
||||
expectation(for: enabledPredicate, evaluatedWith: object, handler: nil)
|
||||
waitForExpectations(timeout: timeoutLong, handler: nil)
|
||||
}
|
||||
|
||||
// Based on https://stackoverflow.com/a/47947315
|
||||
@discardableResult
|
||||
func waitForEitherElementToExist(_ elementA: XCUIElement, _ elementB: XCUIElement, _ timeout: TimeInterval) -> XCUIElement? {
|
||||
let startTime = NSDate.timeIntervalSinceReferenceDate
|
||||
while !elementA.exists && !elementB.exists { // while neither element exists
|
||||
if NSDate.timeIntervalSinceReferenceDate - startTime > timeout {
|
||||
XCTFail("Timed out waiting for either element to exist.")
|
||||
break
|
||||
}
|
||||
sleep(1)
|
||||
}
|
||||
|
||||
if elementA.exists { return elementA }
|
||||
if elementB.exists { return elementB }
|
||||
return nil
|
||||
}
|
||||
|
||||
func launchAndLogin() -> XCUIApplication {
|
||||
let app = XCUIApplication()
|
||||
app.launchArguments += ["-AppleLanguages", "(en-US)"]
|
||||
app.launchArguments += ["-AppleLocale", "\"en-US\""]
|
||||
app.launchArguments += ["-TestEnvironment"]
|
||||
app.launch()
|
||||
|
||||
let accountSwitcherButton = app.buttons["Nextcloud Talk"]
|
||||
let serverAddressHttpsTextField = app.textFields["Server address https://…"]
|
||||
|
||||
// Wait shortly until the app is fully started
|
||||
let foundElement = waitForEitherElementToExist(accountSwitcherButton, serverAddressHttpsTextField, timeoutLong)
|
||||
XCTAssertNotNil(foundElement)
|
||||
|
||||
// When the account switcher button exists, we have atleast one account configured
|
||||
if foundElement == accountSwitcherButton {
|
||||
return app
|
||||
}
|
||||
|
||||
serverAddressHttpsTextField.tap()
|
||||
serverAddressHttpsTextField.typeText(server)
|
||||
|
||||
let loginButton = app.buttons["Log in"]
|
||||
XCTAssert(loginButton.waitForExistence(timeout: timeoutLong))
|
||||
loginButton.tap()
|
||||
|
||||
let webViewsQuery = app.webViews.webViews.webViews
|
||||
let main = webViewsQuery.otherElements["main"]
|
||||
|
||||
// Wait for the webview to be available
|
||||
XCTAssert(main.waitForExistence(timeout: timeoutLong))
|
||||
|
||||
// Wait for the login button to be available and to get enabled/hittable
|
||||
let loginButtonWeb = webViewsQuery.buttons["Log in"]
|
||||
XCTAssert(loginButtonWeb.waitForExistence(timeout: timeoutLong))
|
||||
waitForEnabled(object: loginButtonWeb)
|
||||
waitForHittable(object: loginButtonWeb)
|
||||
|
||||
loginButtonWeb.tap()
|
||||
|
||||
XCTAssert(main.waitForExistence(timeout: timeoutLong))
|
||||
|
||||
let usernameTextField = main.descendants(matching: .textField).firstMatch
|
||||
let passwordTextField = main.descendants(matching: .secureTextField).firstMatch
|
||||
|
||||
XCTAssert(usernameTextField.waitForExistence(timeout: timeoutLong))
|
||||
XCTAssert(passwordTextField.waitForExistence(timeout: timeoutLong))
|
||||
|
||||
usernameTextField.tap()
|
||||
usernameTextField.typeText(username + "\n")
|
||||
|
||||
passwordTextField.tap()
|
||||
passwordTextField.typeText(password + "\n")
|
||||
|
||||
let grantAccessButton = webViewsQuery.buttons["Grant access"]
|
||||
XCTAssert(grantAccessButton.waitForExistence(timeout: timeoutLong))
|
||||
waitForEnabled(object: grantAccessButton)
|
||||
waitForHittable(object: grantAccessButton)
|
||||
|
||||
grantAccessButton.tap()
|
||||
|
||||
// When the account switcher gets enabled, we have atleast 1 account in the app and are online
|
||||
XCTAssert(accountSwitcherButton.waitForExistence(timeout: timeoutLong))
|
||||
waitForEnabled(object: accountSwitcherButton)
|
||||
|
||||
return app
|
||||
}
|
||||
|
||||
// Tests are done in alphabetical order, so we want to always test login first
|
||||
func test_AAAA_Login() {
|
||||
let app = launchAndLogin()
|
||||
|
||||
// Check if the profile button is available
|
||||
let profileButton = app.buttons["User profile and settings"]
|
||||
XCTAssert(profileButton.waitForExistence(timeout: timeoutLong))
|
||||
|
||||
// Open profile menu
|
||||
profileButton.tap()
|
||||
|
||||
// At this point we should be logged in, so check if username and server is displayed somewhere
|
||||
XCTAssert(app.staticTexts[server].waitForExistence(timeout: timeoutShort))
|
||||
XCTAssert(app.staticTexts[username].waitForExistence(timeout: timeoutShort))
|
||||
}
|
||||
|
||||
func testCreateConversation() {
|
||||
let app = launchAndLogin()
|
||||
let newConversationName = "Test conversation"
|
||||
|
||||
app.navigationBars["Nextcloud Talk"].buttons["Create a new conversation"].tap()
|
||||
XCTAssert(app.tables.cells.staticTexts["Create a new group conversation"].waitForExistence(timeout: timeoutShort))
|
||||
XCTAssert(app.tables.cells.staticTexts["Create a new public conversation"].waitForExistence(timeout: timeoutShort))
|
||||
XCTAssert(app.tables.cells.staticTexts["Show list of open conversations"].waitForExistence(timeout: timeoutShort))
|
||||
app.tables.cells.staticTexts["Create a new group conversation"].tap()
|
||||
app.navigationBars["RoomCreationTableView"].buttons["Next"].tap()
|
||||
app.typeText(newConversationName)
|
||||
XCTAssert(app.navigationBars["New group conversation"].buttons["Create"].waitForExistence(timeout: timeoutShort))
|
||||
app.navigationBars["New group conversation"].buttons["Create"].tap()
|
||||
|
||||
let chatNavBar = app.navigationBars["NextcloudTalk.ChatView"]
|
||||
|
||||
// Wait for navigationBar
|
||||
XCTAssert(chatNavBar.waitForExistence(timeout: timeoutLong))
|
||||
|
||||
// Wait for titleView
|
||||
let chatTitleView = chatNavBar.textViews[newConversationName]
|
||||
XCTAssert(chatTitleView.waitForExistence(timeout: timeoutShort))
|
||||
|
||||
// Wait until we joined the room and the call buttons get active
|
||||
let voiceCallButton = chatNavBar.buttons["Voice call"]
|
||||
XCTAssert(voiceCallButton.waitForExistence(timeout: timeoutShort))
|
||||
waitForEnabled(object: voiceCallButton)
|
||||
waitForHittable(object: voiceCallButton)
|
||||
|
||||
// Open conversation settings
|
||||
chatTitleView.tap()
|
||||
|
||||
// Check if if the name of the conversation is shown
|
||||
XCTAssert(app.textFields[newConversationName].waitForExistence(timeout: timeoutLong))
|
||||
|
||||
// Go back to conversation list
|
||||
app.navigationBars["Conversation settings"].buttons["Back"].tap()
|
||||
chatNavBar.buttons["Back"].tap()
|
||||
|
||||
// Check if the conversation appears in the conversation list
|
||||
XCTAssert(app.tables.cells.staticTexts[newConversationName].waitForExistence(timeout: timeoutLong))
|
||||
}
|
||||
|
||||
func testChatViewControllerDeallocation() {
|
||||
let app = launchAndLogin()
|
||||
let newConversationName = "DeAllocTest"
|
||||
|
||||
// Create a new test conversion
|
||||
app.navigationBars["Nextcloud Talk"].buttons["Create a new conversation"].tap()
|
||||
XCTAssert(app.tables.cells.staticTexts["Create a new group conversation"].waitForExistence(timeout: timeoutShort))
|
||||
XCTAssert(app.tables.cells.staticTexts["Create a new public conversation"].waitForExistence(timeout: timeoutShort))
|
||||
XCTAssert(app.tables.cells.staticTexts["Show list of open conversations"].waitForExistence(timeout: timeoutShort))
|
||||
app.tables.cells.staticTexts["Create a new group conversation"].tap()
|
||||
app.navigationBars["RoomCreationTableView"].buttons["Next"].tap()
|
||||
app.typeText(newConversationName)
|
||||
XCTAssert(app.navigationBars["New group conversation"].buttons["Create"].waitForExistence(timeout: timeoutShort))
|
||||
app.navigationBars["New group conversation"].buttons["Create"].tap()
|
||||
|
||||
// Check if we have one chat view controller allocated
|
||||
XCTAssert(app.staticTexts["ChatVC: 1 / CallVC: 0"].waitForExistence(timeout: timeoutShort))
|
||||
|
||||
// Send a test message
|
||||
let testMessage = "TestMessage"
|
||||
let toolbar = app.toolbars["Toolbar"]
|
||||
let textView = toolbar.textViews["Write message, @ to mention someone …"]
|
||||
XCTAssert(textView.waitForExistence(timeout: timeoutShort))
|
||||
textView.tap()
|
||||
app.typeText(testMessage)
|
||||
let sendMessageButton = toolbar.buttons["Send message"]
|
||||
sendMessageButton.tap()
|
||||
|
||||
// Wait for temporary message to be replaced
|
||||
XCTAssert(app.images["MessageSent"].waitForExistence(timeout: timeoutShort))
|
||||
|
||||
// Open context menu
|
||||
let tables = app.tables
|
||||
XCTAssert(tables.staticTexts[username].waitForExistence(timeout: timeoutShort))
|
||||
let message = tables.staticTexts[username]
|
||||
message.press(forDuration: 2.0)
|
||||
|
||||
// Add a reaction to close the context menu
|
||||
let reactionExists = app.staticTexts["👍"].waitForExistence(timeout: timeoutShort)
|
||||
|
||||
if reactionExists {
|
||||
app.staticTexts["👍"].tap()
|
||||
} else {
|
||||
// In case we are testing against a nextcloud version that does not support reactions (<= NC 23)
|
||||
// we simply tap the "Reply" button from the context menu
|
||||
XCTAssert(app.buttons["Reply"].waitForExistence(timeout: timeoutShort))
|
||||
app.buttons["Reply"].tap()
|
||||
}
|
||||
|
||||
// Go back to the main view controller
|
||||
let chatNavBar = app.navigationBars["NextcloudTalk.ChatView"]
|
||||
chatNavBar.buttons["Back"].tap()
|
||||
|
||||
// Check if all chat view controllers are deallocated
|
||||
XCTAssert(app.staticTexts["ChatVC: 0 / CallVC: 0"].waitForExistence(timeout: timeoutShort))
|
||||
}
|
||||
}
|
38
Podfile
38
Podfile
|
@ -2,36 +2,44 @@ source 'https://cdn.cocoapods.org/'
|
|||
platform :ios, '15.0'
|
||||
|
||||
def common_dependencies
|
||||
pod 'AFNetworking', '3.2.0'
|
||||
pod 'UICKeyChainStore'
|
||||
pod 'AFNetworking', '3.2.0'
|
||||
pod 'UICKeyChainStore'
|
||||
end
|
||||
|
||||
def common_dependencies_ext
|
||||
common_dependencies
|
||||
pod 'MBProgressHUD', '~> 1.2.0'
|
||||
common_dependencies
|
||||
pod 'MBProgressHUD', '~> 1.2.0'
|
||||
end
|
||||
|
||||
def main_dependencies
|
||||
common_dependencies_ext
|
||||
pod 'DateTools'
|
||||
pod 'JDStatusBarNotification', '~> 2.0.0'
|
||||
pod 'MaterialComponents/ActivityIndicator'
|
||||
pod 'Toast', '~> 4.0.0'
|
||||
pod 'libPhoneNumber-iOS'
|
||||
pod 'MZTimerLabel'
|
||||
pod 'MobileVLCKit', '~> 3.5.0'
|
||||
end
|
||||
|
||||
target "NextcloudTalk" do
|
||||
common_dependencies_ext
|
||||
pod 'DateTools'
|
||||
pod 'JDStatusBarNotification', '~> 2.0.0'
|
||||
pod 'MaterialComponents/ActivityIndicator'
|
||||
pod 'Toast', '~> 4.0.0'
|
||||
pod 'libPhoneNumber-iOS'
|
||||
pod 'MZTimerLabel'
|
||||
pod 'MobileVLCKit', '~> 3.5.0'
|
||||
main_dependencies
|
||||
end
|
||||
|
||||
target "NextcloudTalkTests" do
|
||||
main_dependencies
|
||||
end
|
||||
|
||||
target "NotificationServiceExtension" do
|
||||
common_dependencies
|
||||
common_dependencies
|
||||
end
|
||||
|
||||
target "ShareExtension" do
|
||||
common_dependencies_ext
|
||||
common_dependencies_ext
|
||||
end
|
||||
|
||||
target "BroadcastUploadExtension" do
|
||||
common_dependencies
|
||||
common_dependencies
|
||||
end
|
||||
|
||||
pre_install do |installer|
|
||||
|
|
Загрузка…
Ссылка в новой задаче