|
| 1 | +appId: chat.rocket.reactnative |
| 2 | +name: Search Member |
| 3 | +onFlowStart: |
| 4 | + - runFlow: '../../helpers/setup.yaml' |
| 5 | +tags: |
| 6 | + - test-13 |
| 7 | + |
| 8 | +--- |
| 9 | +- evalScript: ${output.user = output.utils.createUser()} |
| 10 | + |
| 11 | +- runFlow: |
| 12 | + file: '../../helpers/login-with-deeplink.yaml' |
| 13 | + env: |
| 14 | + USERNAME: ${output.user.username} |
| 15 | + PASSWORD: ${output.user.password} |
| 16 | + |
| 17 | +- runFlow: |
| 18 | + file: '../../helpers/navigate-to-room.yaml' |
| 19 | + env: |
| 20 | + ROOM: 'general' |
| 21 | +- tapOn: |
| 22 | + id: room-header |
| 23 | +- extendedWaitUntil: |
| 24 | + visible: |
| 25 | + id: 'room-actions-view' |
| 26 | + timeout: 60000 |
| 27 | +- tapOn: |
| 28 | + id: 'room-actions-members' |
| 29 | +- extendedWaitUntil: |
| 30 | + visible: |
| 31 | + id: 'room-members-view-search' |
| 32 | + timeout: 60000 |
| 33 | + |
| 34 | +# should search in all users |
| 35 | +- tapOn: |
| 36 | + id: room-members-view-search |
| 37 | +- inputText: rohit.bansal |
| 38 | +- extendedWaitUntil: |
| 39 | + visible: |
| 40 | + id: 'room-members-view-item-rohit.bansal' |
| 41 | + timeout: 60000 |
| 42 | + |
| 43 | +# use online status and it should use the text filter |
| 44 | +- tapOn: |
| 45 | + id: room-members-view-filter |
| 46 | +- extendedWaitUntil: |
| 47 | + visible: |
| 48 | + id: 'room-members-view-toggle-status-online' |
| 49 | + timeout: 60000 |
| 50 | +- tapOn: |
| 51 | + id: room-members-view-toggle-status-online |
| 52 | +- extendedWaitUntil: |
| 53 | + visible: |
| 54 | + text: 'No members found' |
| 55 | + timeout: 60000 |
| 56 | + |
| 57 | +# use all status again and it should use text filter |
| 58 | +- tapOn: |
| 59 | + id: room-members-view-filter |
| 60 | +- extendedWaitUntil: |
| 61 | + visible: |
| 62 | + id: 'room-members-view-toggle-status-all' |
| 63 | + timeout: 60000 |
| 64 | +- tapOn: |
| 65 | + id: room-members-view-toggle-status-all |
| 66 | +- extendedWaitUntil: |
| 67 | + visible: |
| 68 | + id: 'room-members-view-item-rohit.bansal' |
| 69 | + timeout: 60000 |
| 70 | +- tapOn: |
| 71 | + id: clear-text-input |
| 72 | + |
| 73 | +- evalScript: ${output.secondUser = output.utils.createUser()} |
| 74 | + |
| 75 | +# should search for new user in all list |
| 76 | +- tapOn: |
| 77 | + id: room-members-view-search |
| 78 | +- inputText: ${output.secondUser.username} |
| 79 | +- extendedWaitUntil: |
| 80 | + visible: |
| 81 | + id: 'room-members-view-item-${output.secondUser.username}' |
| 82 | + timeout: 60000 |
| 83 | + |
| 84 | +# Verify "No members found" message appears correctly when search returns no results |
| 85 | +- tapOn: |
| 86 | + id: room-members-view-search |
| 87 | +- inputText: nonexistentuser12345 |
| 88 | +- extendedWaitUntil: |
| 89 | + visible: |
| 90 | + text: 'No members found' |
| 91 | + timeout: 60000 |
0 commit comments