Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .maestro/tests/room/create-room.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ onFlowComplete:
- evalScript: ${output.utils.deleteCreatedUsers()}

---
- runFlow: ../../helpers/launch-app.yaml
- runFlow: ../../helpers/login.yaml
- runFlow: '../../helpers/launch-app.yaml'
- runFlow: '../../helpers/login.yaml'
Comment on lines +9 to +10
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

🧩 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."
fi

Length 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."
fi

Length 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.

Suggested change
- 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.


- extendedWaitUntil:
visible:
Expand Down
242 changes: 242 additions & 0 deletions .maestro/tests/room/ignoreuser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
appId: chat.rocket.reactnative
name: Ignore User
onFlowStart:
- runFlow: '../../helpers/setup.yaml'

---
- runFlow: '../../helpers/launch-app.yaml'

- evalScript: ${output.user = output.utils.createUser()}
- evalScript: ${output.otherUser = output.utils.createUser()}
- evalScript: ${output.room = output.utils.createRandomRoom(output.user.username, output.user.password)}

- runFlow:
file: '../../helpers/login.yaml'
env:
USERNAME: ${output.user.username}
PASSWORD: ${output.user.password}

# should go to user info view
- runFlow:
file: '../../helpers/search-and-navigate-room.yaml'
env:
ROOM: ${output.otherUser.username}
- runFlow:
file: './utils/navigate-to-info-view.yaml'

# should block user
- extendedWaitUntil:
visible:
text: 'Block'
timeout: 60000
- tapOn: 'Block'
- extendedWaitUntil:
visible:
text: 'Unblock'
timeout: 60000
- runFlow: '../../helpers/go-back.yaml'
- extendedWaitUntil:
visible:
id: 'room-actions-view'
timeout: 60000
- runFlow: '../../helpers/go-back.yaml'
- runFlow:
file: '../../helpers/navigate-to-room.yaml'
env:
ROOM: ${output.otherUser.username}
- extendedWaitUntil:
visible:
text: 'This room is blocked'
timeout: 60000

# should unblock user
- runFlow:
file: './utils/navigate-to-info-view.yaml'
- extendedWaitUntil:
visible:
text: 'Unblock'
timeout: 60000
- tapOn: 'Unblock'
- extendedWaitUntil:
visible:
text: 'Block'
timeout: 60000
- runFlow: '../../helpers/go-back.yaml'
- extendedWaitUntil:
visible:
id: 'room-actions-view'
timeout: 60000
- runFlow: '../../helpers/go-back.yaml'
- runFlow:
file: '../../helpers/navigate-to-room.yaml'
env:
ROOM: ${output.otherUser.username}
- extendedWaitUntil:
visible:
id: 'message-composer'
timeout: 60000
- runFlow: '../../helpers/go-back.yaml'

# should ignore user from message
- runFlow:
file: '../../helpers/search-and-navigate-room.yaml'
env:
ROOM: ${output.room.name}
- evalScript: ${output.utils.sendMessage(output.otherUser.username, output.otherUser.password, output.room._id, 'message-01')}
- evalScript: ${output.utils.sendMessage(output.otherUser.username, output.otherUser.password, output.room._id, 'message-02')}
- extendedWaitUntil:
visible:
text: ${output.otherUser.username}
index: 0
timeout: 60000
- tapOn: ${output.otherUser.username}
- extendedWaitUntil:
visible:
text: 'Ignore'
childOf:
id: room-info-view-ignore
timeout: 60000
- tapOn: 'Ignore'
- extendedWaitUntil:
visible:
text: 'Unignore'
childOf:
id: room-info-view-ignore
timeout: 60000
- runFlow: '../../helpers/go-back.yaml'

# should tap to display message
- runFlow:
file: '../../helpers/search-and-navigate-room.yaml'
env:
ROOM: ${output.room.name}
- extendedWaitUntil:
visible:
text: .*Message ignored. Tap to display it.*
index: 0
timeout: 60000
- tapOn: .*Message ignored. Tap to display it.*
- extendedWaitUntil:
visible:
text: ${output.otherUser.username}
index: 0
timeout: 60000
- extendedWaitUntil:
visible:
text: 'message-02'
index: 0
timeout: 60000
- extendedWaitUntil:
visible:
text: ${output.otherUser.username}
index: 0
timeout: 60000
- tapOn: ${output.otherUser.username}
- extendedWaitUntil:
visible:
text: 'Unignore'
childOf:
id: room-info-view-ignore
timeout: 60000
- tapOn: 'Unignore'
- extendedWaitUntil:
visible:
text: 'Ignore'
childOf:
id: room-info-view-ignore
timeout: 60000
- runFlow: '../../helpers/go-back.yaml'
- runFlow:
file: '../../helpers/search-and-navigate-room.yaml'
env:
ROOM: ${output.room.name}
- extendedWaitUntil:
visible:
text: 'message-02'
index: 0
timeout: 60000

# should go to user info view from a DM
- runFlow: '../../helpers/go-back.yaml'
- runFlow:
file: '../../helpers/search-and-navigate-room.yaml'
env:
ROOM: ${output.otherUser.username}
- runFlow: './utils/navigate-to-info-view.yaml'

# should report a user from a DM
- extendedWaitUntil:
visible:
text: 'Report'
childOf:
id: room-info-view-warning
timeout: 60000
- tapOn: 'Report'
- extendedWaitUntil:
visible:
id: 'report-user-view'
timeout: 60000
- extendedWaitUntil:
visible:
id: 'report-user-view-input'
timeout: 60000
- tapOn:
id: 'report-user-view-input'
- inputText: 'e2e test'
- extendedWaitUntil:
visible:
id: 'report-user-view-submit'
timeout: 60000
- hideKeyboard
- tapOn:
id: 'report-user-view-submit'
- extendedWaitUntil:
visible:
id: 'room-view-title-${output.otherUser.username}'
timeout: 60000

# should go to user info view from a channel
- runFlow: '../../helpers/go-back.yaml'
- runFlow:
file: '../../helpers/search-and-navigate-room.yaml'
env:
ROOM: ${output.room.name}
- extendedWaitUntil:
visible:
text: ${output.otherUser.username}
timeout: 60000
- tapOn: ${output.otherUser.username}
- extendedWaitUntil:
visible:
id: 'room-info-view'
timeout: 60000

# should report a user from a channel
- extendedWaitUntil:
visible:
text: 'Report'
childOf:
id: room-info-view-warning
- tapOn: 'Report'
- extendedWaitUntil:
visible:
id: 'report-user-view'
timeout: 60000
- extendedWaitUntil:
visible:
id: 'report-user-view-input'
timeout: 60000
- tapOn:
id: 'report-user-view-input'
- inputText: 'e2e test'
- hideKeyboard
- extendedWaitUntil:
visible:
id: 'report-user-view-submit'
timeout: 60000
- tapOn:
id: 'report-user-view-submit'
- extendedWaitUntil:
visible:
id: 'room-view-title-${output.room.name}'
timeout: 60000
108 changes: 108 additions & 0 deletions .maestro/tests/room/share-message.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
appId: chat.rocket.reactnative
name: Share Message
onFlowStart:
- runFlow: '../../helpers/setup.yaml'

---
- runFlow: '../../helpers/launch-app.yaml'

- evalScript: ${output.user = output.utils.createUser()}
- evalScript: ${output.otherUser = output.utils.createUser()}
- evalScript: ${output.room = output.utils.createRandomRoom(output.user.username, output.user.password)}

- runFlow:
file: '../../helpers/login.yaml'
env:
USERNAME: ${output.user.username}
PASSWORD: ${output.user.password}

# Start a DM with other user
- runFlow:
file: '../../helpers/search-and-navigate-room.yaml'
env:
ROOM: ${output.otherUser.username}
- runFlow:
file: '../../helpers/send-message.yaml'
env:
message: 'Hello user'
- runFlow: '../../helpers/go-back.yaml'

# should navigate to room and send a message
- runFlow:
file: '../../helpers/search-and-navigate-room.yaml'
env:
ROOM: ${output.room.name}
- runFlow:
file: '../../helpers/send-message.yaml'
env:
message: 'Hello room'

# should open the action sheet and tap Forward
- extendedWaitUntil:
visible:
text: 'Hello room'
index: 0
timeout: 60000
- longPressOn: 'Hello room'
- extendedWaitUntil:
visible:
id: 'action-sheet'
timeout: 60000
- extendedWaitUntil:
visible:
text: 'Forward'
timeout: 60000
- tapOn: 'Forward'

# should forward the message
- extendedWaitUntil:
visible:
id: 'forward-message-view'
timeout: 60000
- tapOn: 'Select'
- extendedWaitUntil:
visible:
id: 'multi-select-search'
timeout: 60000
- tapOn:
id: 'multi-select-search'
- inputText: ${output.otherUser.username}
- hideKeyboard
- extendedWaitUntil:
visible:
id: multi-select-item-${output.otherUser.username.toLowerCase()}
timeout: 60000
- tapOn:
id: multi-select-item-${output.otherUser.username.toLowerCase()}
- swipe:
id: 'action-sheet-handle'
direction: DOWN
- extendedWaitUntil:
notVisible:
id: 'multi-select-search'
timeout: 60000
- extendedWaitUntil:
visible:
id: 'forward-message-view-send'
timeout: 60000
- tapOn:
id: 'forward-message-view-send'
- extendedWaitUntil:
visible:
id: 'room-view-title-${output.room.name}'
timeout: 60000

# should go to otherUser DM and verify if exist both messages
- runFlow: '../../helpers/go-back.yaml'
- runFlow:
file: '../../helpers/search-and-navigate-room.yaml'
env:
ROOM: ${output.otherUser.username}
- extendedWaitUntil:
visible:
text: 'Hello user'
timeout: 60000
- extendedWaitUntil:
visible:
text: 'Hello room'
timeout: 60000
24 changes: 24 additions & 0 deletions .maestro/tests/room/utils/navigate-to-info-view.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
appId: chat.rocket.reactnative
name: Navigate to info view
tags:
- 'util'

---
- extendedWaitUntil:
visible:
id: room-header
timeout: 60000
- tapOn:
id: room-header
- extendedWaitUntil:
visible:
id: room-actions-view
timeout: 60000
- assertVisible:
id: room-actions-info
- tapOn:
id: room-actions-info
- extendedWaitUntil:
visible:
id: room-info-view
timeout: 60000
Loading