From e2c37ac1dd2ad562e3d619d39b72a174a2212b67 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Mon, 16 Sep 2024 11:10:32 +0200 Subject: Map 3 first commit: files, groups and layout --- MapUITests/Info.plist | 22 ---------------------- MapUITests/MapUITests.swift | 14 ++++---------- MapUITests/MapUITestsLaunchTests.swift | 26 ++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 32 deletions(-) delete mode 100644 MapUITests/Info.plist create mode 100644 MapUITests/MapUITestsLaunchTests.swift (limited to 'MapUITests') diff --git a/MapUITests/Info.plist b/MapUITests/Info.plist deleted file mode 100644 index 64d65ca..0000000 --- a/MapUITests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/MapUITests/MapUITests.swift b/MapUITests/MapUITests.swift index d2d523d..2f6c35d 100644 --- a/MapUITests/MapUITests.swift +++ b/MapUITests/MapUITests.swift @@ -1,13 +1,6 @@ -// -// MapUITests.swift -// MapUITests -// -// Created by Ruben Beltran del Rio on 2/1/21. -// - import XCTest -class MapUITests: XCTestCase { +final class MapUITests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. @@ -22,17 +15,18 @@ class MapUITests: XCTestCase { // Put teardown code here. This method is called after the invocation of each test method in the class. } + @MainActor func testExample() throws { // UI tests must launch the application that they test. let app = XCUIApplication() app.launch() - // Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } + @MainActor func testLaunchPerformance() throws { - if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { + 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/MapUITests/MapUITestsLaunchTests.swift b/MapUITests/MapUITestsLaunchTests.swift new file mode 100644 index 0000000..cdcd1b9 --- /dev/null +++ b/MapUITests/MapUITestsLaunchTests.swift @@ -0,0 +1,26 @@ +import XCTest + +final class MapUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + @MainActor + 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) + } +} -- cgit