test: 2nd set of room test in maestro#6606
Conversation
…eactNative into chore-maestro-room-test
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (8)
.maestro/tests/room/share-message.yaml (4)
91-93: Use expression interpolation for dynamic id to avoid literal '${...}' rendering.Safer to build the id via eval-style interpolation (consistent with create-room.yaml).
- id: 'room-view-title-${output.room.name}' + id: ${'room-view-title-' + output.room.name}
72-77: Quote/interpolate complex id for reliability.Parentheses and braces in unquoted YAML scalars can be finicky across formatters. Build the id explicitly.
- id: multi-select-item-${output.otherUser.username.toLowerCase()} + id: ${'multi-select-item-' + output.otherUser.username.toLowerCase()}
41-47: Stabilize long-press on iOS.iOS can require a longer press. Specify duration to reduce flakes.
-- longPressOn: 'Hello room' +- longPressOn: + text: 'Hello room' + durationMs: 800
1-18: Add teardown to avoid user/room leakage across runs.Mirror create-room.yaml’s cleanup so tests don’t accumulate users/rooms.
appId: chat.rocket.reactnative name: Share Message onFlowStart: - runFlow: '../../helpers/setup.yaml' +onFlowComplete: + - evalScript: ${output.utils.deleteCreatedUsers()} ---.maestro/tests/room/ignoreuser.yaml (4)
114-121: Quote regex and tap targets to avoid YAML/anchor parsing issues.Unquoted patterns with
*can be parsed as YAML aliases. Quote them.- text: .*Message ignored. Tap to display it.* + text: '.*Message ignored. Tap to display it.*' ... -- tapOn: .*Message ignored. Tap to display it.* +- tapOn: '.*Message ignored. Tap to display it.*'Also applies to: 118-119
1-18: Add teardown for created users/room.Ensure artifacts are cleaned to keep CI stable.
appId: chat.rocket.reactnative name: Ignore User onFlowStart: - runFlow: '../../helpers/setup.yaml' +onFlowComplete: + - evalScript: ${output.utils.deleteCreatedUsers()} ---
27-37: iOS flake guard: allow alternative labels or add small waits if needed.If iOS failures are due to timing or label differences, consider a brief wait before tapping and/or matching by id when available.
- - tapOn: 'Block' + - extendedWaitUntil: + visible: + text: 'Block' + timeout: 60000 + - tapOn: 'Block'Apply similarly for 'Unblock'.
Also applies to: 55-64
165-175: Prefer id-based selectors for “Report” in warning area.Using childOf is good; if there are multiple “Report” strings on screen, consider tapping by id to reduce ambiguity.
If available, replace:
- text: 'Report' + childOf: id: room-info-view-warning
with:- id: 'room-info-view-warning-report'
Also applies to: 214-221
📜 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 (4)
.maestro/tests/room/create-room.yaml(1 hunks).maestro/tests/room/ignoreuser.yaml(1 hunks).maestro/tests/room/share-message.yaml(1 hunks).maestro/tests/room/utils/navigate-to-info-view.yaml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.maestro/tests/room/create-room.yaml
[error] 8-8: syntax error: expected , but found '-'
(syntax)
🪛 GitHub Actions: Format Code with Prettier
.maestro/tests/room/create-room.yaml
[error] 1-1: YAML syntax error: A collection cannot be both a mapping and a sequence (1:1) in .maestro/tests/room/create-room.yaml while running yarn prettier --write .
🔇 Additional comments (2)
.maestro/tests/room/utils/navigate-to-info-view.yaml (1)
1-25: Nice reusable util flow.Looks correct and platform-agnostic.
Please confirm IDs are stable on both platforms: room-header, room-actions-view, room-actions-info, room-info-view.
.maestro/tests/room/ignoreuser.yaml (1)
80-107: Good coverage of ignore/unignore UX.Flow reads well and asserts both masked and revealed states.
If iOS is still flaky here, try adding index qualifiers to “Ignore/Unignore” taps or short
pause: 300before opening the info view.Also applies to: 108-158
| - runFlow: '../../helpers/launch-app.yaml' | ||
| - runFlow: '../../helpers/login.yaml' |
There was a problem hiding this comment.
🧩 Analysis chain
Fix YAML doc start to resolve parse errors.
Root mixes a mapping (metadata) and a sequence (steps). Insert the YAML document separator before the first step. This will also fix the Prettier/YAMLlint failures.
Apply:
- - runFlow: '../../helpers/launch-app.yaml'
- - runFlow: '../../helpers/login.yaml'
+---
+- runFlow: '../../helpers/launch-app.yaml'
+- runFlow: '../../helpers/login.yaml'Run to confirm no syntax errors remain:
🏁 Script executed:
#!/bin/bash
rg -n '^---$' .maestro/tests/room/create-room.yaml
node -e "require('yaml').parse(require('fs').readFileSync('.maestro/tests/room/create-room.yaml','utf8')); console.log('YAML OK')"Length of output: 830
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file=".maestro/tests/room/create-room.yaml"
if [ ! -f "$file" ]; then
echo "MISSING:$file"
exit 0
fi
echo "=== FILE PREVIEW ($file) ==="
nl -ba "$file" | sed -n '1,200p'
echo
echo "=== YAML DOCUMENT SEPARATORS ('---') ==="
rg -n '^---\s*$' "$file" || true
echo
echo "=== FIRST NON-EMPTY LINE ==="
awk 'NF{print NR \":\" $0; exit}' "$file"
echo
echo "=== LINES STARTING WITH DASH AT COLUMN 1 (top-level sequence items) ==="
rg -n '^\-' "$file" || true
echo
first_nonblank=$(awk 'NF{print $0; exit}' "$file")
if [[ "${first_nonblank:0:1}" == "-" ]]; then
echo "INFERENCE: file begins with a sequence (first non-empty line starts with '-')"
else
echo "INFERENCE: file begins with a mapping (first non-empty line does NOT start with '-')"
fi
# If file begins with mapping and top-level dashes exist and there is no doc separator, flag mixed root.
has_docsep=$(rg -n '^---\s*$' "$file" || true)
has_toplevel_dashes=$(rg -n '^\-' "$file" || true)
if [[ "${first_nonblank:0:1}" != "-" ]] && [[ -n "$has_toplevel_dashes" ]] && [[ -z "$has_docsep" ]]; then
echo
echo "RESULT: Detected mapping at top followed by a top-level sequence and NO document separator — root is mixed. Inserting '---' before the first top-level '-' will fix parsing."
else
echo
echo "RESULT: No mixed root detected, or document separator already present."
fiLength of output: 101
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file=".maestro/tests/room/create-room.yaml"
if [ ! -f "$file" ]; then
echo "MISSING:$file"
exit 0
fi
echo "=== FILE PREVIEW ($file) ==="
awk '{printf "%5d: %s\n", NR, $0}' "$file" | head -n 200
echo
echo "=== YAML DOCUMENT SEPARATORS ('---') ==="
rg -n '^---\s*$' "$file" || true
echo
echo "=== FIRST NON-EMPTY LINE ==="
awk 'NF{print NR \":\" $0; exit}' "$file"
echo
echo "=== LINES STARTING WITH DASH AT COLUMN 1 (top-level sequence items) ==="
rg -n '^\-' "$file" || true
echo
first_nonblank=$(awk 'NF{print $0; exit}' "$file")
if [[ "${first_nonblank:0:1}" == "-" ]]; then
echo "INFERENCE: file begins with a sequence (first non-empty line starts with '-')"
else
echo "INFERENCE: file begins with a mapping (first non-empty line does NOT start with '-')"
fi
has_docsep=$(rg -n '^---\s*$' "$file" || true)
has_toplevel_dashes=$(rg -n '^\-' "$file" || true)
if [[ "${first_nonblank:0:1}" != "-" ]] && [[ -n "$has_toplevel_dashes" ]] && [[ -z "$has_docsep" ]]; then
echo
echo "RESULT: Detected mapping at top followed by a top-level sequence and NO document separator — root is mixed. Inserting '---' before the first top-level '-' will fix parsing."
else
echo
echo "RESULT: No mixed root detected, or document separator already present."
fiLength of output: 6049
Insert YAML document separator ('---') before the top-level steps
Root mixes a mapping (metadata: appId, name, onFlowStart/onFlowComplete) and a top-level sequence (steps). Insert '---' before line 8 (before "- runFlow: '../../helpers/launch-app.yaml'") to separate documents and fix YAML/Prettier/YAMLLint parse errors.
Apply:
- - runFlow: '../../helpers/launch-app.yaml'
- - runFlow: '../../helpers/login.yaml'
+---
+- runFlow: '../../helpers/launch-app.yaml'
+- runFlow: '../../helpers/login.yaml'📝 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.
| - runFlow: '../../helpers/launch-app.yaml' | |
| - runFlow: '../../helpers/login.yaml' | |
| --- | |
| - runFlow: '../../helpers/launch-app.yaml' | |
| - runFlow: '../../helpers/login.yaml' |
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 8-8: syntax error: expected , but found '-'
(syntax)
🤖 Prompt for AI Agents
.maestro/tests/room/create-room.yaml around lines 8 to 9: the file mixes a
mapping and a top-level sequence which causes YAML parse/lint errors; insert a
YAML document separator line '---' immediately before line 8 (i.e., before the
first "- runFlow: '../../helpers/launch-app.yaml'") so the metadata mapping and
the steps sequence are split into two documents, then ensure
indentation/formatting of the steps remains unchanged.
Proposed changes
This PR migrates the following room test to Maestro
Working action link: https://github.com/RocketChat/Rocket.Chat.ReactNative/actions/runs/17772522243
Android:

iOS:

Note: Both tests are failing on iOS and i will fix it in future PR
Issue(s)
https://rocketchat.atlassian.net/browse/NATIVE-967
How to test or reproduce
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit
New Features
Tests
Style