Skip to content

Commit

Permalink
fix(MailUITests): Avoid unnecessary waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann committed Mar 26, 2024
1 parent 9ef6203 commit 1de9f28
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 @@ -170,8 +170,13 @@ class MailUITests: XCTestCase {

func undo() {
let cancelButton = app.buttons[MailResourcesStrings.Localizable.buttonCancel]
_ = cancelButton.waitForExistence(timeout: 10)
cancelButton.tap()
if cancelButton.exists {
cancelButton.tap()
} else {
_ = cancelButton.waitForExistence(timeout: 10)

cancelButton.tap()

Check failure on line 178 in MailUITests/MailUITests.swift

View workflow job for this annotation

GitHub Actions / UI Tests

testDeleteSwipeAction, Failed to tap "Cancel" Button: No matches found for Elements matching predicate '"Cancel" IN identifiers' from input {(
}
}

func swipeFirstCell() {
Expand Down

0 comments on commit 1de9f28

Please sign in to comment.