|
| 1 | +appId: chat.rocket.reactnative |
| 2 | +name: Message Markdown |
| 3 | +jsEngine: graaljs |
| 4 | +onFlowStart: |
| 5 | + - runFlow: '../../helpers/setup.yaml' |
| 6 | +onFlowComplete: |
| 7 | + - evalScript: ${output.utils.deleteCreatedUsers()} |
| 8 | +tags: |
| 9 | + - test-12 |
| 10 | + |
| 11 | +--- |
| 12 | +- evalScript: ${output.user = output.utils.createUser()} |
| 13 | + |
| 14 | +- runFlow: |
| 15 | + file: '../../helpers/login-with-deeplink.yaml' |
| 16 | + env: |
| 17 | + USERNAME: ${output.user.username} |
| 18 | + PASSWORD: ${output.user.password} |
| 19 | +- runFlow: |
| 20 | + file: '../../helpers/search-and-navigate-room.yaml' |
| 21 | + env: |
| 22 | + ROOM: 'maestro-message-clickable-test' |
| 23 | + |
| 24 | +- extendedWaitUntil: |
| 25 | + visible: |
| 26 | + text: 'Link with text https://www.rocket.chat' |
| 27 | + timeout: 60000 |
| 28 | +- extendedWaitUntil: |
| 29 | + visible: |
| 30 | + text: '.*detox-public*.' |
| 31 | + timeout: 60000 |
| 32 | +- extendedWaitUntil: |
| 33 | + visible: |
| 34 | + text: '.*e2e_admin*.' |
| 35 | + timeout: 60000 |
| 36 | +- extendedWaitUntil: |
| 37 | + visible: |
| 38 | + text: '.*Message with thread*.' |
| 39 | + timeout: 60000 |
| 40 | +- extendedWaitUntil: |
| 41 | + visible: |
| 42 | + id: 'message-thread-button-message with thread' |
| 43 | + timeout: 60000 |
| 44 | + |
| 45 | +# Tap on detox-public mention to open room info |
| 46 | +- tapOn: |
| 47 | + text: '.*detox-public*.' |
| 48 | + |
| 49 | +# Verify room info view is shown |
| 50 | +- extendedWaitUntil: |
| 51 | + visible: |
| 52 | + id: 'room-info-view' |
| 53 | + timeout: 60000 |
| 54 | + |
| 55 | +# Verify room name is visible in room info |
| 56 | +- assertVisible: |
| 57 | + text: '.*detox-public.*' |
| 58 | + |
| 59 | +# Go back to room |
| 60 | +- tapOn: |
| 61 | + id: custom-header-back |
| 62 | + |
| 63 | +# Wait for room view to be visible again |
| 64 | +- extendedWaitUntil: |
| 65 | + visible: |
| 66 | + id: 'room-view-title-maestro-message-clickable-test' |
| 67 | + timeout: 60000 |
| 68 | + |
| 69 | +# Tap on the URL link to open alert |
| 70 | +- runFlow: |
| 71 | + when: |
| 72 | + platform: Android |
| 73 | + commands: |
| 74 | + - tapOn: |
| 75 | + text: '.*https://www.rocket.chat.*' |
| 76 | +- runFlow: |
| 77 | + when: |
| 78 | + platform: iOS |
| 79 | + commands: |
| 80 | + - tapOn: |
| 81 | + point: 66%,66% |
| 82 | + |
| 83 | +# Verify alert is shown with the link |
| 84 | +- extendedWaitUntil: |
| 85 | + visible: |
| 86 | + text: '.*Link Pressed*.' |
| 87 | + timeout: 10000 |
| 88 | + |
| 89 | +- assertVisible: |
| 90 | + text: '.*https://www.rocket.chat*.' |
| 91 | + |
| 92 | +# Dismiss the alert |
| 93 | +- tapOn: |
| 94 | + text: 'OK' |
| 95 | + optional: true |
| 96 | + |
| 97 | +# Long press on the link to copy to clipboard |
| 98 | +- runFlow: |
| 99 | + when: |
| 100 | + platform: Android |
| 101 | + commands: |
| 102 | + - longPressOn: |
| 103 | + text: '.*https://www.rocket.chat.*' |
| 104 | +- runFlow: |
| 105 | + when: |
| 106 | + platform: iOS |
| 107 | + commands: |
| 108 | + - longPressOn: |
| 109 | + point: 66%,66% |
| 110 | + |
| 111 | +# Verify clipboard has the link alert |
| 112 | +- extendedWaitUntil: |
| 113 | + visible: |
| 114 | + text: '.*Link Long Pressed*.' |
| 115 | + timeout: 10000 |
| 116 | + |
| 117 | +- assertVisible: |
| 118 | + text: '.*https://www.rocket.chat*.' |
| 119 | + |
| 120 | +# Dismiss the alert |
| 121 | +- tapOn: |
| 122 | + text: 'OK' |
| 123 | + optional: true |
| 124 | + |
| 125 | +# Tap on e2e_admin mention to open user info |
| 126 | +- tapOn: |
| 127 | + text: '.*e2e_admin*.' |
| 128 | + |
| 129 | +# Verify user info view is shown |
| 130 | +- extendedWaitUntil: |
| 131 | + visible: |
| 132 | + text: '.*User info*.' |
| 133 | + timeout: 60000 |
| 134 | + |
| 135 | +# Verify username is visible in user info |
| 136 | +- assertVisible: |
| 137 | + text: '.*e2e_admin.*' |
| 138 | + |
| 139 | +# Go back to room |
| 140 | +- tapOn: |
| 141 | + id: custom-header-back |
| 142 | + |
| 143 | +# Wait for room view to be visible again |
| 144 | +- extendedWaitUntil: |
| 145 | + visible: |
| 146 | + id: 'room-view-title-maestro-message-clickable-test' |
| 147 | + timeout: 60000 |
| 148 | + |
| 149 | +# Tap on message with thread to open thread room |
| 150 | +- tapOn: |
| 151 | + text: '.*Message with thread*.' |
| 152 | + |
| 153 | +# Verify thread room view is opened with the correct id |
| 154 | +- extendedWaitUntil: |
| 155 | + visible: |
| 156 | + id: 'room-view-title-message with thread' |
| 157 | + timeout: 60000 |
| 158 | + |
| 159 | +# Go back to main room |
| 160 | +- tapOn: |
| 161 | + id: header-back |
| 162 | + |
| 163 | +# Wait for room view to be visible again |
| 164 | +- extendedWaitUntil: |
| 165 | + visible: |
| 166 | + id: 'room-view-title-maestro-message-clickable-test' |
| 167 | + timeout: 60000 |
| 168 | + |
| 169 | +# Tap on "View thread" button |
| 170 | +- tapOn: |
| 171 | + id: 'message-thread-button-message with thread' |
| 172 | + |
| 173 | +# Verify thread room view is opened |
| 174 | +- extendedWaitUntil: |
| 175 | + visible: |
| 176 | + id: 'room-view-title-message with thread' |
| 177 | + timeout: 60000 |
| 178 | + |
| 179 | +# Go back to main room |
| 180 | +- tapOn: |
| 181 | + id: header-back |
| 182 | + |
| 183 | +# Wait for room view to be visible again |
| 184 | +- extendedWaitUntil: |
| 185 | + visible: |
| 186 | + id: 'room-view-title-maestro-message-clickable-test' |
| 187 | + timeout: 60000 |
| 188 | + |
| 189 | +# Now tap on a message within the thread |
| 190 | +- tapOn: |
| 191 | + text: '.*a message in thread*.' |
| 192 | + |
| 193 | +# Verify thread room view remains (clicking message in thread stays in thread) |
| 194 | +- extendedWaitUntil: |
| 195 | + visible: |
| 196 | + id: 'room-view-title-message with thread' |
| 197 | + timeout: 60000 |
0 commit comments