appId: ${APP_ID}
---
# Edit message fragment - assumes user is already in a chat conversation
# Send a message first
- tapOn: 'Write a message...'
- inputText: Before edit
- tapOn: Send
- runScript: ../scripts/getTime.js
- scrollUntilVisible:
    element: 'You, Before edit, ${output.time}, Sent'
    direction: DOWN

# Try to edit
- longPressOn: 'You, Before edit, ${output.time}, Sent'
- assertVisible: 'Message menu'
- tapOn: 'Edit'
- assertNotVisible: 'Message menu'
- assertVisible: 'Discard edit'
- assertVisible: 'Confirm edit'

# Cancel edition
- tapOn: 'Discard edit'
- assertNotVisible: 'Discard edit'
- assertNotVisible: 'Confirm edit'

# Try to edit (2)
- scrollUntilVisible:
    element: 'You, Before edit, ${output.time}, Sent'
    direction: DOWN
- longPressOn: 'You, Before edit, ${output.time}, Sent'
- assertVisible: 'Message menu'
- tapOn: 'Edit'
- eraseText
- inputText: After edit
- tapOn: 'Confirm edit'
- assertNotVisible: 'Confirm edit'
- scrollUntilVisible:
    element: 'You, After edit, ${output.time}, Sent, Edited'
    direction: DOWN
