appId: ${APP_ID}
---
# Send multiple messages fragment - assumes user is already in a chat conversation
# Generate 10 random messages and send as soon as possible
- runScript: ../scripts/generateRandomMessage.js

- tapOn: 'Write a message...'
- inputText: ${output.randomMessages[0]}
- tapOn: Send
- inputText: ${output.randomMessages[1]}
- tapOn: Send
- inputText: ${output.randomMessages[2]}
- tapOn: Send
- runFlow: ../../../shared/dismiss-keyboard.yml

# Assert all messages were sent
- scrollUntilVisible:
    element: 'You, ${output.randomMessages[0]},.*Sent'
    direction: UP
- scrollUntilVisible:
    element: 'You, ${output.randomMessages[1]},.*Sent'
    direction: DOWN
- scrollUntilVisible:
    element: 'You, ${output.randomMessages[2]},.*Sent'
    direction: DOWN
