mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
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.expectation(for: doesNotExistPredicate, evaluatedWith: usernameTextField)
|
||||||
currentTestCase.waitForExpectations(timeout: 300.0)
|
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"]
|
let savePasswordButton = buttons["Save Password"]
|
||||||
if savePasswordButton.waitForExistence(timeout: 10.0) {
|
if savePasswordButton.waitForExistence(timeout: 10.0) {
|
||||||
|
// Tapping the sheet button while animating upwards fails. Wait for it to settle
|
||||||
|
sleep(1)
|
||||||
|
|
||||||
savePasswordButton.tap()
|
savePasswordButton.tap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ class AppLockSetupUITests: XCTestCase {
|
|||||||
func testCreateFlow() async throws {
|
func testCreateFlow() async throws {
|
||||||
app = Application.launch(.appLockSetupFlow)
|
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.
|
// Create PIN screen.
|
||||||
try await app.assertScreenshot(.appLockSetupFlow, step: Step.createPIN)
|
try await app.assertScreenshot(.appLockSetupFlow, step: Step.createPIN)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user