Fix integration tests

This commit is contained in:
Stefan Ceriu
2022-09-23 13:50:04 +03:00
parent 867cce7b99
commit d7dad1353b
+9 -7
View File
@@ -66,16 +66,18 @@ class LoginTests: XCTestCase {
nextButton.tap() nextButton.tap()
let profileButton = app.buttons["userDisplayNameView"] let profileButton = app.buttons["userAvatarImage"]
XCTAssertTrue(profileButton.waitForExistence(timeout: expectedDuration)) XCTAssertTrue(profileButton.waitForExistence(timeout: expectedDuration))
profileButton.tap() profileButton.tap()
let logoutButton = app.buttons["logoutButton"] let menuLogoutButton = app.buttons["Sign out"]
XCTAssertTrue(logoutButton.waitForExistence(timeout: 5.0)) XCTAssertTrue(menuLogoutButton.waitForExistence(timeout: 5.0))
logoutButton.tap() menuLogoutButton.tap()
let logoutSheetButton = app.buttons["Sign out"].firstMatch let alertLogoutButton = app.buttons["Sign out"]
XCTAssertTrue(logoutSheetButton.waitForExistence(timeout: 5.0)) XCTAssertTrue(alertLogoutButton.waitForExistence(timeout: 5.0))
logoutSheetButton.tap() alertLogoutButton.tap()
XCTAssertTrue(getStartedButton.waitForExistence(timeout: 5.0))
} }
} }