Skip to content

Conversation

@Rohit3523
Copy link
Collaborator

@Rohit3523 Rohit3523 commented Oct 1, 2025

Proposed changes

This PR introduce the following changes to Maestro E2E testing for iOS

  1. Fixed several tests that were failing.
  2. Implemented sharding to run tests in parallel.
  3. Integrated nick-fields/retry to handle cases where macOS instances hang or time out.
  4. Made accessibility-and-appearance Android-only for now as text readability on iOS screens is difficult. A possible iOS solution will be explored later.
  5. Added a new utility function to hide the keyboard.
  6. In room-info edit, moved toast message validation to android only since toast messages on iOS are not readable and only remain visible for 5 seconds.
  • As an alternative, we plan to replace toast messages with alerts for E2E testing to have better control. This will be implemented in a separate PR.
  1. Maestro was unable to tap “Allow” on the notification modal because it detected a horizontal scroll bar over the button area. This has been fixed by using tap points.
  2. Fixed the logout issue by using tap points instead of tapping the text directly.

Known Issues:

  1. Some tests are still flaky. I am monitoring which ones fail and where — a separate PR will address these issues.
  • Temporary workaround: re-run the workflow for failed tasks.
  1. macOS instances still occasionally time out.

Run 1: https://github.com/RocketChat/Rocket.Chat.ReactNative/actions/runs/18725063576
Run 2: https://github.com/RocketChat/Rocket.Chat.ReactNative/actions/runs/18753137128

Issue(s)

https://rocketchat.atlassian.net/browse/COMM-53

How to test or reproduce

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Summary by CodeRabbit

  • Tests

    • Sharded parallel test execution with per-shard retries, fail-fast disabled, and shard-aware reports/artifacts with retention
    • Improved reliability: many selectors moved to stable IDs, retry-on-flaky-taps, explicit timeouts, animation/wait helpers, keyboard-hide steps, and added waits
    • Platform-aware test flows and shard-specific logging
  • Chores

    • Exposed additional test IDs on select UI components for easier automation

@Rohit3523 Rohit3523 had a problem deploying to official_android_build October 23, 2025 12:59 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build October 23, 2025 12:59 — with GitHub Actions Error
@Rohit3523 Rohit3523 deployed to approve_e2e_testing October 23, 2025 15:15 — with GitHub Actions Active
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build October 23, 2025 15:18 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build October 23, 2025 15:18 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to official_android_build October 23, 2025 15:18 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to official_android_build October 23, 2025 18:44 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build October 23, 2025 18:44 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build October 23, 2025 18:44 — with GitHub Actions Error
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
.maestro/tests/room/room-info.yaml (1)

221-223: Text-based regex selector inconsistent with id-based strategy (previously flagged).

This is the same selector consistency issue flagged in the prior review. Line 221–223 retains the text-based regex text: '.*${output.room.name}.*' while the rest of the file uses stable id-based selectors. This reduces test robustness and maintainability.

Please migrate this to an id-based selector matching the broader test strategy. If no stable testID exists for the room name display in the reset verification context, consider adding one to the app (e.g., room-info-view-name or similar):

-    element:
-      text: '.*${output.room.name}.*'
+    element:
+      id: 'room-info-view-name'

If the element is different from the initial room info name display, provide the correct stable testID and update accordingly.

🧹 Nitpick comments (2)
.maestro/tests/room/room-info.yaml (2)

60-63: Duplicated wait for edit-button visibility.

Lines 60–63 repeat the wait for room-info-view-edit-button visibility that is already checked at lines 55–58. This redundancy is unnecessary and can slow test execution.

Consider removing the duplicate wait:

- extendedWaitUntil:
-     visible:
-       id: 'room-info-view-edit-button'
-     timeout: 60000
  - tapOn:
      id: 'room-info-view-edit-button'

193-193: centerElement: true placement for switch elements needs verification.

The addition of centerElement: true to scrollUntilVisible steps for the t (type) and ro (read-only) fields suggests these elements require centered positioning for reliable interaction. This is reasonable for toggle switches, but verify that this setting doesn't introduce regressions on different device sizes or orientations.

Also applies to: 200-200

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5e65da3 and 87e5109.

📒 Files selected for processing (2)
  • .maestro/tests/assorted/profile.yaml (3 hunks)
  • .maestro/tests/room/room-info.yaml (6 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ESLint and Test / run-eslint-and-test
🔇 Additional comments (10)
.maestro/tests/assorted/profile.yaml (4)

105-105: Robust scroll positioning improvements.

Adding centerElement: true to these scrollUntilVisible steps improves tap accuracy and element visibility, which should help reduce test flakiness on iOS. Good addition for consistency across profile update flows.

Also applies to: 130-130, 153-153


100-100: Verify keyboard hide utility integration.

The PR mentions adding a utility to hide the keyboard for better reliability. Lines 100, 116–117, and 124–125 currently use text-based taps to hide the keyboard. Confirm whether these should be replaced with the new keyboard hide utility for consistency and improved robustness, or whether text-based dismissal is intentional here.

Also applies to: 116-117, 124-125


201-203: Appropriate use of retry logic.

Adding retryTapIfNoChange: true for the password button tap improves reliability for this critical interaction, aligning with the PR's focus on addressing iOS test flakiness.


139-144: Appropriate platform-specific handling for iOS email interaction.

Using longPressOn for iOS email field update is a good platform-specific adjustment that should improve text selection and input reliability on iOS.

.maestro/tests/room/room-info.yaml (6)

144-151: Navigation refactoring improves tap reliability.

The switch from scrollUntilVisible with UP direction to explicit tapOn for back and edit buttons aligns well with the PR's goal of avoiding tap-detection issues. The explicit wait for name input visibility before interaction is also a solid stabilization pattern.


156-156: Keyboard hiding consistently applied after text inputs.

The repeated application of the hide-keyboard helper after each text input (name, topic, announcement, description, password) is a solid pattern for improving test reliability on iOS/macOS. This directly supports the PR's goal of handling macOS hangs and timeouts.

Also applies to: 164-164, 172-172, 180-180, 188-188


300-307: Platform-specific toast validation properly wrapped for Android only.

The wrapping of success message validation in a runFlow with platform: android condition correctly implements the PR's stated goal of skipping toast validation on iOS due to text readability issues. This is appropriate and aligns with the broader strategy to improve test stability.


331-331: Keyboard hiding consistently maintained across multiple input fields.

The hide-keyboard helper is properly invoked after each of the three text inputs (topic, announcement, description), maintaining consistency with the earlier sections of the test and supporting improved macOS timeout handling.

Also applies to: 339-339, 347-347


354-361: Android-only toast validation pattern consistent with earlier sections.

The platform-specific wrapping for success message validation is correctly applied here as well, maintaining consistency across all edit operations and aligning with the PR's approach to skip iOS toast checks due to text readability constraints.


394-401: Platform-specific toast validation consistent across all edit operations.

The Android-only success message check is properly applied here as well, maintaining uniformity across the room-type change operation and adhering to the PR's strategy.

@Rohit3523 Rohit3523 requested a deployment to approve_e2e_testing October 23, 2025 19:45 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_android_build October 23, 2025 19:48 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to official_android_build October 23, 2025 19:48 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_ios_build October 23, 2025 19:48 — with GitHub Actions Waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants