-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: iOS Maestro test fix #6700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
…eactNative into 3rd-set-of-room-test
…eactNative into 3rd-set-of-room-test
…Rocket.Chat.ReactNative into 3rd-set-of-room-test
…Rocket.Chat.ReactNative into 3rd-set-of-room-test
…Rocket.Chat.ReactNative into 3rd-set-of-room-test
There was a problem hiding this 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-nameor 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-buttonvisibility 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: trueplacement for switch elements needs verification.The addition of
centerElement: trueto scrollUntilVisible steps for thet(type) andro(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.
📒 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: trueto thesescrollUntilVisiblesteps 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: truefor 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
longPressOnfor 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
scrollUntilVisiblewith UP direction to explicittapOnfor 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-keyboardhelper 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
runFlowwithplatform: androidcondition 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-keyboardhelper 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.
Proposed changes
This PR introduce the following changes to Maestro E2E testing for iOS
nick-fields/retryto handle cases where macOS instances hang or time out.Known Issues:
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
Checklist
Further comments
Summary by CodeRabbit
Tests
Chores