From 7a14839715011c47d8ee38e5ee6866f50e907dae Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Fri, 10 Jan 2025 16:06:11 -0800 Subject: [PATCH 1/6] Fix CodeQL --- fastlane/Fastfile | 1 + 1 file changed, 1 insertion(+) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index f6f7ae3..60ad227 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -40,6 +40,7 @@ platform :ios do skip_archive: true, skip_codesigning: true, derived_data_path: ".derivedData", + destination: "generic/platform=iOS Simulator", # GitHub Action Runners seem to fail with the default "generic/platform=iOS". xcargs: [ "-skipPackagePluginValidation", "-skipMacroValidation" From 8860d12f770fe43ffadef47c6348fc6f43555104 Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Fri, 10 Jan 2025 16:26:32 -0800 Subject: [PATCH 2/6] Fix Xcode Version --- .github/workflows/static-analysis.yml | 1 + fastlane/Fastfile | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index d4bb4ae..7bea926 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -50,3 +50,4 @@ jobs: with: codeql: true fastlanelane: codeql + xcodeversion: "16.1" diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 60ad227..f6f7ae3 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -40,7 +40,6 @@ platform :ios do skip_archive: true, skip_codesigning: true, derived_data_path: ".derivedData", - destination: "generic/platform=iOS Simulator", # GitHub Action Runners seem to fail with the default "generic/platform=iOS". xcargs: [ "-skipPackagePluginValidation", "-skipMacroValidation" From 0e50482a9236e116bdff66a6fc1a7dc516f59f3e Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Mon, 20 Jan 2025 16:25:18 -0800 Subject: [PATCH 3/6] Update GitHub Actions & Test --- .github/workflows/documentation-deployment.yml | 1 + .github/workflows/static-analysis.yml | 2 +- TemplateApplicationUITests/SchedulerTests.swift | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/documentation-deployment.yml b/.github/workflows/documentation-deployment.yml index 5b15987..7d33253 100644 --- a/.github/workflows/documentation-deployment.yml +++ b/.github/workflows/documentation-deployment.yml @@ -30,3 +30,4 @@ jobs: with: scheme: 'TemplateApplication' dryrun: ${{ github.ref_name != 'main' }} + xcodeversion: "16.1" # Temporary workaround for: https://github.com/actions/runner-images/issues/11335. Remove when resolved. diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 7bea926..4b9f3fd 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -50,4 +50,4 @@ jobs: with: codeql: true fastlanelane: codeql - xcodeversion: "16.1" + xcodeversion: "16.1" # Temporary workaround for: https://github.com/actions/runner-images/issues/11335. Remove when resolved. diff --git a/TemplateApplicationUITests/SchedulerTests.swift b/TemplateApplicationUITests/SchedulerTests.swift index 8f7043e..0bdc5ce 100644 --- a/TemplateApplicationUITests/SchedulerTests.swift +++ b/TemplateApplicationUITests/SchedulerTests.swift @@ -52,6 +52,7 @@ class SchedulerTests: XCTestCase { XCTAssert(app.staticTexts["What is your age?"].waitForExistence(timeout: 0.5)) XCTAssert(app.textFields["Tap to answer"].exists) try app.textFields["Tap to answer"].enter(value: "25") + app.buttons["Done"].tap() XCTAssert(nextButton.isEnabled) nextButton.tap() From 79e703a45a26cfd7002523068205feb67a375968 Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Mon, 20 Jan 2025 16:31:58 -0800 Subject: [PATCH 4/6] Fix file path --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3cf585a..b435f1d 100644 --- a/README.md +++ b/README.md @@ -25,19 +25,19 @@ It demonstrates using the [Spezi](https://github.com/StanfordSpezi/Spezi) ecosys The following screenshots show a wide variety of features based on Spezi Modules that are part of the Spezi Template Application. -|![A screen displaying welcome information.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/Welcome.png#gh-light-mode-only) ![A screen displaying welcome information.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/Welcome~dark.png#gh-dark-mode-only)|![A screen showing an overview of the modules used in the Spezi Template Application.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/InterestingModules.png#gh-light-mode-only) ![A screen showing an overview of the modules used in the Spezi Template Application.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/InterestingModules~dark.png#gh-dark-mode-only)|![A screen displaying the consent view.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/Consent.png#gh-light-mode-only) ![A screen displaying the consent view.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/Consent~dark.png#gh-dark-mode-only) +|![A screen displaying welcome information.]() ![A screen displaying welcome information.]()|![A screen showing an overview of the modules used in the Spezi Template Application.]() ![A screen showing an overview of the modules used in the Spezi Template Application.]()|![A screen displaying the consent view.]() ![A screen displaying the consent view.]() |:--:|:--:|:--:| |Welcome View|Interesting Modules|Consent Signature| -|![HealthKit Onboarding Flow](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/HealthKitAccess.png#gh-light-mode-only) ![HealthKit Onboarding Flow](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/HealthKitAccess~dark.png#gh-dark-mode-only)|![Permissions screen of the HealthKit framework](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/HealthKitSheet.png#gh-light-mode-only) ![Permissions screen of the HealthKit framework](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/HealthKitSheet~dark.png#gh-dark-mode-only)|![Onboarding screen showing the Notifications permission screen.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Notifications.png#gh-light-mode-only) ![Onboarding screen showing the Notifications permission screen.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Notifications~dark.png#gh-dark-mode-only)| +|![HealthKit Onboarding Flow]() ![HealthKit Onboarding Flow]()|![Permissions screen of the HealthKit framework]() ![Permissions screen of the HealthKit framework]()|![Onboarding screen showing the Notifications permission screen.]() ![Onboarding screen showing the Notifications permission screen.]()| |:--:|:--:|:--:| |HealthKit Access|Granular HealthKit Share Control|Trigger Local Notifications| -|![A screen displaying the Scheduler UI.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Schedule.png#gh-light-mode-only) ![A screen displaying the Scheduler UI.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Schedule~dark.png#gh-dark-mode-only)|![A screen showing a questionnaire using ResearchKit.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Questionnaire.png#gh-light-mode-only) ![A screen showing a questionnaire using ResearchKit.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Questionnaire~dark.png#gh-dark-mode-only)|![The scheduler screen showing the completed UI](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/ScheduleComplete.png#gh-light-mode-only) ![The scheduler screen showing the completed UI](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/ScheduleComplete~dark.png#gh-dark-mode-only)| +|![A screen displaying the Scheduler UI.]() ![A screen displaying the Scheduler UI.]()|![A screen showing a questionnaire using ResearchKit.]() ![A screen showing a questionnaire using ResearchKit.]()|![The scheduler screen showing the completed UI]() ![The scheduler screen showing the completed UI]()| |:--:|:--:|:--:| |Schedule Tasks|Display Questionnaires|Keep Track of Tasks| -|![A screen displaying the Contact UI.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/Contacts.png#gh-light-mode-only) ![A screen displaying the Contact UI.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/Contacts~dark.png#gh-dark-mode-only)|![A screen displaying the current user account information.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Account/Account.png#gh-light-mode-only) ![A screen displaying the current user account information.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Account/Account~dark.png#gh-dark-mode-only)|![License information to list all used Swift Packages](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/License.png#gh-light-mode-only) ![License information to list all used Swift Packages](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/License~dark.png#gh-dark-mode-only)| +|![A screen displaying the Contact UI.]() ![A screen displaying the Contact UI.]()|![A screen displaying the current user account information.]() ![A screen displaying the current user account information.]()|![License information to list all used Swift Packages]() ![License information to list all used Swift Packages]()| |:--:|:--:|:--:| |Contact Information|Account Overview|License Information| From 655e45b3a2c1211077268b8fdb99a8f3d29d0dd4 Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Mon, 20 Jan 2025 18:16:50 -0800 Subject: [PATCH 5/6] Update CodeQL Setup --- .github/workflows/static-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4b9f3fd..3e70968 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -42,7 +42,7 @@ jobs: contents: read codeql: name: CodeQL - uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 + uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 permissions: security-events: write actions: read From ea617e9e8a77f6f6293f720486188c6523a96a1c Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Mon, 20 Jan 2025 23:10:46 -0800 Subject: [PATCH 6/6] Update UI Test with an additional timeout. --- TemplateApplicationUITests/ContributionsTest.swift | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/TemplateApplicationUITests/ContributionsTest.swift b/TemplateApplicationUITests/ContributionsTest.swift index a71ce4a..9b91785 100644 --- a/TemplateApplicationUITests/ContributionsTest.swift +++ b/TemplateApplicationUITests/ContributionsTest.swift @@ -20,12 +20,14 @@ final class ContributionsTest: XCTestCase { } @MainActor - func testLicenseInformationPage() throws { + func testLicenseInformationPage() async throws { let app = XCUIApplication() - + XCTAssertTrue(app.wait(for: .runningForeground, timeout: 2.0)) - - sleep(1) + + // Waiting until the setup test accounts actions have been finished & sheets are dismissed. + try await Task.sleep(for: .seconds(5)) + XCTAssertTrue(app.navigationBars.buttons["Your Account"].waitForExistence(timeout: 6.0)) app.navigationBars.buttons["Your Account"].tap()