diff --git a/Sources/SpeziDevices/HealthMeasurements.swift b/Sources/SpeziDevices/HealthMeasurements.swift index 1adffc9..21e666f 100644 --- a/Sources/SpeziDevices/HealthMeasurements.swift +++ b/Sources/SpeziDevices/HealthMeasurements.swift @@ -121,6 +121,7 @@ public class HealthMeasurements { @MainActor public func clearStorage() { storedMeasurements.removeAll() + pendingMeasurements.removeAll() } /// Configure the Module. diff --git a/Sources/SpeziDevicesUI/Measurements/MeasurementRecordedSheet.swift b/Sources/SpeziDevicesUI/Measurements/MeasurementRecordedSheet.swift index 11523f0..82a673d 100644 --- a/Sources/SpeziDevicesUI/Measurements/MeasurementRecordedSheet.swift +++ b/Sources/SpeziDevicesUI/Measurements/MeasurementRecordedSheet.swift @@ -88,6 +88,7 @@ public struct MeasurementRecordedSheet: View { } } .presentationDetents([dynamicDetent]) + .presentationCornerRadius(25) } diff --git a/Tests/UITests/TestAppUITests/HealthMeasurementsTests.swift b/Tests/UITests/TestAppUITests/HealthMeasurementsTests.swift new file mode 100644 index 0000000..d78ca80 --- /dev/null +++ b/Tests/UITests/TestAppUITests/HealthMeasurementsTests.swift @@ -0,0 +1,145 @@ +// +// This source file is part of the Stanford Spezi open-source project +// +// SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md) +// +// SPDX-License-Identifier: MIT +// + +import XCTest + + +class HealthMeasurementsTests: XCTestCase { + override func setUpWithError() throws { + try super.setUpWithError() + + continueAfterFailure = false + } + + + @MainActor + func testNoMeasurements() { + let app = XCUIApplication() + app.launch() + + XCTAssert(app.buttons["Measurements"].waitForExistence(timeout: 2.0)) + app.buttons["Measurements"].tap() + + XCTAssert(app.staticTexts["No Samples"].waitForExistence(timeout: 0.5)) + app.staticTexts["No Samples"].tap() + + XCTAssert(app.navigationBars.buttons["Add Measurement"].exists) + app.navigationBars.buttons["Add Measurement"].tap() + + XCTAssert(app.staticTexts["No Pending Measurements"].waitForExistence(timeout: 2.0)) + XCTAssert(app.navigationBars.buttons["Dismiss"].exists) + app.navigationBars.buttons["Dismiss"].tap() + } + + @MainActor + func testWeightMeasurement() { + let app = XCUIApplication() + app.launch() + + XCTAssert(app.buttons["Measurements"].waitForExistence(timeout: 2.0)) + app.buttons["Measurements"].tap() + + XCTAssert(app.navigationBars.buttons["More"].exists) + app.navigationBars.buttons["More"].tap() + XCTAssert(app.buttons["Simulate Weight"].waitForExistence(timeout: 0.5)) + app.buttons["Simulate Weight"].tap() + + XCTAssert(app.staticTexts["Measurement Recorded"].waitForExistence(timeout: 2.0)) + XCTAssert(app.staticTexts["42 kg"].exists) + XCTAssert(app.staticTexts["179 cm, 23 BMI"].exists) + XCTAssert(app.buttons["Save"].exists) + XCTAssert(app.buttons["Discard"].exists) + + app.buttons["Save"].tap() + + XCTAssert(app.staticTexts["42 kg"].waitForExistence(timeout: 0.5)) + XCTAssert(app.staticTexts["23 count"].exists) + XCTAssert(app.staticTexts["1.79 m"].exists) + XCTAssert(app.staticTexts["Mock Device"].exists) + } + + @MainActor + func testBloodPressureMeasurement() { + let app = XCUIApplication() + app.launch() + + XCTAssert(app.buttons["Measurements"].waitForExistence(timeout: 2.0)) + app.buttons["Measurements"].tap() + + XCTAssert(app.navigationBars.buttons["More"].exists) + app.navigationBars.buttons["More"].tap() + XCTAssert(app.buttons["Simulate Blood Pressure"].waitForExistence(timeout: 0.5)) + app.buttons["Simulate Blood Pressure"].tap() + + XCTAssert(app.staticTexts["Measurement Recorded"].waitForExistence(timeout: 2.0)) + XCTAssert(app.staticTexts["103/64 mmHg"].exists) + XCTAssert(app.staticTexts["62 BPM"].exists) + XCTAssert(app.buttons["Save"].exists) + XCTAssert(app.buttons["Discard"].exists) + + app.buttons["Save"].tap() + + XCTAssert(app.staticTexts["103 mmHg"].waitForExistence(timeout: 0.5)) + XCTAssert(app.staticTexts["64 mmHg"].exists) + XCTAssert(app.staticTexts["62 count/min"].exists) + XCTAssert(app.staticTexts["Mock Device"].exists) + } + + @MainActor + func testMultiMeasurementsAndDiscarding() throws { + let app = XCUIApplication() + app.launch() + + XCTAssert(app.buttons["Measurements"].waitForExistence(timeout: 2.0)) + app.buttons["Measurements"].tap() + + XCTAssert(app.navigationBars.buttons["More"].exists) + app.navigationBars.buttons["More"].tap() + XCTAssert(app.buttons["Simulate Weight"].waitForExistence(timeout: 0.5)) + app.buttons["Simulate Weight"].tap() + + XCTAssert(app.navigationBars.buttons["Dismiss"].waitForExistence(timeout: 0.5)) + app.navigationBars.buttons["Dismiss"].tap() + + XCTAssert(app.navigationBars.buttons["More"].exists) + app.navigationBars.buttons["More"].tap() + XCTAssert(app.buttons["Simulate Blood Pressure"].waitForExistence(timeout: 0.5)) + app.buttons["Simulate Blood Pressure"].tap() + + XCTAssert(app.staticTexts["Measurement Recorded"].waitForExistence(timeout: 2.0)) + XCTAssert(app.staticTexts["103/64 mmHg"].exists) + XCTAssert(app.staticTexts["62 BPM"].exists) + XCTAssert(app.buttons["Save"].exists) + XCTAssert(app.buttons["Discard"].exists) + + XCTAssert(app.steppers["Page"].exists) + let page1Value = try XCTUnwrap(app.steppers["Page"].value as? String, "Unexpected value \(String(describing: app.steppers["Page"].value))") + XCTAssertEqual(page1Value, "Page 1 of 2") + app.steppers["Page"].coordinate(withNormalizedOffset: .init(dx: 0.8, dy: 0.5)).tap() + let page2Value = try XCTUnwrap(app.steppers["Page"].value as? String, "Unexpected value \(String(describing: app.steppers["Page"].value))") + XCTAssertEqual(page2Value, "Page 2 of 2") + + XCTAssert(app.staticTexts["Measurement Recorded"].waitForExistence(timeout: 2.0)) + XCTAssert(app.staticTexts["42 kg"].exists) + XCTAssert(app.staticTexts["179 cm, 23 BMI"].exists) + XCTAssert(app.buttons["Save"].exists) + XCTAssert(app.buttons["Discard"].exists) + + XCTAssert(app.navigationBars.buttons["Dismiss"].exists) + app.navigationBars.buttons["Dismiss"].tap() + + XCTAssert(app.navigationBars.buttons["Add Measurement"].waitForExistence(timeout: 0.5)) + app.navigationBars.buttons["Add Measurement"].tap() + + XCTAssert(app.buttons["Discard"].waitForExistence(timeout: 0.5)) + app.buttons["Discard"].tap() + + XCTAssert(app.staticTexts["42 kg"].waitForExistence(timeout: 2.0)) + XCTAssert(app.staticTexts["179 cm, 23 BMI"].exists) + } +} diff --git a/Tests/UITests/TestAppUITests/PairedDevicesTests.swift b/Tests/UITests/TestAppUITests/PairedDevicesTests.swift new file mode 100644 index 0000000..b5dfe58 --- /dev/null +++ b/Tests/UITests/TestAppUITests/PairedDevicesTests.swift @@ -0,0 +1,166 @@ +// +// This source file is part of the Stanford Spezi open-source project +// +// SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md) +// +// SPDX-License-Identifier: MIT +// + +import XCTest +import XCTestExtensions + + +class PairedDevicesTests: XCTestCase { + override func setUpWithError() throws { + try super.setUpWithError() + + continueAfterFailure = false + } + + + @MainActor + func testTipsView() throws { + let app = XCUIApplication() + app.launchArguments = ["--testTips"] + app.launch() + + XCTAssert(app.buttons["Devices"].waitForExistence(timeout: 2.0)) + app.buttons["Devices"].tap() + + + XCTAssert(app.staticTexts["Fully Unpair Device"].waitForExistence(timeout: 0.5)) + XCTAssert(app.buttons["Open Settings"].exists) + app.buttons["Open Settings"].tap() + + let settingsApp = XCUIApplication(bundleIdentifier: "com.apple.Preferences") + XCTAssertEqual(settingsApp.state, .runningForeground) + } + + @MainActor + func testDiscoveringView() throws { + let app = XCUIApplication() + app.launch() + + XCTAssert(app.buttons["Devices"].waitForExistence(timeout: 2.0)) + app.buttons["Devices"].tap() + + + XCTAssert(app.staticTexts["No Devices"].exists) + XCTAssert(app.buttons["Pair New Device"].exists) + app.buttons["Pair New Device"].tap() + + XCTAssert(app.staticTexts["Discovering"].waitForExistence(timeout: 0.5)) + XCTAssert(app.navigationBars.buttons["Dismiss"].exists) + app.navigationBars.buttons["Dismiss"].tap() + + XCTAssert(app.staticTexts["No Devices"].waitForExistence(timeout: 0.5)) + // TODO: customize the pairing hint! + } + + @MainActor + func testPairDevice() throws { + let app = XCUIApplication() + app.launch() + + XCTAssert(app.buttons["Devices"].waitForExistence(timeout: 2.0)) + app.buttons["Devices"].tap() + + XCTAssert(app.navigationBars.buttons["More"].exists) + app.navigationBars.buttons["More"].tap() + + XCTAssert(app.buttons["Discover Device"].waitForExistence(timeout: 0.5)) + app.buttons["Discover Device"].tap() + + XCTAssert(app.staticTexts["Pair Accessory"].waitForExistence(timeout: 2.0)) + XCTAssert(app.staticTexts["Do you want to pair \"Mock Device\" with the TestApp app?"].exists) + XCTAssert(app.buttons["Pair"].exists) + app.buttons["Pair"].tap() + + XCTAssert(app.staticTexts["Accessory Paired"].waitForExistence(timeout: 5.0)) + XCTAssert(app.staticTexts["\"Mock Device\" was successfully paired with the TestApp app."].exists) + XCTAssert(app.buttons["Done"].exists) + app.buttons["Done"].tap() + + XCTAssert(app.buttons["Mock Device, 85 %"].waitForExistence(timeout: 0.5)) + app.buttons["Mock Device, 85 %"].tap() + + XCTAssert(app.navigationBars.staticTexts["Device Details"].waitForExistence(timeout: 2.0)) + XCTAssert(app.buttons["Name, Mock Device"].exists) + XCTAssert(app.staticTexts["Model, MD1"].exists) + XCTAssert(app.staticTexts["Battery, 85 %"].exists) + XCTAssert(app.buttons["Forget This Device"].exists) + XCTAssert(app.staticTexts["Synchronizing ..."].exists) // assert device currently connected + + app.buttons["Name, Mock Device"].tap() + + XCTAssert(app.textFields["enter device name"].exists) + app.textFields["enter device name"].tap() + app.typeText("2") + + app.dismissKeyboard() + + XCTAssert(app.navigationBars.buttons["Done"].waitForExistence(timeout: 0.5)) + app.navigationBars.buttons["Done"].tap() + + XCTAssert(app.staticTexts["Name, Mock Device2"].waitForExistence(timeout: 0.5)) + XCTAssert(app.navigationBars.buttons["Devices"].exists) + app.navigationBars.buttons["Devices"].tap() + + XCTAssert(app.buttons["Mock Device2, 85 %"].waitForExistence(timeout: 2.0)) + + XCTAssert(app.navigationBars.buttons["More"].exists) + app.navigationBars.buttons["More"].tap() + XCTAssert(app.buttons["Disconnect"].waitForExistence(timeout: 0.5)) + app.buttons["Disconnect"].tap() + sleep(1) + + app.buttons["Mock Device2, 85 %"].tap() + XCTAssert(app.navigationBars.buttons["Devices"].waitForExistence(timeout: 2.0)) + app.navigationBars.buttons["Devices"].tap() + + XCTAssert(app.navigationBars.buttons["More"].exists) + app.navigationBars.buttons["More"].tap() + XCTAssert(app.buttons["Connect"].waitForExistence(timeout: 0.5)) + app.buttons["Connect"].tap() + sleep(3) + + + XCTAssert(app.buttons["Mock Device2, 85 %"].waitForExistence(timeout: 0.5)) + app.buttons["Mock Device2, 85 %"].tap() + + XCTAssert(app.buttons["Forget This Device"].waitForExistence(timeout: 2.0)) + app.buttons["Forget This Device"].tap() + + XCTAssert(app.buttons["Forget Device"].waitForExistence(timeout: 2.0)) + app.buttons["Forget Device"].tap() + + + XCTAssert(app.staticTexts["Fully Unpair Device"].waitForExistence(timeout: 2.0)) + } + + @MainActor + func testPlusButton() { + let app = XCUIApplication() + app.launch() + + XCTAssert(app.buttons["Devices"].waitForExistence(timeout: 2.0)) + app.buttons["Devices"].tap() + + XCTAssert(app.navigationBars.buttons["More"].exists) + app.navigationBars.buttons["More"].tap() + + XCTAssert(app.buttons["Discover Device"].waitForExistence(timeout: 0.5)) + app.buttons["Discover Device"].tap() + + XCTAssert(app.staticTexts["Pair Accessory"].waitForExistence(timeout: 2.0)) + XCTAssert(app.buttons["Dismiss"].exists) + app.buttons["Dismiss"].tap() + + XCTAssert(app.navigationBars.buttons["Add Device"].exists) + app.navigationBars.buttons["Add Device"].tap() + + XCTAssert(app.staticTexts["Pair Accessory"].waitForExistence(timeout: 2.0)) + } + + // TODO: forget devices test +} diff --git a/Tests/UITests/TestAppUITests/TestAppUITests.swift b/Tests/UITests/TestAppUITests/TestAppUITests.swift deleted file mode 100644 index 6bf88e2..0000000 --- a/Tests/UITests/TestAppUITests/TestAppUITests.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// This source file is part of the Stanford Spezi open-source project -// -// SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md) -// -// SPDX-License-Identifier: MIT -// - -import XCTest - - -class TestAppUITests: XCTestCase { - override func setUpWithError() throws { - try super.setUpWithError() - - continueAfterFailure = false - } - - - func testTemplatePackage() throws { - let app = XCUIApplication() - app.launch() - XCTAssert(true) - } -} diff --git a/Tests/UITests/UITests.xcodeproj/project.pbxproj b/Tests/UITests/UITests.xcodeproj/project.pbxproj index 1b99d23..d5f62c3 100644 --- a/Tests/UITests/UITests.xcodeproj/project.pbxproj +++ b/Tests/UITests/UITests.xcodeproj/project.pbxproj @@ -9,7 +9,7 @@ /* Begin PBXBuildFile section */ 2F68C3C8292EA52000B3E12C /* SpeziDevices in Frameworks */ = {isa = PBXBuildFile; productRef = 2F68C3C7292EA52000B3E12C /* SpeziDevices */; }; 2F6D139A28F5F386007C25D6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2F6D139928F5F386007C25D6 /* Assets.xcassets */; }; - 2F8A431329130A8C005D2B8F /* TestAppUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F8A431229130A8C005D2B8F /* TestAppUITests.swift */; }; + 2F8A431329130A8C005D2B8F /* HealthMeasurementsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F8A431229130A8C005D2B8F /* HealthMeasurementsTests.swift */; }; 2FA7382C290ADFAA007ACEB9 /* TestApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FA7382B290ADFAA007ACEB9 /* TestApp.swift */; }; A922BB1A2C2CB072009DD0E1 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A922BB192C2CB072009DD0E1 /* ContentView.swift */; }; A922BB1C2C2CB0AB009DD0E1 /* SpeziDevicesUI in Frameworks */ = {isa = PBXBuildFile; productRef = A922BB1B2C2CB0AB009DD0E1 /* SpeziDevicesUI */; }; @@ -18,6 +18,8 @@ A959B7E62C2CBF0900ACA775 /* HKSampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A959B7E52C2CBF0900ACA775 /* HKSampleView.swift */; }; A959B7E82C2CBF1400ACA775 /* HKQuantitySampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A959B7E72C2CBF1400ACA775 /* HKQuantitySampleView.swift */; }; A959B7EB2C2CC05A00ACA775 /* HKCorrelationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A959B7EA2C2CC05A00ACA775 /* HKCorrelationView.swift */; }; + A959B7F02C2D602C00ACA775 /* PairedDevicesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A959B7EF2C2D602C00ACA775 /* PairedDevicesTests.swift */; }; + A959B7F32C2D646500ACA775 /* XCTestExtensions in Frameworks */ = {isa = PBXBuildFile; productRef = A959B7F22C2D646500ACA775 /* XCTestExtensions */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -48,7 +50,7 @@ 2F6D139228F5F384007C25D6 /* TestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 2F6D139928F5F386007C25D6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 2F6D13AC28F5F386007C25D6 /* TestAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 2F8A431229130A8C005D2B8F /* TestAppUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestAppUITests.swift; sourceTree = ""; }; + 2F8A431229130A8C005D2B8F /* HealthMeasurementsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HealthMeasurementsTests.swift; sourceTree = ""; }; 2FA7382B290ADFAA007ACEB9 /* TestApp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestApp.swift; sourceTree = ""; }; 2FB0758A299DDB9000C0B37F /* TestApp.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = TestApp.xctestplan; sourceTree = ""; }; A922BB192C2CB072009DD0E1 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; @@ -57,6 +59,7 @@ A959B7E52C2CBF0900ACA775 /* HKSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HKSampleView.swift; sourceTree = ""; }; A959B7E72C2CBF1400ACA775 /* HKQuantitySampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HKQuantitySampleView.swift; sourceTree = ""; }; A959B7EA2C2CC05A00ACA775 /* HKCorrelationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HKCorrelationView.swift; sourceTree = ""; }; + A959B7EF2C2D602C00ACA775 /* PairedDevicesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PairedDevicesTests.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -73,6 +76,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + A959B7F32C2D646500ACA775 /* XCTestExtensions in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -116,7 +120,8 @@ 2F6D13AF28F5F386007C25D6 /* TestAppUITests */ = { isa = PBXGroup; children = ( - 2F8A431229130A8C005D2B8F /* TestAppUITests.swift */, + 2F8A431229130A8C005D2B8F /* HealthMeasurementsTests.swift */, + A959B7EF2C2D602C00ACA775 /* PairedDevicesTests.swift */, ); path = TestAppUITests; sourceTree = ""; @@ -177,6 +182,9 @@ 2F6D13AE28F5F386007C25D6 /* PBXTargetDependency */, ); name = TestAppUITests; + packageProductDependencies = ( + A959B7F22C2D646500ACA775 /* XCTestExtensions */, + ); productName = ExampleUITests; productReference = 2F6D13AC28F5F386007C25D6 /* TestAppUITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; @@ -189,7 +197,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1500; - LastUpgradeCheck = 1500; + LastUpgradeCheck = 1540; TargetAttributes = { 2F6D139128F5F384007C25D6 = { CreatedOnToolsVersion = 14.1; @@ -210,6 +218,7 @@ ); mainGroup = 2F6D138928F5F384007C25D6; packageReferences = ( + A959B7F12C2D646500ACA775 /* XCRemoteSwiftPackageReference "XCTestExtensions" */, ); productRefGroup = 2F6D139328F5F384007C25D6 /* Products */; projectDirPath = ""; @@ -258,7 +267,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2F8A431329130A8C005D2B8F /* TestAppUITests.swift in Sources */, + A959B7F02C2D602C00ACA775 /* PairedDevicesTests.swift in Sources */, + 2F8A431329130A8C005D2B8F /* HealthMeasurementsTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -310,6 +320,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -332,6 +343,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_STRICT_CONCURRENCY = complete; TVOS_DEPLOYMENT_TARGET = 17.0; WATCHOS_DEPLOYMENT_TARGET = 10.0; XROS_DEPLOYMENT_TARGET = 1.0; @@ -375,6 +387,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -390,6 +403,7 @@ SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_STRICT_CONCURRENCY = complete; TVOS_DEPLOYMENT_TARGET = 17.0; VALIDATE_PRODUCT = YES; WATCHOS_DEPLOYMENT_TARGET = 10.0; @@ -552,6 +566,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -574,6 +589,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = TEST; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_STRICT_CONCURRENCY = complete; TVOS_DEPLOYMENT_TARGET = 17.0; WATCHOS_DEPLOYMENT_TARGET = 10.0; XROS_DEPLOYMENT_TARGET = 1.0; @@ -674,6 +690,17 @@ }; /* End XCConfigurationList section */ +/* Begin XCRemoteSwiftPackageReference section */ + A959B7F12C2D646500ACA775 /* XCRemoteSwiftPackageReference "XCTestExtensions" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/StanfordBDHG/XCTestExtensions.git"; + requirement = { + kind = upToNextMinorVersion; + minimumVersion = 0.4.10; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + /* Begin XCSwiftPackageProductDependency section */ 2F68C3C7292EA52000B3E12C /* SpeziDevices */ = { isa = XCSwiftPackageProductDependency; @@ -683,6 +710,11 @@ isa = XCSwiftPackageProductDependency; productName = SpeziDevicesUI; }; + A959B7F22C2D646500ACA775 /* XCTestExtensions */ = { + isa = XCSwiftPackageProductDependency; + package = A959B7F12C2D646500ACA775 /* XCRemoteSwiftPackageReference "XCTestExtensions" */; + productName = XCTestExtensions; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 2F6D138A28F5F384007C25D6 /* Project object */; diff --git a/Tests/UITests/UITests.xcodeproj/xcshareddata/xcschemes/TestApp.xcscheme b/Tests/UITests/UITests.xcodeproj/xcshareddata/xcschemes/TestApp.xcscheme index 288073b..4d7654b 100644 --- a/Tests/UITests/UITests.xcodeproj/xcshareddata/xcschemes/TestApp.xcscheme +++ b/Tests/UITests/UITests.xcodeproj/xcshareddata/xcschemes/TestApp.xcscheme @@ -1,6 +1,6 @@ + + + +