diff --git a/CITATION.cff b/CITATION.cff index d8724ad..bfd75a2 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,9 +1,9 @@ # -# This source file is part of the StrokeCog based on the Stanford Spezi Template Application project +# This source file is part of the StrokeCog proejct based on the Stanford Spezi Template Application project # # SPDX-FileCopyrightText: 2023 Stanford University # -# SPDX-License-Identifier: LicenseRef-Proprietary +# SPDX-License-Identifier: MIT # cff-version: 1.2.0 diff --git a/StrokeCog/Onboarding/StudyIDView.swift b/StrokeCog/Onboarding/StudyIDView.swift index e26cc38..fbdf415 100644 --- a/StrokeCog/Onboarding/StudyIDView.swift +++ b/StrokeCog/Onboarding/StudyIDView.swift @@ -30,7 +30,7 @@ struct StudyIDView: View { }, actionView: { OnboardingActionsView( - "Continue", + "Next", action: { guard validation.validateSubviews() else { return diff --git a/StrokeCog/Resources/Localizable.xcstrings b/StrokeCog/Resources/Localizable.xcstrings index d66ce2a..a2529b8 100644 --- a/StrokeCog/Resources/Localizable.xcstrings +++ b/StrokeCog/Resources/Localizable.xcstrings @@ -106,9 +106,6 @@ } } } - }, - "Continue" : { - }, "CONTRIBUTIONS_LIST_DESCRIPTION" : { "localizations" : { @@ -179,7 +176,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "HealthKit Data Access" + "value" : "HealthKit Access" } } } @@ -329,6 +326,9 @@ } } } + }, + "Next" : { + }, "NOTIFICATION_PERMISSIONS_BUTTON" : { "localizations" : { @@ -539,7 +539,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Continue" + "value" : "Next" } } } @@ -560,7 +560,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "\nStrokeCog Study" + "value" : "StrokeCog Study" } } } diff --git a/StrokeCogUITests/ContactsTests.swift b/StrokeCogUITests/ContactsTests.swift index ee63845..7f927e7 100644 --- a/StrokeCogUITests/ContactsTests.swift +++ b/StrokeCogUITests/ContactsTests.swift @@ -27,7 +27,7 @@ class ContactsTests: XCTestCase { XCTAssertTrue(app.tabBars["Tab Bar"].buttons["Contacts"].waitForExistence(timeout: 2)) app.tabBars["Tab Bar"].buttons["Contacts"].tap() - XCTAssertTrue(app.staticTexts["Contact: Leland Stanford"].waitForExistence(timeout: 2)) + XCTAssertTrue(app.staticTexts["Contact: Dr. Michelle Odden"].waitForExistence(timeout: 2)) XCTAssertTrue(app.buttons["Call"].waitForExistence(timeout: 2)) XCTAssertTrue(app.buttons["Text"].waitForExistence(timeout: 2)) diff --git a/StrokeCogUITests/OnboardingTests.swift b/StrokeCogUITests/OnboardingTests.swift index 47299ef..2e62449 100644 --- a/StrokeCogUITests/OnboardingTests.swift +++ b/StrokeCogUITests/OnboardingTests.swift @@ -58,7 +58,7 @@ extension XCUIApplication { func conductOnboardingIfNeeded(email: String = "leland@stanford.edu") throws { let app = XCUIApplication() - if app.staticTexts["Spezi\nStrokeCog"].waitForExistence(timeout: 5) { + if app.staticTexts["StrokeCog Study"].waitForExistence(timeout: 5) { try app.navigateOnboardingFlow(email: email) } } @@ -69,6 +69,9 @@ extension XCUIApplication { ) throws { try navigateOnboardingFlowWelcome() try navigateOnboardingFlowInterestingModules() + if staticTexts["Study ID"].waitForExistence(timeout: 5) { + try navigateStudyID() + } if staticTexts["Your Account"].waitForExistence(timeout: 5) { try navigateOnboardingAccount(email: email) } @@ -82,16 +85,16 @@ extension XCUIApplication { } private func navigateOnboardingFlowWelcome() throws { - XCTAssertTrue(staticTexts["Spezi\nStrokeCog"].waitForExistence(timeout: 5)) + XCTAssertTrue(staticTexts["StrokeCog Study"].waitForExistence(timeout: 5)) - XCTAssertTrue(buttons["Learn More"].waitForExistence(timeout: 2)) - buttons["Learn More"].tap() + XCTAssertTrue(buttons["Next"].waitForExistence(timeout: 2)) + buttons["Next"].tap() } private func navigateOnboardingFlowInterestingModules() throws { - XCTAssertTrue(staticTexts["Interesting Modules"].waitForExistence(timeout: 5)) + XCTAssertTrue(staticTexts["Information"].waitForExistence(timeout: 5)) - for _ in 1..<4 { + for _ in 1..<2 { XCTAssertTrue(buttons["Next"].waitForExistence(timeout: 2)) buttons["Next"].tap() } @@ -100,6 +103,14 @@ extension XCUIApplication { buttons["Next"].tap() } + private func navigateStudyID() throws { + XCTAssertTrue(staticTexts["Study ID"].waitForExistence(timeout: 5)) + + try textFields["Tap here and enter your Study ID"].enter(value: "1234") + + buttons["Next"].tap() + } + private func navigateOnboardingAccount(email: String) throws { if buttons["Logout"].waitForExistence(timeout: 2.0) { buttons["Logout"].tap() @@ -112,8 +123,6 @@ extension XCUIApplication { try collectionViews.textFields["E-Mail Address"].enter(value: email) try collectionViews.secureTextFields["Password"].enter(value: "StanfordRocks") - try textFields["enter first name"].enter(value: "Leland") - try textFields["enter last name"].enter(value: "Stanford") XCTAssertTrue(collectionViews.buttons["Signup"].waitForExistence(timeout: 2)) collectionViews.buttons["Signup"].tap() @@ -123,7 +132,6 @@ extension XCUIApplication { if staticTexts["HealthKit Access"].waitForExistence(timeout: 5) && navigationBars.buttons["Back"].waitForExistence(timeout: 5) { navigationBars.buttons["Back"].tap() - XCTAssertTrue(staticTexts["Leland Stanford"].waitForExistence(timeout: 2)) XCTAssertTrue(staticTexts[email].waitForExistence(timeout: 2)) XCTAssertTrue(buttons["Next"].waitForExistence(timeout: 2)) @@ -134,6 +142,10 @@ extension XCUIApplication { private func navigateOnboardingFlowConsent() throws { XCTAssertTrue(staticTexts["Consent"].waitForExistence(timeout: 5)) + for _ in 1...7 { + swipeUp() + } + XCTAssertTrue(staticTexts["First Name"].waitForExistence(timeout: 2)) try textFields["Enter your first name ..."].enter(value: "Leland") @@ -180,9 +192,7 @@ extension XCUIApplication { navigationBars.buttons["Your Account"].tap() XCTAssertTrue(staticTexts["Account Overview"].waitForExistence(timeout: 5.0)) - XCTAssertTrue(staticTexts["Leland Stanford"].exists) XCTAssertTrue(staticTexts[email].exists) - XCTAssertTrue(staticTexts["Gender Identity, Choose not to answer"].exists) XCTAssertTrue(navigationBars.buttons["Close"].waitForExistence(timeout: 0.5))