Fix testUserFlow integration tests, at least locally (#5352)
* Fix testUserFlow integration tests - Use 'Close' instead of 'Cancel' button label when dismissing location picker - Scroll up to make the People button visible before tapping it Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fixup! Fix testUserFlow integration tests * Integration tests: Add logout handling for MAS authentication It is useful when relaunching tests locally. It avoids them to fail because the MAS webview is already logged it from a previous session. * Swipe until the People button is hittable. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
@@ -145,7 +145,7 @@ class UserFlowTests: XCTestCase {
|
||||
|
||||
allowLocationPermissionOnce()
|
||||
|
||||
tapOnButton("Cancel", waitForDisappearance: true)
|
||||
tapOnButton("Close", waitForDisappearance: true)
|
||||
}
|
||||
|
||||
private func allowLocationPermissionOnce() {
|
||||
@@ -190,7 +190,17 @@ class UserFlowTests: XCTestCase {
|
||||
XCTAssertTrue(roomHeader.waitForExistence(timeout: 10.0))
|
||||
roomHeader.tap(.center)
|
||||
|
||||
// Open the room member details
|
||||
// Swipe until the People button is hittable
|
||||
let peopleButton = app.buttons[A11yIdentifiers.roomDetailsScreen.people]
|
||||
if !peopleButton.isHittable {
|
||||
var attempts = 0
|
||||
while !peopleButton.isHittable, attempts < 5 {
|
||||
app.swipeUp()
|
||||
attempts += 1
|
||||
}
|
||||
}
|
||||
|
||||
// Open the room members list.
|
||||
tapOnButton(A11yIdentifiers.roomDetailsScreen.people)
|
||||
|
||||
// Open the first member's details. Loading members for big rooms can take a while.
|
||||
|
||||
Reference in New Issue
Block a user