appId: ${APP_ID}
---
# React to message fragment - assumes user is already in a chat conversation
# Send a message first
- tapOn: 'Write a message...'
- inputText: Testing reactions
- tapOn: Send
- runScript: ../scripts/getTime.js

# React from quick reactions menu
- scrollUntilVisible:
    element: 'You, Testing reactions, ${output.time}, Sent'
    direction: DOWN
- longPressOn: .*Testing reactions.*
- assertVisible: 'Reactions'
- tapOn: 'React with thumbsup'
- assertVisible:
    id: 'reaction-👍'
    below: .*${output.time}.*
- longPressOn: .*Testing reactions.*
- tapOn: 'React with heart'
- assertVisible:
    id: 'reaction-❤️'
    below: .*${output.time}.*

# Remove all reactions
- tapOn:
    id: 'reaction-👍'
    below: .*Testing reactions.*
- assertNotVisible:
    id: 'reaction-👍'
    below: .*Testing reactions.*
- tapOn:
    id: 'reaction-❤️'
    below: .*Testing reactions.*
- assertNotVisible:
    id: 'reaction-❤️'
    below: .*Testing reactions.*
- assertNotVisible:
    id: 'reaction-container'
    below: .*Testing reactions.*

# React from reaction dialog
- longPressOn: .*Testing reactions.*
- tapOn: 'Open reaction picker'
- assertVisible: 'Reactions'
- tapOn: 'Search'
- inputText: 'Fire'
- assertVisible: 'React with 🔥'
- tapOn: 'React with 🔥'
- assertNotVisible: 'Reactions'
- scrollUntilVisible:
    element: 'You, Testing reactions, ${output.time}, Sent'
    direction: DOWN
- assertVisible:
    id: 'reaction-🔥'
    below: .*Testing reactions.*
