|
| 1 | +appId: chat.rocket.reactnative |
| 2 | +name: Unread badge |
| 3 | +onFlowStart: |
| 4 | + - runFlow: '../../helpers/setup.yaml' |
| 5 | +tags: |
| 6 | + - test-13 |
| 7 | + |
| 8 | +--- |
| 9 | +- evalScript: ${output.user = output.utils.createUser()} |
| 10 | +- evalScript: ${output.otherUser = output.utils.createUser()} |
| 11 | + |
| 12 | +- runFlow: |
| 13 | + file: '../../helpers/login-with-deeplink.yaml' |
| 14 | + env: |
| 15 | + USERNAME: ${output.user.username} |
| 16 | + PASSWORD: ${output.user.password} |
| 17 | + |
| 18 | +# Should have normal unread indicator on normal message |
| 19 | +- evalScript: ${output.message = output.utils.sendMessage(output.otherUser.username, output.otherUser.password, '@' + output.user.username, 'message-mark-as-unread')} |
| 20 | +- extendedWaitUntil: |
| 21 | + visible: |
| 22 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 23 | + timeout: 60000 |
| 24 | +- extendedWaitUntil: |
| 25 | + visible: |
| 26 | + id: 'unread-badge-1' |
| 27 | + childOf: |
| 28 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 29 | + timeout: 60000 |
| 30 | +- tapOn: |
| 31 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 32 | +- tapOn: |
| 33 | + id: header-back |
| 34 | +- extendedWaitUntil: |
| 35 | + notVisible: |
| 36 | + id: 'unread-badge-1' |
| 37 | + childOf: |
| 38 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 39 | + timeout: 60000 |
| 40 | + |
| 41 | +# Should have mention unread indicator on mentioned message |
| 42 | +- evalScript: ${output.message = output.utils.sendMessage(output.otherUser.username, output.otherUser.password, '@' + output.user.username, '@' + output.user.username)} |
| 43 | +- extendedWaitUntil: |
| 44 | + visible: |
| 45 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 46 | + timeout: 60000 |
| 47 | +- extendedWaitUntil: |
| 48 | + visible: |
| 49 | + id: 'mention-badge-1' |
| 50 | + childOf: |
| 51 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 52 | + timeout: 60000 |
| 53 | +- tapOn: |
| 54 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 55 | +- tapOn: |
| 56 | + id: header-back |
| 57 | +- extendedWaitUntil: |
| 58 | + notVisible: |
| 59 | + id: 'mention-badge-1' |
| 60 | + childOf: |
| 61 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 62 | + timeout: 60000 |
| 63 | + |
| 64 | +# send normal message first and mention in next message and it should show mentioned unread indicator |
| 65 | +- evalScript: ${output.message = output.utils.sendMessage(output.otherUser.username, output.otherUser.password, '@' + output.user.username, 'message-mark-as-unread')} |
| 66 | +- evalScript: ${output.message = output.utils.sendMessage(output.otherUser.username, output.otherUser.password, '@' + output.user.username, '@' + output.user.username)} |
| 67 | +- extendedWaitUntil: |
| 68 | + visible: |
| 69 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 70 | + timeout: 60000 |
| 71 | +- extendedWaitUntil: |
| 72 | + visible: |
| 73 | + id: 'mention-badge-2' |
| 74 | + childOf: |
| 75 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 76 | + timeout: 60000 |
| 77 | +- tapOn: |
| 78 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 79 | +- tapOn: |
| 80 | + id: header-back |
| 81 | +- extendedWaitUntil: |
| 82 | + notVisible: |
| 83 | + id: 'mention-badge-2' |
| 84 | + childOf: |
| 85 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 86 | + timeout: 60000 |
| 87 | + |
| 88 | +# send mention message first and normal message in next message and it should show mentioned unread indicator |
| 89 | +- evalScript: ${output.message = output.utils.sendMessage(output.otherUser.username, output.otherUser.password, '@' + output.user.username, '@' + output.user.username)} |
| 90 | +- evalScript: ${output.message = output.utils.sendMessage(output.otherUser.username, output.otherUser.password, '@' + output.user.username, 'message-mark-as-unread')} |
| 91 | +- extendedWaitUntil: |
| 92 | + visible: |
| 93 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 94 | + timeout: 60000 |
| 95 | +- extendedWaitUntil: |
| 96 | + visible: |
| 97 | + id: 'mention-badge-2' |
| 98 | + childOf: |
| 99 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 100 | + timeout: 60000 |
| 101 | +- tapOn: |
| 102 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 103 | +- tapOn: |
| 104 | + id: header-back |
| 105 | +- extendedWaitUntil: |
| 106 | + notVisible: |
| 107 | + id: 'mention-badge-2' |
| 108 | + childOf: |
| 109 | + id: 'rooms-list-view-item-${output.otherUser.username}' |
| 110 | + timeout: 60000 |
0 commit comments