|
| 1 | +appId: chat.rocket.reactnative |
| 2 | +name: Convert Team |
| 3 | +jsEngine: graaljs |
| 4 | +onFlowStart: |
| 5 | + - runFlow: '../helpers/setup.yaml' |
| 6 | +onFlowEnd: |
| 7 | + - evalScript: ${output.utils.deleteCreatedUsers()} |
| 8 | + |
| 9 | +--- |
| 10 | +- runFlow: ../helpers/launch-app.yaml |
| 11 | +- runFlow: ../helpers/login.yaml |
| 12 | +- evalScript: ${output.toBeConverted = 'to-be-converted-' + output.random()} |
| 13 | +- evalScript: ${output.toBeMoved = 'to-be-moved-' + output.random()} |
| 14 | +- evalScript: ${output.publicChannelToBeConverted = 'channel-public-to-be-converted-' + output.random()} |
| 15 | + |
| 16 | +# should convert public channel to a team |
| 17 | +- runFlow: |
| 18 | + file: './utils/create-channel.yaml' |
| 19 | + env: |
| 20 | + channelName: ${output.publicChannelToBeConverted} |
| 21 | + publicChannel: true |
| 22 | +- runFlow: |
| 23 | + file: '../helpers/navigate-to-room-action.yaml' |
| 24 | + env: |
| 25 | + ROOM: ${output.publicChannelToBeConverted} |
| 26 | +- scrollUntilVisible: |
| 27 | + element: |
| 28 | + id: 'room-actions-convert-to-team' |
| 29 | +- tapOn: |
| 30 | + id: 'room-actions-convert-to-team' |
| 31 | +- extendedWaitUntil: |
| 32 | + visible: |
| 33 | + text: '.*You are converting this channel to a team. All members will be kept.*' |
| 34 | + timeout: 60000 |
| 35 | +- assertVisible: |
| 36 | + text: 'Convert' |
| 37 | +- tapOn: |
| 38 | + text: 'Convert' |
| 39 | +- extendedWaitUntil: |
| 40 | + visible: |
| 41 | + id: 'room-view-title-${output.publicChannelToBeConverted}' |
| 42 | + timeout: 60000 |
| 43 | +- runFlow: '../helpers/go-back.yaml' |
| 44 | +- extendedWaitUntil: |
| 45 | + visible: |
| 46 | + id: 'rooms-list-view' |
| 47 | + timeout: 60000 |
| 48 | + |
| 49 | +# should convert private channel to a team |
| 50 | +- runFlow: |
| 51 | + file: './utils/create-channel.yaml' |
| 52 | + env: |
| 53 | + channelName: ${output.toBeConverted} |
| 54 | +- runFlow: |
| 55 | + file: '../helpers/navigate-to-room-action.yaml' |
| 56 | + env: |
| 57 | + ROOM: ${output.toBeConverted} |
| 58 | +- scrollUntilVisible: |
| 59 | + element: |
| 60 | + id: 'room-actions-convert-to-team' |
| 61 | +- tapOn: |
| 62 | + id: 'room-actions-convert-to-team' |
| 63 | +- extendedWaitUntil: |
| 64 | + visible: |
| 65 | + text: '.*You are converting this channel to a team. All members will be kept.*' |
| 66 | + timeout: 60000 |
| 67 | +- assertVisible: |
| 68 | + text: 'Convert' |
| 69 | +- tapOn: |
| 70 | + text: 'Convert' |
| 71 | +- extendedWaitUntil: |
| 72 | + visible: |
| 73 | + id: 'room-view-title-${output.toBeConverted}' |
| 74 | + timeout: 60000 |
| 75 | +- runFlow: '../helpers/go-back.yaml' |
| 76 | +- extendedWaitUntil: |
| 77 | + visible: |
| 78 | + id: 'rooms-list-view' |
| 79 | + timeout: 60000 |
| 80 | + |
| 81 | +# should move channel to a team |
| 82 | +- runFlow: |
| 83 | + file: './utils/create-channel.yaml' |
| 84 | + env: |
| 85 | + channelName: ${output.toBeMoved} |
| 86 | +- runFlow: |
| 87 | + file: '../helpers/navigate-to-room-action.yaml' |
| 88 | + env: |
| 89 | + ROOM: ${output.toBeMoved} |
| 90 | +- scrollUntilVisible: |
| 91 | + element: |
| 92 | + id: 'room-actions-move-to-team' |
| 93 | +- tapOn: |
| 94 | + id: room-actions-move-to-team |
| 95 | +- extendedWaitUntil: |
| 96 | + visible: |
| 97 | + id: select-list-view-submit |
| 98 | + timeout: 60000 |
| 99 | +- tapOn: |
| 100 | + id: select-list-view-submit |
| 101 | +- extendedWaitUntil: |
| 102 | + visible: |
| 103 | + id: 'select-list-view-item-${output.toBeConverted}' |
| 104 | + timeout: 60000 |
| 105 | +- tapOn: |
| 106 | + id: 'select-list-view-item-${output.toBeConverted}' |
| 107 | +- extendedWaitUntil: |
| 108 | + visible: |
| 109 | + id: 'select-list-view-submit' |
| 110 | + timeout: 60000 |
| 111 | +- tapOn: |
| 112 | + id: 'select-list-view-submit' |
| 113 | +- extendedWaitUntil: |
| 114 | + visible: |
| 115 | + text: '.*After reading the previous instructions about this behavior, do you still want to move this channel to the selected team?.*' |
| 116 | + timeout: 60000 |
| 117 | +- assertVisible: |
| 118 | + text: 'Yes, move it!' |
| 119 | +- tapOn: |
| 120 | + text: 'Yes, move it!' |
| 121 | +- extendedWaitUntil: |
| 122 | + visible: |
| 123 | + id: 'room-header' |
| 124 | + timeout: 60000 |
| 125 | +- tapOn: |
| 126 | + id: 'room-header' |
| 127 | +- extendedWaitUntil: |
| 128 | + visible: |
| 129 | + id: 'room-actions-teams' |
| 130 | + timeout: 60000 |
| 131 | +- runFlow: '../helpers/go-back.yaml' |
| 132 | +- runFlow: '../helpers/go-back.yaml' |
| 133 | +- extendedWaitUntil: |
| 134 | + visible: |
| 135 | + id: 'rooms-list-view' |
| 136 | + timeout: 60000 |
| 137 | + |
| 138 | +# should convert a team to a channel |
| 139 | +- runFlow: |
| 140 | + file: '../helpers/navigate-to-room-action.yaml' |
| 141 | + env: |
| 142 | + ROOM: ${output.toBeConverted} |
| 143 | +- scrollUntilVisible: |
| 144 | + element: |
| 145 | + text: 'Convert to channel' |
| 146 | +- tapOn: 'Convert to channel' |
| 147 | +- extendedWaitUntil: |
| 148 | + visible: |
| 149 | + text: '.*Converting team to channel.*' |
| 150 | + timeout: 60000 |
| 151 | +- extendedWaitUntil: |
| 152 | + visible: |
| 153 | + id: 'select-list-view-item-${output.toBeMoved}' |
| 154 | + timeout: 60000 |
| 155 | +- tapOn: |
| 156 | + id: 'select-list-view-item-${output.toBeMoved}' |
| 157 | +- extendedWaitUntil: |
| 158 | + visible: |
| 159 | + id: 'select-list-view-submit' |
| 160 | + timeout: 60000 |
| 161 | +- tapOn: |
| 162 | + id: 'select-list-view-submit' |
| 163 | +- extendedWaitUntil: |
| 164 | + visible: |
| 165 | + text: '.*You are converting this team to a channel.*' |
| 166 | + timeout: 60000 |
| 167 | +- assertVisible: |
| 168 | + text: 'Convert' |
| 169 | +- tapOn: |
| 170 | + text: 'Convert' |
| 171 | +- extendedWaitUntil: |
| 172 | + visible: |
| 173 | + id: 'room-view' |
| 174 | + timeout: 60000 |
| 175 | +- extendedWaitUntil: |
| 176 | + visible: |
| 177 | + id: 'room-view-title-${output.toBeConverted}' |
| 178 | + timeout: 60000 |
| 179 | +- runFlow: '../helpers/go-back.yaml' |
| 180 | +- extendedWaitUntil: |
| 181 | + visible: |
| 182 | + id: 'rooms-list-view' |
| 183 | + timeout: 60000 |
| 184 | +- extendedWaitUntil: |
| 185 | + notVisible: |
| 186 | + id: 'rooms-list-view-item-${output.toBeMoved}' |
| 187 | + timeout: 60000 |
0 commit comments