|
| 1 | +appId: chat.rocket.reactnative |
| 2 | +name: Create DM Group |
| 3 | +onFlowStart: |
| 4 | + - runFlow: '../../helpers/setup.yaml' |
| 5 | +onFlowComplete: |
| 6 | + - evalScript: ${output.utils.deleteCreatedUsers()} |
| 7 | + |
| 8 | +--- |
| 9 | +- runFlow: '../../helpers/launch-app.yaml' |
| 10 | + |
| 11 | +- evalScript: ${output.user = output.utils.createUser()} |
| 12 | +- evalScript: ${output.otherUser = output.utils.createUser()} |
| 13 | + |
| 14 | +- runFlow: |
| 15 | + file: '../../helpers/login.yaml' |
| 16 | + env: |
| 17 | + USERNAME: ${output.user.username} |
| 18 | + PASSWORD: ${output.user.password} |
| 19 | +- extendedWaitUntil: |
| 20 | + visible: |
| 21 | + id: 'rooms-list-view-create-channel' |
| 22 | + timeout: 60000 |
| 23 | +- tapOn: |
| 24 | + id: 'rooms-list-view-create-channel' |
| 25 | + |
| 26 | +# should have new message screen |
| 27 | +- extendedWaitUntil: |
| 28 | + visible: |
| 29 | + id: 'new-message-view' |
| 30 | + timeout: 60000 |
| 31 | + |
| 32 | +# should have search input |
| 33 | +- extendedWaitUntil: |
| 34 | + visible: |
| 35 | + id: 'new-message-view-search' |
| 36 | + timeout: 60000 |
| 37 | + |
| 38 | +# should navigate to create DM |
| 39 | +- extendedWaitUntil: |
| 40 | + visible: |
| 41 | + text: '.*Direct message.*' |
| 42 | + timeout: 60000 |
| 43 | +- tapOn: |
| 44 | + text: '.*Direct message.*' |
| 45 | + |
| 46 | +# should add users |
| 47 | +- extendedWaitUntil: |
| 48 | + visible: |
| 49 | + id: 'select-users-view-search' |
| 50 | + timeout: 60000 |
| 51 | +- tapOn: |
| 52 | + id: 'select-users-view-search' |
| 53 | +- inputText: 'rocket.cat' |
| 54 | +- extendedWaitUntil: |
| 55 | + visible: |
| 56 | + id: 'select-users-view-item-rocket.cat' |
| 57 | + timeout: 60000 |
| 58 | +- tapOn: |
| 59 | + id: 'select-users-view-item-rocket.cat' |
| 60 | +- tapOn: |
| 61 | + id: 'select-users-view-search' |
| 62 | +- eraseText |
| 63 | +- inputText: ${output.otherUser.username} |
| 64 | +- extendedWaitUntil: |
| 65 | + visible: |
| 66 | + id: 'select-users-view-item-${output.otherUser.username}' |
| 67 | + timeout: 60000 |
| 68 | +- tapOn: |
| 69 | + id: 'select-users-view-item-${output.otherUser.username}' |
| 70 | +- extendedWaitUntil: |
| 71 | + visible: |
| 72 | + id: 'selected-users-view-submit' |
| 73 | + timeout: 60000 |
| 74 | +- tapOn: |
| 75 | + id: 'selected-users-view-submit' |
| 76 | + |
| 77 | +# check Group DM exist |
| 78 | +- extendedWaitUntil: |
| 79 | + visible: |
| 80 | + id: 'room-view-title-rocket.cat, ${output.otherUser.username}' |
| 81 | + timeout: 60000 |
0 commit comments