Skip to content

Commit

Permalink
fix(MailUITests): Ignore failed undo
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann committed Mar 26, 2024
1 parent 9ef6203 commit 29962c3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions MailUITests/MailUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class MailUITests: XCTestCase {

app.collectionViews.buttons[MailResourcesStrings.Localizable.actionDelete].tap()

undo()
undo(ignoreUndoFailure: false)
}

func testMoveAction() {
Expand Down Expand Up @@ -168,9 +168,14 @@ class MailUITests: XCTestCase {
}
}

func undo() {
func undo(ignoreUndoFailure: Bool = true) {
let cancelButton = app.buttons[MailResourcesStrings.Localizable.buttonCancel]
_ = cancelButton.waitForExistence(timeout: 10)

if !cancelButton.exists && ignoreUndoFailure {
return
}

cancelButton.tap()
}

Expand Down

0 comments on commit 29962c3

Please sign in to comment.