diff --git a/CryptoWidgetKitApp.xcodeproj/project.pbxproj b/CryptoWidgetKitApp.xcodeproj/project.pbxproj index 2204176..22d02b4 100644 --- a/CryptoWidgetKitApp.xcodeproj/project.pbxproj +++ b/CryptoWidgetKitApp.xcodeproj/project.pbxproj @@ -12,6 +12,8 @@ 4D72664E2C049D810035E348 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4D72664D2C049D810035E348 /* Assets.xcassets */; }; 4D7266512C049D810035E348 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4D7266502C049D810035E348 /* Preview Assets.xcassets */; }; 4D72665B2C049D820035E348 /* CryptoWidgetKitAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D72665A2C049D820035E348 /* CryptoWidgetKitAppTests.swift */; }; + 4D7266652C049D820035E348 /* CryptoWidgetKitAppUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D7266642C049D820035E348 /* CryptoWidgetKitAppUITests.swift */; }; + 4D7266672C049D820035E348 /* CryptoWidgetKitAppUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D7266662C049D820035E348 /* CryptoWidgetKitAppUITestsLaunchTests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -22,6 +24,13 @@ remoteGlobalIDString = 4D7266452C049D800035E348; remoteInfo = CryptoWidgetKitApp; }; + 4D7266612C049D820035E348 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4D72663E2C049D800035E348 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 4D7266452C049D800035E348; + remoteInfo = CryptoWidgetKitApp; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -32,6 +41,9 @@ 4D7266502C049D810035E348 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 4D7266562C049D820035E348 /* CryptoWidgetKitAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CryptoWidgetKitAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 4D72665A2C049D820035E348 /* CryptoWidgetKitAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CryptoWidgetKitAppTests.swift; sourceTree = ""; }; + 4D7266602C049D820035E348 /* CryptoWidgetKitAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CryptoWidgetKitAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 4D7266642C049D820035E348 /* CryptoWidgetKitAppUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CryptoWidgetKitAppUITests.swift; sourceTree = ""; }; + 4D7266662C049D820035E348 /* CryptoWidgetKitAppUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CryptoWidgetKitAppUITestsLaunchTests.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -49,6 +61,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 4D72665D2C049D820035E348 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -57,6 +76,7 @@ children = ( 4D7266482C049D800035E348 /* CryptoWidgetKitApp */, 4D7266592C049D820035E348 /* CryptoWidgetKitAppTests */, + 4D7266632C049D820035E348 /* CryptoWidgetKitAppUITests */, 4D7266472C049D800035E348 /* Products */, ); sourceTree = ""; @@ -66,6 +86,7 @@ children = ( 4D7266462C049D800035E348 /* CryptoWidgetKitApp.app */, 4D7266562C049D820035E348 /* CryptoWidgetKitAppTests.xctest */, + 4D7266602C049D820035E348 /* CryptoWidgetKitAppUITests.xctest */, ); name = Products; sourceTree = ""; @@ -97,6 +118,15 @@ path = CryptoWidgetKitAppTests; sourceTree = ""; }; + 4D7266632C049D820035E348 /* CryptoWidgetKitAppUITests */ = { + isa = PBXGroup; + children = ( + 4D7266642C049D820035E348 /* CryptoWidgetKitAppUITests.swift */, + 4D7266662C049D820035E348 /* CryptoWidgetKitAppUITestsLaunchTests.swift */, + ); + path = CryptoWidgetKitAppUITests; + sourceTree = ""; + }; 4D7266732C049D930035E348 /* Resources */ = { isa = PBXGroup; children = ( @@ -143,6 +173,24 @@ productReference = 4D7266562C049D820035E348 /* CryptoWidgetKitAppTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + 4D72665F2C049D820035E348 /* CryptoWidgetKitAppUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4D7266702C049D820035E348 /* Build configuration list for PBXNativeTarget "CryptoWidgetKitAppUITests" */; + buildPhases = ( + 4D72665C2C049D820035E348 /* Sources */, + 4D72665D2C049D820035E348 /* Frameworks */, + 4D72665E2C049D820035E348 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 4D7266622C049D820035E348 /* PBXTargetDependency */, + ); + name = CryptoWidgetKitAppUITests; + productName = CryptoWidgetKitAppUITests; + productReference = 4D7266602C049D820035E348 /* CryptoWidgetKitAppUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -160,6 +208,10 @@ CreatedOnToolsVersion = 15.4; TestTargetID = 4D7266452C049D800035E348; }; + 4D72665F2C049D820035E348 = { + CreatedOnToolsVersion = 15.4; + TestTargetID = 4D7266452C049D800035E348; + }; }; }; buildConfigurationList = 4D7266412C049D800035E348 /* Build configuration list for PBXProject "CryptoWidgetKitApp" */; @@ -177,6 +229,7 @@ targets = ( 4D7266452C049D800035E348 /* CryptoWidgetKitApp */, 4D7266552C049D820035E348 /* CryptoWidgetKitAppTests */, + 4D72665F2C049D820035E348 /* CryptoWidgetKitAppUITests */, ); }; /* End PBXProject section */ @@ -198,6 +251,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 4D72665E2C049D820035E348 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -218,6 +278,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 4D72665C2C049D820035E348 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4D7266672C049D820035E348 /* CryptoWidgetKitAppUITestsLaunchTests.swift in Sources */, + 4D7266652C049D820035E348 /* CryptoWidgetKitAppUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -226,6 +295,11 @@ target = 4D7266452C049D800035E348 /* CryptoWidgetKitApp */; targetProxy = 4D7266572C049D820035E348 /* PBXContainerItemProxy */; }; + 4D7266622C049D820035E348 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 4D7266452C049D800035E348 /* CryptoWidgetKitApp */; + targetProxy = 4D7266612C049D820035E348 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -462,6 +536,50 @@ }; name = Release; }; + 4D7266712C049D820035E348 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = josetorronteras.CryptoWidgetKitAppUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = CryptoWidgetKitApp; + }; + name = Debug; + }; + 4D7266722C049D820035E348 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = josetorronteras.CryptoWidgetKitAppUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = CryptoWidgetKitApp; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -492,6 +610,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 4D7266702C049D820035E348 /* Build configuration list for PBXNativeTarget "CryptoWidgetKitAppUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4D7266712C049D820035E348 /* Debug */, + 4D7266722C049D820035E348 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 4D72663E2C049D800035E348 /* Project object */; diff --git a/CryptoWidgetKitAppUITests/CryptoWidgetKitAppUITests.swift b/CryptoWidgetKitAppUITests/CryptoWidgetKitAppUITests.swift new file mode 100644 index 0000000..b64962a --- /dev/null +++ b/CryptoWidgetKitAppUITests/CryptoWidgetKitAppUITests.swift @@ -0,0 +1,41 @@ +// +// CryptoWidgetKitAppUITests.swift +// CryptoWidgetKitAppUITests +// +// Created by Jose Jesus Torronteras Hernandez on 27/1/24. +// + +import XCTest + +final class CryptoWidgetKitAppUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testLaunchPerformance() throws { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/CryptoWidgetKitAppUITests/CryptoWidgetKitAppUITestsLaunchTests.swift b/CryptoWidgetKitAppUITests/CryptoWidgetKitAppUITestsLaunchTests.swift new file mode 100644 index 0000000..3b68d72 --- /dev/null +++ b/CryptoWidgetKitAppUITests/CryptoWidgetKitAppUITestsLaunchTests.swift @@ -0,0 +1,32 @@ +// +// CryptoWidgetKitAppUITestsLaunchTests.swift +// CryptoWidgetKitAppUITests +// +// Created by Jose Jesus Torronteras Hernandez on 27/1/24. +// + +import XCTest + +final class CryptoWidgetKitAppUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +}