text: migrated room test from detox to maestro#6598
Conversation
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (6)
.maestro/tests/room/room.yaml (6)
80-99: Avoid hardcoding #general; use the created room to reduce env coupling.Some workspaces don’t have General or it’s restricted.
-- inputText: '#general' +- inputText: '#${output.room.name}' ... -- extendedWaitUntil: - visible: - id: 'autocomplete-item-general' +- extendedWaitUntil: + visible: + id: 'autocomplete-item-${output.room.name}' ... -- tapOn: - id: 'autocomplete-item-general' +- tapOn: + id: 'autocomplete-item-${output.room.name}' ... -- extendedWaitUntil: - visible: - text: '#general ' +- extendedWaitUntil: + visible: + text: '#${output.room.name} ' ... -- extendedWaitUntil: - notVisible: - id: 'autocomplete-item-general' +- extendedWaitUntil: + notVisible: + id: 'autocomplete-item-${output.room.name}'
211-220: Prefer a wait over an immediate assert to reduce flakes.Switch to an explicit wait before tapping the add‑reaction button.
-# should show reaction picker on add reaction button pressed and have frequently used emoji -- assertVisible: - id: message-add-reaction +# should show reaction picker on add reaction button pressed and have frequently used emoji +- extendedWaitUntil: + visible: + id: message-add-reaction + timeout: 60000
12-15: Resource cleanup: consider deleting created rooms too.You delete users on teardown; rooms created by those users may persist depending on server policies.
Option: track created room IDs in utils and delete them in onFlowEnd.
104-138: Quote regex strings for YAML safety.Unquoted patterns like .${…}. can be misparsed by some YAML parsers; quoting improves robustness.
Example:
- text: .*${output.randomMessage}.* + text: '.*${output.randomMessage}.*'Apply similarly to other regex-like text matchers.
499-531: Draft verification: assert composer is cleared after send.Current check could pass on message bubble; add a negative check on the composer to ensure no residual draft.
- tapOn: id: 'message-composer-send' - extendedWaitUntil: visible: text: '.*draft.*' timeout: 60000 +- extendedWaitUntil: + notVisible: + id: message-composer-input + # composer should not contain the draft anymore + timeout: 60000
139-175: Emoji IDs can diverge across platforms/skins.If iOS failures persist here, consider falling back to searching by shortcode text first, then tapping the first result, instead of hardcoding emoji-* IDs.
I can extract a helper flow (select-emoji.yaml) that searches and taps by shortcode for cross‑platform stability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.maestro/tests/room/room.yaml(1 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). (3)
- GitHub Check: E2E Build iOS / ios-build
- GitHub Check: E2E Build Android / android-build
- GitHub Check: ESLint and Test / run-eslint-and-test
🔇 Additional comments (1)
.maestro/tests/room/room.yaml (1)
265-285: iOS a11y: confirm header testID maps to accessibilityIdentifier.If failing on iOS, ensure the header component sets testID on the native touchable and doesn’t get shadowed by nested views.
If needed, I can draft a small patch in the header component to set accessibilityIdentifier/testID explicitly.
| from: | ||
| id: action-sheet-handle | ||
| direction: UP | ||
| - scrollUntilVisible: |
There was a problem hiding this comment.
Fix swipe direction casing.
Maestro expects lowercase directions; this will no-op and stall the test.
- direction: UP
+ direction: up📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| from: | |
| id: action-sheet-handle | |
| direction: UP | |
| - scrollUntilVisible: | |
| from: | |
| id: action-sheet-handle | |
| direction: up | |
| - scrollUntilVisible: |
🤖 Prompt for AI Agents
In .maestro/tests/room/room.yaml around lines 416 to 419 the swipe direction is
uppercased ("UP") which Maestro ignores; change the direction value to lowercase
("up") and scan nearby steps to ensure any other direction values use lowercase
as well so the gesture executes correctly.
There was a problem hiding this comment.
https://docs.maestro.dev/api-reference/commands/swipe
It accepts uppercase not lowercase
There was a problem hiding this comment.
. The code as written with direction: UP is correct and will work properly.
Thank you for the correction and providing the documentation link. Your implementation is fine as-is.
🐰💡
✏️ Learnings added
Learnt from: Rohit3523
PR: RocketChat/Rocket.Chat.ReactNative#6598
File: .maestro/tests/room/room.yaml:416-419
Timestamp: 2025-09-16T12:13:16.902Z
Learning: Maestro swipe command accepts uppercase direction values: UP, DOWN, LEFT, RIGHT (not lowercase as incorrectly suggested). The official documentation shows examples using uppercase direction values.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
Proposed changes
Working action link: https://github.com/RocketChat/Rocket.Chat.ReactNative/actions/runs/17764602508/job/50486819800
Android:

iOS:

Note: it is failing on iOS
Issue(s)
https://rocketchat.atlassian.net/browse/NATIVE-967
How to test or reproduce
Screenshots
Types of changes
Checklist