Skip to content
4 changes: 2 additions & 2 deletions .github/scripts/__tests__/fixtures/scenario-catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@
},
{
"id": "C3",
"name": "shared saga fans wide: sagas/rooms.js -> twelve flows",
"name": "shared saga fans wide: sagas/rooms.js -> thirteen flows",
"category": "real-domain",
"input": { "diff": ["app/sagas/rooms.js"] },
"expectedShards": [1, 5, 6, 7, 8, 11, 12, 13, 14],
"expectedShards": [1, 3, 5, 6, 7, 8, 11, 12, 13, 14],
"expectedShouldRun": true,
"assertableIn": ["map", "ci"]
},
Expand Down
3 changes: 2 additions & 1 deletion .maestro/scripts/data-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,5 +263,6 @@ output.utils = {
post,
login,
getDeepLink,
createDM
createDM,
sleep
};
55 changes: 55 additions & 0 deletions .maestro/tests/room/messages-received-while-offline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
appId: ${APP_ID}
name: Messages received while device is offline
onFlowStart:
- runFlow: '../../helpers/setup.yaml'
onFlowComplete:
- setAirplaneMode: disabled
- stopApp: ${APP_ID}
- evalScript: ${output.utils.deleteCreatedUsers()}
tags:
- test-3
- android-only

---
- evalScript: ${output.user = output.utils.createUser()}
- evalScript: ${output.sender = output.utils.createUser()}
- evalScript: ${output.tag = 'offline-' + output.random(6)}
- evalScript: ${output.utils.sendMessage(output.sender.username, output.sender.password, '@' + output.user.username, output.tag + '-baseline')}

- runFlow:
file: '../../helpers/login-with-deeplink.yaml'
env:
USERNAME: ${output.user.username}
PASSWORD: ${output.user.password}
CLEAR_STATE: true
- runFlow:
file: '../../helpers/navigate-to-room.yaml'
env:
ROOM: ${output.sender.username}
- extendedWaitUntil:
visible:
id: 'message-content-${output.tag}-baseline'
timeout: 60000

# should deliver every message that arrived while the device had no network
- setAirplaneMode: enabled
- evalScript: ${output.utils.sendMessage(output.sender.username, output.sender.password, '@' + output.user.username, output.tag + '-1')}
- evalScript: ${output.utils.sendMessage(output.sender.username, output.sender.password, '@' + output.user.username, output.tag + '-2')}
- evalScript: ${output.utils.sendMessage(output.sender.username, output.sender.password, '@' + output.user.username, output.tag + '-3')}
- evalScript: ${output.utils.sleep(5000)}
- assertNotVisible:
id: 'message-content-${output.tag}-1'
- assertNotVisible:
id: 'message-content-${output.tag}-2'
- assertNotVisible:
id: 'message-content-${output.tag}-3'
- setAirplaneMode: disabled

- extendedWaitUntil:
visible:
id: 'message-content-${output.tag}-3'
timeout: 120000
- assertVisible:
id: 'message-content-${output.tag}-1'
- assertVisible:
id: 'message-content-${output.tag}-2'
Comment thread
coderabbitai[bot] marked this conversation as resolved.
12 changes: 12 additions & 0 deletions .sniffler/test-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,18 @@
"test": ".maestro/tests/room/mark-as-unread.yaml",
"dependsOn": ["app/views/RoomsListView/**", "app/containers/MessageActions/**", "app/sagas/rooms.js"]
},
{
"test": ".maestro/tests/room/messages-received-while-offline.yaml",
"dependsOn": [
"app/lib/services/sdk.ts",
"app/lib/services/socketHealth.ts",
"app/lib/methods/loadMissedMessages.ts",
"app/lib/methods/subscriptions/room.ts",
"app/lib/methods/subscribeRooms.ts",
"app/sagas/rooms.js",
"app/views/RoomView/**"
]
},
{
"test": ".maestro/tests/room/message-markdown-click.yaml",
"dependsOn": ["app/views/RoomView/**", "app/containers/markdown/**", "app/sagas/room.js"]
Expand Down
Loading