Skip to content

Commit

Permalink
Fixes MTE-3890 - for flaky smoke tests (backport #23389) (#23395)
Browse files Browse the repository at this point in the history
Fixes MTE-3890 - for flaky smoke tests (#23389)

(cherry picked from commit ad0a142)

Co-authored-by: dragosb01 <[email protected]>
  • Loading branch information
mergify[bot] and dragosb01 authored Nov 26, 2024
1 parent 25ff72d commit 4644e1d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,9 @@ class AddressesTests: BaseTestCase {
updateAddress(updateCountry: updateCountry, isPostalCode: isPostalCode)
tapSave()
// The "Address saved" toast message is displayed
// mozWaitForElementToExist(app.staticTexts[addressSavedTxt])
mozWaitForElementToExist(app.staticTexts[addressSavedTxt])
// The address is saved
// Update with correct toast message after https://mozilla-hub.atlassian.net/browse/FXIOS-10422 is fixed
// mozWaitForElementToExist(app.staticTexts[savedAddressesTxt])
mozWaitForElementToExist(app.staticTexts[savedAddressesTxt])
if updateCountry {
let addressInfo = ["Test2", "test address2", "city test2, 100000"]
for index in addressInfo {
Expand Down Expand Up @@ -318,8 +317,12 @@ class AddressesTests: BaseTestCase {
app.typeText(email)
}

private func tapSave() {
app.buttons["Save"].tapWithRetry()
private func tapSave(withRetry: Bool = false) {
if withRetry {
app.buttons["Save"].tapWithRetry()
} else {
app.buttons["Save"].tap()
}
}

private func tapEdit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class BookmarksTests: BaseTestCase {
navigator.nowAt(BrowserTab)

// Clear text and enter new url
waitUntilPageLoad()
waitForTabsButton()
navigator.performAction(Action.OpenNewTabFromTabTray)
navigator.goto(URLBarOpen)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ private extension BaseTestCase {
navigator.nowAt(NewTabScreen)
}
navigator.openURL(firstWebsite.url)
waitUntilPageLoad()
waitForTabsButton()
navigator.performAction(Action.OpenNewTabFromTabTray)
navigator.nowAt(NewTabScreen)
Expand Down

0 comments on commit 4644e1d

Please sign in to comment.