Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/_reusable_run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ jobs:
{
echo "## 📊 Allure Report Generated Successfully";
echo "";
echo "**Artifact Name:** \`html-report-${{ github.run_number }}\`";
echo "**Artifact Name:** \`html-report-${{ github.run_number }}-${{ env.SANITIZED_BRANCH }}\`";
echo "";
echo "### 📥 How to View the Report";
echo "";
Expand Down
16 changes: 15 additions & 1 deletion wire-ios/WireUITests/Pages/ConversationsPage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,21 @@ class ConversationsPage: PageModel {

func openUserProfilePage() throws -> UserProfilePage {
try VerifyUserIsOnConversationsTab()
accountProfileImageView.waitAndTap()

if accountProfileImageView.waitAndTap() {
return try UserProfilePage()
}

// Fallback: Sometimes observed on CI that accountProfileImageView isn't tappable after login.
let userAccountButton = app.buttons
.containing(NSPredicate(format: "value CONTAINS[c] %@", "account"))
.firstMatch

if userAccountButton.waitAndTap(timeout: 5.0) {
return try UserProfilePage()
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: it would be interesting to know why it's not tappable, because the issue could be somewhere else

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed this fallback as not needed.


XCTFail("Could not open user profile: neither profile image nor account button was tappable")
return try UserProfilePage()
}

Expand Down
11 changes: 5 additions & 6 deletions wire-ios/WireUITests/Pages/OptionsOnSettingsPage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,12 @@ class OptionsOnSettingsPage: PageModel {
let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
let passcodeField = springboard.secureTextFields["Passcode field"].firstMatch

guard passcodeField.waitAndTap()
else {
XCTFail("Passcode SecureTextField did not appear")
throw XCTSkip("Passcode field not available")
// Sometimes the splashscreen stays visible for unexpectedly long.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: it's good as a workaround, but to me we should investigate what's going on:

  • when does this happen?
  • and extract the app logs when this happens

it could hide a bigger issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely agree to avoid any workarounds but currently the 2 tests flaky behaviour is weird on Ci not on local:

  • For the test where it fails to open user profile - it simply closes the app when app is in sync doesn;t wait for the next page element which is ~15 seconds
openinguserprofile.mp4
  • Foe the seconds issue: with app lock with passcode - coming from background to foreground, sometime it takes loner on splashscreen so increase the time out and also observed that, without performing tap() if we directly typeText() it works as fallback in case of secureText is not able to locate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found it.. the tap is actually being performed not on the exact button.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locally I fail to replicate. This same function is being used few places but all works fine except one test.

if passcodeField.waitAndTap(timeout: 8.0) {
try passcodeField.tapIfKeyboardNotFocused().typeText(pass)
} else {
passcodeField.typeText(pass)
}
try passcodeField.tapIfKeyboardNotFocused().typeText(pass)

let doneButton = springboard.keyboards.buttons["Done"].firstMatch
if doneButton.waitAndTap() {
// Tapped successfully
Expand Down
4 changes: 3 additions & 1 deletion wire-ios/WireUITests/Pages/PhotosAppPage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class PhotosAppPage: PageModel {
}

func selectConversation(name: String) -> XCUIElement {
photosApp.staticTexts[name].firstMatch
var conversationCell = photosApp.staticTexts[name]
XCTAssertTrue(conversationCell.waitForExistence(timeout: timeout))
return conversationCell.firstMatch
}

@discardableResult
Expand Down
Loading