Skip to content
Snippets Groups Projects
Commit 94f2a3e4 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

UITest: fix account creation test

Change-Id: Ife533ee5521edefd061881e3dde57b1552b205d4
parent 06522dad
No related branches found
No related tags found
No related merge requests found
......@@ -51,12 +51,28 @@ final class AccountCreationTest: JamiBaseNoAccountUITest {
}
let accountsButton = XCUIApplication().navigationBars.buttons[SmartListAccessibilityIdentifiers.openAccountsButton]
accountsButton.tap()
waitForSeconds(2)
// Try to find the add account button by identifier first
let addAccount = app.buttons[SmartListAccessibilityIdentifiers.addAccountButton]
waitForElementToAppear(addAccount)
if addAccount.exists {
addAccount.tap()
} else {
XCTFail("addAccount button did not appear in time")
// Fallback to finding by exact label if identifier doesn't work
let addAccountByLabel = app.buttons[L10n.Smartlist.addAccountButton]
if addAccountByLabel.exists {
addAccountByLabel.tap()
} else {
// Try by accessibility label
let addAccountByAccessibilityLabel = app.buttons[L10n.Accessibility.smartListAddAccount]
if addAccountByAccessibilityLabel.exists {
addAccountByAccessibilityLabel.tap()
} else {
XCTFail("addAccount button did not appear in time")
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment