Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down Expand Up @@ -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()
Expand All @@ -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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Loading