From 3f27e5a0d276b6346ae4813dbdb2d5a9f3f39454 Mon Sep 17 00:00:00 2001 From: Mathijs Bernson Date: Wed, 17 Jan 2024 09:28:25 +0100 Subject: [PATCH] Remove unnecessary tests --- TemplateApp.xcodeproj/project.pbxproj | 4 --- TemplateAppTests/TemplateAppTests.swift | 8 +---- TemplateAppUITests/TemplateAppUITests.swift | 8 ----- .../TemplateAppUITestsLaunchTests.swift | 32 ------------------- 4 files changed, 1 insertion(+), 51 deletions(-) delete mode 100644 TemplateAppUITests/TemplateAppUITestsLaunchTests.swift diff --git a/TemplateApp.xcodeproj/project.pbxproj b/TemplateApp.xcodeproj/project.pbxproj index ac8e777..e3bed72 100644 --- a/TemplateApp.xcodeproj/project.pbxproj +++ b/TemplateApp.xcodeproj/project.pbxproj @@ -13,7 +13,6 @@ D5284F372B57C6B700BB32E7 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D5284F362B57C6B700BB32E7 /* Preview Assets.xcassets */; }; D5284F412B57C6B700BB32E7 /* TemplateAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5284F402B57C6B700BB32E7 /* TemplateAppTests.swift */; }; D5284F4B2B57C6B700BB32E7 /* TemplateAppUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5284F4A2B57C6B700BB32E7 /* TemplateAppUITests.swift */; }; - D5284F4D2B57C6B700BB32E7 /* TemplateAppUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5284F4C2B57C6B700BB32E7 /* TemplateAppUITestsLaunchTests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -43,7 +42,6 @@ D5284F402B57C6B700BB32E7 /* TemplateAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateAppTests.swift; sourceTree = ""; }; D5284F462B57C6B700BB32E7 /* TemplateAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TemplateAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; D5284F4A2B57C6B700BB32E7 /* TemplateAppUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateAppUITests.swift; sourceTree = ""; }; - D5284F4C2B57C6B700BB32E7 /* TemplateAppUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateAppUITestsLaunchTests.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -124,7 +122,6 @@ isa = PBXGroup; children = ( D5284F4A2B57C6B700BB32E7 /* TemplateAppUITests.swift */, - D5284F4C2B57C6B700BB32E7 /* TemplateAppUITestsLaunchTests.swift */, ); path = TemplateAppUITests; sourceTree = ""; @@ -277,7 +274,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - D5284F4D2B57C6B700BB32E7 /* TemplateAppUITestsLaunchTests.swift in Sources */, D5284F4B2B57C6B700BB32E7 /* TemplateAppUITests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/TemplateAppTests/TemplateAppTests.swift b/TemplateAppTests/TemplateAppTests.swift index ae055f1..2d734be 100644 --- a/TemplateAppTests/TemplateAppTests.swift +++ b/TemplateAppTests/TemplateAppTests.swift @@ -24,13 +24,7 @@ final class TemplateAppTests: XCTestCase { // Any test you write for XCTest can be annotated as throws and async. // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. - } - - func testPerformanceExample() throws { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } + XCTAssertEqual(21 * 2, 42) } } diff --git a/TemplateAppUITests/TemplateAppUITests.swift b/TemplateAppUITests/TemplateAppUITests.swift index 6a38162..412d550 100644 --- a/TemplateAppUITests/TemplateAppUITests.swift +++ b/TemplateAppUITests/TemplateAppUITests.swift @@ -30,12 +30,4 @@ final class TemplateAppUITests: XCTestCase { // 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/TemplateAppUITests/TemplateAppUITestsLaunchTests.swift b/TemplateAppUITests/TemplateAppUITestsLaunchTests.swift deleted file mode 100644 index 84fcb1e..0000000 --- a/TemplateAppUITests/TemplateAppUITestsLaunchTests.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// TemplateAppUITestsLaunchTests.swift -// TemplateAppUITests -// -// Created by Mathijs Bernson on 17/01/2024. -// - -import XCTest - -final class TemplateAppUITestsLaunchTests: 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) - } -}