diff --git a/IntegrationTests/Sources/Common.swift b/IntegrationTests/Sources/Common.swift index 34ec6c6a0..39ea28367 100644 --- a/IntegrationTests/Sources/Common.swift +++ b/IntegrationTests/Sources/Common.swift @@ -66,9 +66,12 @@ extension XCUIApplication { currentTestCase.expectation(for: doesNotExistPredicate, evaluatedWith: usernameTextField) currentTestCase.waitForExpectations(timeout: 300.0) - // This might come in a different order, wait for both. + // Handle the password saving dialog let savePasswordButton = buttons["Save Password"] if savePasswordButton.waitForExistence(timeout: 10.0) { + // Tapping the sheet button while animating upwards fails. Wait for it to settle + sleep(1) + savePasswordButton.tap() } diff --git a/UITests/Sources/AppLockSetupUITests.swift b/UITests/Sources/AppLockSetupUITests.swift index c98ec83d2..66ac36021 100644 --- a/UITests/Sources/AppLockSetupUITests.swift +++ b/UITests/Sources/AppLockSetupUITests.swift @@ -40,6 +40,9 @@ class AppLockSetupUITests: XCTestCase { func testCreateFlow() async throws { app = Application.launch(.appLockSetupFlow) + // Wait for the keyboard to push the sheet up before snapshotting + try await Task.sleep(for: .seconds(0.5)) + // Create PIN screen. try await app.assertScreenshot(.appLockSetupFlow, step: Step.createPIN)