From 53be57dce90ab59444784830fd6b14c09ebaaad5 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Tue, 30 Jun 2026 10:46:39 -0700 Subject: [PATCH 1/3] chore(auth): fix web authn and push notifications integration tests --- .../AuthWebAuthnAppUITests/AuthWebAuthnAppUITests.swift | 2 +- .../PushNotificationHostApp.xcodeproj/project.pbxproj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AmplifyPlugins/Auth/Tests/AuthWebAuthnApp/AuthWebAuthnAppUITests/AuthWebAuthnAppUITests.swift b/AmplifyPlugins/Auth/Tests/AuthWebAuthnApp/AuthWebAuthnAppUITests/AuthWebAuthnAppUITests.swift index 6bf7be539a..0f0f9cb1af 100644 --- a/AmplifyPlugins/Auth/Tests/AuthWebAuthnApp/AuthWebAuthnAppUITests/AuthWebAuthnAppUITests.swift +++ b/AmplifyPlugins/Auth/Tests/AuthWebAuthnApp/AuthWebAuthnAppUITests/AuthWebAuthnAppUITests.swift @@ -8,7 +8,7 @@ import XCTest final class AuthWebAuthnAppUITests: XCTestCase { - private let timeout = TimeInterval(6) + private let timeout = TimeInterval(30) private let app = XCUIApplication() private var username: String! private var signUpButton: XCUIElement! diff --git a/AmplifyPlugins/Notifications/Push/Tests/PushNotificationHostApp/PushNotificationHostApp.xcodeproj/project.pbxproj b/AmplifyPlugins/Notifications/Push/Tests/PushNotificationHostApp/PushNotificationHostApp.xcodeproj/project.pbxproj index b56abebded..97201ce522 100644 --- a/AmplifyPlugins/Notifications/Push/Tests/PushNotificationHostApp/PushNotificationHostApp.xcodeproj/project.pbxproj +++ b/AmplifyPlugins/Notifications/Push/Tests/PushNotificationHostApp/PushNotificationHostApp.xcodeproj/project.pbxproj @@ -868,7 +868,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.aws.amplify.notification.PushNotificationHostApp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; - SKIP_INSTALL = YES; + SKIP_INSTALL = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; @@ -899,7 +899,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.aws.amplify.notification.PushNotificationHostApp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; - SKIP_INSTALL = YES; + SKIP_INSTALL = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; From 772b5d49ea6c73d09d10a785abaf6ca74cedc45f Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Tue, 30 Jun 2026 11:43:38 -0700 Subject: [PATCH 2/3] update analytics watch integ tests --- .../AnalyticsHostApp.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AmplifyPlugins/Analytics/Tests/AnalyticsHostApp/AnalyticsHostApp.xcodeproj/project.pbxproj b/AmplifyPlugins/Analytics/Tests/AnalyticsHostApp/AnalyticsHostApp.xcodeproj/project.pbxproj index 2c827e1d10..f9d00169f7 100644 --- a/AmplifyPlugins/Analytics/Tests/AnalyticsHostApp/AnalyticsHostApp.xcodeproj/project.pbxproj +++ b/AmplifyPlugins/Analytics/Tests/AnalyticsHostApp/AnalyticsHostApp.xcodeproj/project.pbxproj @@ -902,7 +902,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.amazon.aws.amplify.swift.AnalyticsHostAppWatch.watchkitapp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; - SKIP_INSTALL = YES; + SKIP_INSTALL = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; @@ -932,7 +932,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.amazon.aws.amplify.swift.AnalyticsHostAppWatch.watchkitapp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; - SKIP_INSTALL = YES; + SKIP_INSTALL = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; From 1b7419584c5ebf4c64fe22ad06fb322c6c19974f Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Tue, 30 Jun 2026 12:02:47 -0700 Subject: [PATCH 3/3] updated authwebauthn test --- .../AuthWebAuthnAppUITests.swift | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/AmplifyPlugins/Auth/Tests/AuthWebAuthnApp/AuthWebAuthnAppUITests/AuthWebAuthnAppUITests.swift b/AmplifyPlugins/Auth/Tests/AuthWebAuthnApp/AuthWebAuthnAppUITests/AuthWebAuthnAppUITests.swift index 0f0f9cb1af..8639719d34 100644 --- a/AmplifyPlugins/Auth/Tests/AuthWebAuthnApp/AuthWebAuthnAppUITests/AuthWebAuthnAppUITests.swift +++ b/AmplifyPlugins/Auth/Tests/AuthWebAuthnApp/AuthWebAuthnAppUITests/AuthWebAuthnAppUITests.swift @@ -72,20 +72,14 @@ final class AuthWebAuthnAppUITests: XCTestCase { @MainActor func testWebAuthnAPIs() async throws { // 1. Associate new WebAuthn Credential + let associateContinueButton = springboard.otherElements["ASAuthorizationControllerContinueButton"] let associateAttempt = await attempt { associateButton.tap() - return !waitForResult("Associate WebAuthn Credential failed:", timeout: 1) + return associateContinueButton.waitForExistence(timeout: timeout) } guard associateAttempt else { - XCTFail("Failed to trigger the Associate WebAuthn Credential workflow: \(lastResult)") - return - } - - // Wait for the "Continue" button to appear in the FaceID popover and tap it - let associateContinueButton = springboard.otherElements["ASAuthorizationControllerContinueButton"] - guard associateContinueButton.waitForExistence(timeout: timeout) else { - XCTFail("Failed to find the 'Continue' button to Associate new WebAuthn credential") + XCTFail("Failed to find the 'Continue' button to Associate new WebAuthn credential: \(lastResult)") return } associateContinueButton.tap() @@ -112,20 +106,14 @@ final class AuthWebAuthnAppUITests: XCTestCase { } // 4. Sign in with WebAuthn + let signInContinueButton = springboard.otherElements["ASAuthorizationControllerContinueButton"] let signInAttempt = await attempt { signInButton.tap() - return !waitForResult("Sign In failed:", timeout: 1) + return signInContinueButton.waitForExistence(timeout: timeout) } guard signInAttempt else { - XCTFail("Failed to trigger the Assert WebAuthn Credential workflow: \(lastResult)") - return - } - - // Wait for the "Continue" button to appear in the FaceID popover - let signInContinueButton = springboard.otherElements["ASAuthorizationControllerContinueButton"] - guard signInContinueButton.waitForExistence(timeout: timeout) else { - XCTFail("Failed to find the 'Continue' button to Sign In with WebAuthn") + XCTFail("Failed to find the 'Continue' button to Sign In with WebAuthn: \(lastResult)") return }