|
| 1 | +appId: chat.rocket.reactnative |
| 2 | +name: Ignore User |
| 3 | +onFlowStart: |
| 4 | + - runFlow: '../../helpers/setup.yaml' |
| 5 | + |
| 6 | +--- |
| 7 | +- runFlow: '../../helpers/launch-app.yaml' |
| 8 | + |
| 9 | +- evalScript: ${output.user = output.utils.createUser()} |
| 10 | +- evalScript: ${output.otherUser = output.utils.createUser()} |
| 11 | +- evalScript: ${output.room = output.utils.createRandomRoom(output.user.username, output.user.password)} |
| 12 | + |
| 13 | +- runFlow: |
| 14 | + file: '../../helpers/login.yaml' |
| 15 | + env: |
| 16 | + USERNAME: ${output.user.username} |
| 17 | + PASSWORD: ${output.user.password} |
| 18 | + |
| 19 | +# should go to user info view |
| 20 | +- runFlow: |
| 21 | + file: '../../helpers/search-and-navigate-room.yaml' |
| 22 | + env: |
| 23 | + ROOM: ${output.otherUser.username} |
| 24 | +- runFlow: |
| 25 | + file: './utils/navigate-to-info-view.yaml' |
| 26 | + |
| 27 | +# should block user |
| 28 | +- extendedWaitUntil: |
| 29 | + visible: |
| 30 | + text: 'Block' |
| 31 | + timeout: 60000 |
| 32 | +- tapOn: 'Block' |
| 33 | +- extendedWaitUntil: |
| 34 | + visible: |
| 35 | + text: 'Unblock' |
| 36 | + timeout: 60000 |
| 37 | +- runFlow: '../../helpers/go-back.yaml' |
| 38 | +- extendedWaitUntil: |
| 39 | + visible: |
| 40 | + id: 'room-actions-view' |
| 41 | + timeout: 60000 |
| 42 | +- runFlow: '../../helpers/go-back.yaml' |
| 43 | +- runFlow: |
| 44 | + file: '../../helpers/navigate-to-room.yaml' |
| 45 | + env: |
| 46 | + ROOM: ${output.otherUser.username} |
| 47 | +- extendedWaitUntil: |
| 48 | + visible: |
| 49 | + text: 'This room is blocked' |
| 50 | + timeout: 60000 |
| 51 | + |
| 52 | +# should unblock user |
| 53 | +- runFlow: |
| 54 | + file: './utils/navigate-to-info-view.yaml' |
| 55 | +- extendedWaitUntil: |
| 56 | + visible: |
| 57 | + text: 'Unblock' |
| 58 | + timeout: 60000 |
| 59 | +- tapOn: 'Unblock' |
| 60 | +- extendedWaitUntil: |
| 61 | + visible: |
| 62 | + text: 'Block' |
| 63 | + timeout: 60000 |
| 64 | +- runFlow: '../../helpers/go-back.yaml' |
| 65 | +- extendedWaitUntil: |
| 66 | + visible: |
| 67 | + id: 'room-actions-view' |
| 68 | + timeout: 60000 |
| 69 | +- runFlow: '../../helpers/go-back.yaml' |
| 70 | +- runFlow: |
| 71 | + file: '../../helpers/navigate-to-room.yaml' |
| 72 | + env: |
| 73 | + ROOM: ${output.otherUser.username} |
| 74 | +- extendedWaitUntil: |
| 75 | + visible: |
| 76 | + id: 'message-composer' |
| 77 | + timeout: 60000 |
| 78 | +- runFlow: '../../helpers/go-back.yaml' |
| 79 | + |
| 80 | +# should ignore user from message |
| 81 | +- runFlow: |
| 82 | + file: '../../helpers/search-and-navigate-room.yaml' |
| 83 | + env: |
| 84 | + ROOM: ${output.room.name} |
| 85 | +- evalScript: ${output.utils.sendMessage(output.otherUser.username, output.otherUser.password, output.room._id, 'message-01')} |
| 86 | +- evalScript: ${output.utils.sendMessage(output.otherUser.username, output.otherUser.password, output.room._id, 'message-02')} |
| 87 | +- extendedWaitUntil: |
| 88 | + visible: |
| 89 | + text: ${output.otherUser.username} |
| 90 | + index: 0 |
| 91 | + timeout: 60000 |
| 92 | +- tapOn: ${output.otherUser.username} |
| 93 | +- extendedWaitUntil: |
| 94 | + visible: |
| 95 | + text: 'Ignore' |
| 96 | + childOf: |
| 97 | + id: room-info-view-ignore |
| 98 | + timeout: 60000 |
| 99 | +- tapOn: 'Ignore' |
| 100 | +- extendedWaitUntil: |
| 101 | + visible: |
| 102 | + text: 'Unignore' |
| 103 | + childOf: |
| 104 | + id: room-info-view-ignore |
| 105 | + timeout: 60000 |
| 106 | +- runFlow: '../../helpers/go-back.yaml' |
| 107 | + |
| 108 | +# should tap to display message |
| 109 | +- runFlow: |
| 110 | + file: '../../helpers/search-and-navigate-room.yaml' |
| 111 | + env: |
| 112 | + ROOM: ${output.room.name} |
| 113 | +- extendedWaitUntil: |
| 114 | + visible: |
| 115 | + text: .*Message ignored. Tap to display it.* |
| 116 | + index: 0 |
| 117 | + timeout: 60000 |
| 118 | +- tapOn: .*Message ignored. Tap to display it.* |
| 119 | +- extendedWaitUntil: |
| 120 | + visible: |
| 121 | + text: ${output.otherUser.username} |
| 122 | + index: 0 |
| 123 | + timeout: 60000 |
| 124 | +- extendedWaitUntil: |
| 125 | + visible: |
| 126 | + text: 'message-02' |
| 127 | + index: 0 |
| 128 | + timeout: 60000 |
| 129 | +- extendedWaitUntil: |
| 130 | + visible: |
| 131 | + text: ${output.otherUser.username} |
| 132 | + index: 0 |
| 133 | + timeout: 60000 |
| 134 | +- tapOn: ${output.otherUser.username} |
| 135 | +- extendedWaitUntil: |
| 136 | + visible: |
| 137 | + text: 'Unignore' |
| 138 | + childOf: |
| 139 | + id: room-info-view-ignore |
| 140 | + timeout: 60000 |
| 141 | +- tapOn: 'Unignore' |
| 142 | +- extendedWaitUntil: |
| 143 | + visible: |
| 144 | + text: 'Ignore' |
| 145 | + childOf: |
| 146 | + id: room-info-view-ignore |
| 147 | + timeout: 60000 |
| 148 | +- runFlow: '../../helpers/go-back.yaml' |
| 149 | +- runFlow: |
| 150 | + file: '../../helpers/search-and-navigate-room.yaml' |
| 151 | + env: |
| 152 | + ROOM: ${output.room.name} |
| 153 | +- extendedWaitUntil: |
| 154 | + visible: |
| 155 | + text: 'message-02' |
| 156 | + index: 0 |
| 157 | + timeout: 60000 |
| 158 | + |
| 159 | +# should go to user info view from a DM |
| 160 | +- runFlow: '../../helpers/go-back.yaml' |
| 161 | +- runFlow: |
| 162 | + file: '../../helpers/search-and-navigate-room.yaml' |
| 163 | + env: |
| 164 | + ROOM: ${output.otherUser.username} |
| 165 | +- runFlow: './utils/navigate-to-info-view.yaml' |
| 166 | + |
| 167 | +# should report a user from a DM |
| 168 | +- extendedWaitUntil: |
| 169 | + visible: |
| 170 | + text: 'Report' |
| 171 | + childOf: |
| 172 | + id: room-info-view-warning |
| 173 | + timeout: 60000 |
| 174 | +- tapOn: 'Report' |
| 175 | +- extendedWaitUntil: |
| 176 | + visible: |
| 177 | + id: 'report-user-view' |
| 178 | + timeout: 60000 |
| 179 | +- extendedWaitUntil: |
| 180 | + visible: |
| 181 | + id: 'report-user-view-input' |
| 182 | + timeout: 60000 |
| 183 | +- tapOn: |
| 184 | + id: 'report-user-view-input' |
| 185 | +- inputText: 'e2e test' |
| 186 | +- extendedWaitUntil: |
| 187 | + visible: |
| 188 | + id: 'report-user-view-submit' |
| 189 | + timeout: 60000 |
| 190 | +- hideKeyboard |
| 191 | +- tapOn: |
| 192 | + id: 'report-user-view-submit' |
| 193 | +- extendedWaitUntil: |
| 194 | + visible: |
| 195 | + id: 'room-view-title-${output.otherUser.username}' |
| 196 | + timeout: 60000 |
| 197 | + |
| 198 | +# should go to user info view from a channel |
| 199 | +- runFlow: '../../helpers/go-back.yaml' |
| 200 | +- runFlow: |
| 201 | + file: '../../helpers/search-and-navigate-room.yaml' |
| 202 | + env: |
| 203 | + ROOM: ${output.room.name} |
| 204 | +- extendedWaitUntil: |
| 205 | + visible: |
| 206 | + text: ${output.otherUser.username} |
| 207 | + timeout: 60000 |
| 208 | +- tapOn: ${output.otherUser.username} |
| 209 | +- extendedWaitUntil: |
| 210 | + visible: |
| 211 | + id: 'room-info-view' |
| 212 | + timeout: 60000 |
| 213 | + |
| 214 | +# should report a user from a channel |
| 215 | +- extendedWaitUntil: |
| 216 | + visible: |
| 217 | + text: 'Report' |
| 218 | + childOf: |
| 219 | + id: room-info-view-warning |
| 220 | +- tapOn: 'Report' |
| 221 | +- extendedWaitUntil: |
| 222 | + visible: |
| 223 | + id: 'report-user-view' |
| 224 | + timeout: 60000 |
| 225 | +- extendedWaitUntil: |
| 226 | + visible: |
| 227 | + id: 'report-user-view-input' |
| 228 | + timeout: 60000 |
| 229 | +- tapOn: |
| 230 | + id: 'report-user-view-input' |
| 231 | +- inputText: 'e2e test' |
| 232 | +- hideKeyboard |
| 233 | +- extendedWaitUntil: |
| 234 | + visible: |
| 235 | + id: 'report-user-view-submit' |
| 236 | + timeout: 60000 |
| 237 | +- tapOn: |
| 238 | + id: 'report-user-view-submit' |
| 239 | +- extendedWaitUntil: |
| 240 | + visible: |
| 241 | + id: 'room-view-title-${output.room.name}' |
| 242 | + timeout: 60000 |
0 commit comments