From f0d60bd610ff6e8521186140d77dc2cdf085cbaf Mon Sep 17 00:00:00 2001 From: maksalena Date: Fri, 4 Apr 2025 03:01:15 +0300 Subject: [PATCH] Add UI test --- Friends.xcodeproj/project.pbxproj | 130 ++++++++++++++++++ .../xcshareddata/xcschemes/Friends.xcscheme | 13 ++ .../Controller/FinanceViewController.swift | 4 + FriendsUITests/FriendsUITests.swift | 41 ++++++ .../FriendsUITestsLaunchTests.swift | 33 +++++ 5 files changed, 221 insertions(+) create mode 100644 FriendsUITests/FriendsUITests.swift create mode 100644 FriendsUITests/FriendsUITestsLaunchTests.swift diff --git a/Friends.xcodeproj/project.pbxproj b/Friends.xcodeproj/project.pbxproj index c15acb2..42eef31 100644 --- a/Friends.xcodeproj/project.pbxproj +++ b/Friends.xcodeproj/project.pbxproj @@ -14,12 +14,24 @@ B46C74D02D9E84FE0021BF26 /* FirebaseStorage in Frameworks */ = {isa = PBXBuildFile; productRef = B46C74CF2D9E84FE0021BF26 /* FirebaseStorage */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + CAC0DDD32D9F53060017B5FC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 39E396A22D932EA300C43CC4 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 39E396A92D932EA300C43CC4; + remoteInfo = Friends; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ 394D942D2D9EB71C00187B5D /* Friends.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Friends.xcodeproj; sourceTree = ""; }; 394D95562D9EB92D00187B5D /* Friends.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Friends.xcodeproj; sourceTree = ""; }; 39BBDF862D9DA89200DDCDDA /* Friends.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Friends.xcodeproj; sourceTree = ""; }; 39E396AA2D932EA300C43CC4 /* Friends.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Friends.app; sourceTree = BUILT_PRODUCTS_DIR; }; 39EE0B9E2D99B301005E6AF4 /* Friends.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Friends.xcodeproj; sourceTree = ""; }; + CAC0DD7F2D9F52F10017B5FC /* Friends.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Friends.xcodeproj; sourceTree = ""; }; + CAC0DDCD2D9F53060017B5FC /* FriendsUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FriendsUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ @@ -41,6 +53,11 @@ path = Friends; sourceTree = ""; }; + CAC0DDCE2D9F53060017B5FC /* FriendsUITests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = FriendsUITests; + sourceTree = ""; + }; /* End PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFrameworksBuildPhase section */ @@ -56,6 +73,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + CAC0DDCA2D9F53060017B5FC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -82,6 +106,7 @@ isa = PBXGroup; children = ( 39E396AC2D932EA300C43CC4 /* Friends */, + CAC0DDCE2D9F53060017B5FC /* FriendsUITests */, 39E396AB2D932EA300C43CC4 /* Products */, ); sourceTree = ""; @@ -90,6 +115,7 @@ isa = PBXGroup; children = ( 39E396AA2D932EA300C43CC4 /* Friends.app */, + CAC0DDCD2D9F53060017B5FC /* FriendsUITests.xctest */, ); name = Products; sourceTree = ""; @@ -101,6 +127,13 @@ name = Products; sourceTree = ""; }; + CAC0DD802D9F52F10017B5FC /* Products */ = { + isa = PBXGroup; + children = ( + ); + name = Products; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -132,6 +165,29 @@ productReference = 39E396AA2D932EA300C43CC4 /* Friends.app */; productType = "com.apple.product-type.application"; }; + CAC0DDCC2D9F53060017B5FC /* FriendsUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = CAC0DDDA2D9F53060017B5FC /* Build configuration list for PBXNativeTarget "FriendsUITests" */; + buildPhases = ( + CAC0DDC92D9F53060017B5FC /* Sources */, + CAC0DDCA2D9F53060017B5FC /* Frameworks */, + CAC0DDCB2D9F53060017B5FC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + CAC0DDD42D9F53060017B5FC /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + CAC0DDCE2D9F53060017B5FC /* FriendsUITests */, + ); + name = FriendsUITests; + packageProductDependencies = ( + ); + productName = FriendsUITests; + productReference = CAC0DDCD2D9F53060017B5FC /* FriendsUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -145,6 +201,10 @@ 39E396A92D932EA300C43CC4 = { CreatedOnToolsVersion = 16.2; }; + CAC0DDCC2D9F53060017B5FC = { + CreatedOnToolsVersion = 16.2; + TestTargetID = 39E396A92D932EA300C43CC4; + }; }; }; buildConfigurationList = 39E396A52D932EA300C43CC4 /* Build configuration list for PBXProject "Friends" */; @@ -180,10 +240,15 @@ ProductGroup = 39EE0B9F2D99B301005E6AF4 /* Products */; ProjectRef = 39EE0B9E2D99B301005E6AF4 /* Friends.xcodeproj */; }, + { + ProductGroup = CAC0DD802D9F52F10017B5FC /* Products */; + ProjectRef = CAC0DD7F2D9F52F10017B5FC /* Friends.xcodeproj */; + }, ); projectRoot = ""; targets = ( 39E396A92D932EA300C43CC4 /* Friends */, + CAC0DDCC2D9F53060017B5FC /* FriendsUITests */, ); }; /* End PBXProject section */ @@ -196,6 +261,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + CAC0DDCB2D9F53060017B5FC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -228,8 +300,23 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + CAC0DDC92D9F53060017B5FC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + CAC0DDD42D9F53060017B5FC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 39E396A92D932EA300C43CC4 /* Friends */; + targetProxy = CAC0DDD32D9F53060017B5FC /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ 39E396BE2D932EA500C43CC4 /* Debug */ = { isa = XCBuildConfiguration; @@ -412,6 +499,40 @@ }; name = Release; }; + CAC0DDD52D9F53060017B5FC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 8U7D8W8J2D; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.maksimova.FriendsUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Friends; + }; + name = Debug; + }; + CAC0DDD62D9F53060017B5FC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 8U7D8W8J2D; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.maksimova.FriendsUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Friends; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -433,6 +554,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + CAC0DDDA2D9F53060017B5FC /* Build configuration list for PBXNativeTarget "FriendsUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CAC0DDD52D9F53060017B5FC /* Debug */, + CAC0DDD62D9F53060017B5FC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ diff --git a/Friends.xcodeproj/xcshareddata/xcschemes/Friends.xcscheme b/Friends.xcodeproj/xcshareddata/xcschemes/Friends.xcscheme index e562e7b..c1d531b 100644 --- a/Friends.xcodeproj/xcshareddata/xcschemes/Friends.xcscheme +++ b/Friends.xcodeproj/xcshareddata/xcschemes/Friends.xcscheme @@ -29,6 +29,19 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES" shouldAutocreateTestPlan = "YES"> + + + + + +