Various reliability tweaks for the UI and integration tests.
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user