From 7f57e40eea4015a0cd28cc48bc463c965048a8eb Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Sep 2025 00:24:56 +0530 Subject: [PATCH 01/37] basic... --- .maestro/helpers/navigate-to-room-action.yaml | 2 +- .maestro/tests/room/room-actions.yaml | 173 ++++++++++++++++++ 2 files changed, 174 insertions(+), 1 deletion(-) create mode 100644 .maestro/tests/room/room-actions.yaml diff --git a/.maestro/helpers/navigate-to-room-action.yaml b/.maestro/helpers/navigate-to-room-action.yaml index 07d87a967ff..4e182b71ad8 100644 --- a/.maestro/helpers/navigate-to-room-action.yaml +++ b/.maestro/helpers/navigate-to-room-action.yaml @@ -10,7 +10,7 @@ tags: id: 'room-view' commands: - runFlow: - file: './navigate-to-room.yaml' + file: './search-and-navigate-room.yaml' env: ROOM: ${ROOM} diff --git a/.maestro/tests/room/room-actions.yaml b/.maestro/tests/room/room-actions.yaml new file mode 100644 index 00000000000..f5f6e243abf --- /dev/null +++ b/.maestro/tests/room/room-actions.yaml @@ -0,0 +1,173 @@ +appId: chat.rocket.reactnative +name: Room Actions +onFlowStart: + - runFlow: '../../helpers/setup.yaml' +onFlowComplete: + - evalScript: ${output.utils.deleteCreatedUsers()} + +--- +- runFlow: '../../helpers/launch-app.yaml' + +- evalScript: ${output.user = output.utils.createUser()} +- evalScript: ${output.otherUser = output.utils.createUser()} +- evalScript: ${output.room = output.utils.createRandomRoom(output.user.username, output.user.password)} + +- runFlow: + file: '../../helpers/login.yaml' + env: + USERNAME: ${output.user.username} + PASSWORD: ${output.user.password} +- runFlow: + file: '../../helpers/navigate-to-room-action.yaml' + env: + ROOM: ${output.room.name} + +# should have room actions screen + +- extendedWaitUntil: + visible: + id: 'room-actions-view' + timeout: 60000 + +# should have info +- extendedWaitUntil: + visible: + id: 'room-actions-info' + timeout: 60000 + +# should have members +- extendedWaitUntil: + visible: + id: 'room-actions-members' + timeout: 60000 +- extendedWaitUntil: + visible: + text: '.*1 members.*' + timeout: 60000 + +# should have files +- extendedWaitUntil: + visible: + id: 'room-actions-files' + timeout: 60000 + +# should have mentions +- extendedWaitUntil: + visible: + id: 'room-actions-mentioned' + timeout: 60000 + +# should have starred +- extendedWaitUntil: + visible: + id: 'room-actions-starred' + timeout: 60000 + +# should have share +- extendedWaitUntil: + visible: + id: 'room-actions-share' + timeout: 60000 + +# should have pinned +- extendedWaitUntil: + visible: + id: 'room-actions-pinned' + timeout: 60000 + +# should have notifications +- extendedWaitUntil: + visible: + id: 'room-actions-notifications' + timeout: 60000 + +# should have leave channel +- extendedWaitUntil: + visible: + id: 'room-actions-leave-channel' + timeout: 60000 + +# should show mentioned messages +- tapOn: + id: 'room-actions-mentioned' +- extendedWaitUntil: + visible: + id: 'mentioned-messages-view' + timeout: 60000 +- tapOn: + id: custom-header-back +- extendedWaitUntil: + visible: + id: 'room-actions-view' + timeout: 60000 + +# should star and show in starred message +- tapOn: + id: custom-header-back +- runFlow: + file: '../../helpers/send-message.yaml' + env: + message: 'messageToStar' +- extendedWaitUntil: + visible: + text: 'messageToStar' + timeout: 10000 +- longPressOn: + id: message-content-messageToStar +- extendedWaitUntil: + visible: + id: 'action-sheet' + timeout: 10000 +- swipe: + from: + id: action-sheet-handle + direction: UP +- extendedWaitUntil: + visible: + text: 'Star' + index: 1 + timeout: 10000 +- tapOn: + text: 'Star' + index: 1 +- tapOn: + id: 'room-header' +- extendedWaitUntil: + visible: + id: 'room-actions-view' + timeout: 60000 +- tapOn: + text: 'Starred' +- extendedWaitUntil: + visible: + id: 'message-content-messageToStar' + timeout: 60000 +# should unstar +- tapOn: + id: custom-header-back +- extendedWaitUntil: + visible: + id: 'room-actions-view' + timeout: 60000 +- tapOn: + id: custom-header-back +- extendedWaitUntil: + visible: + text: 'messageToStar' + timeout: 10000 +- longPressOn: + id: message-content-messageToStar +- extendedWaitUntil: + visible: + id: 'action-sheet' + timeout: 10000 +- swipe: + from: + id: action-sheet-handle + direction: UP +- extendedWaitUntil: + visible: + text: 'Unstar' + timeout: 10000 +- tapOn: + text: 'Unstar' From 3511bebb395aaa97a6cf78fa2ff206047c2d80b7 Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Sep 2025 01:32:44 +0530 Subject: [PATCH 02/37] Added till pin and unpin --- .maestro/tests/room/room-actions.yaml | 110 ++++++++++++++++++++++++-- 1 file changed, 105 insertions(+), 5 deletions(-) diff --git a/.maestro/tests/room/room-actions.yaml b/.maestro/tests/room/room-actions.yaml index f5f6e243abf..b4454d7b563 100644 --- a/.maestro/tests/room/room-actions.yaml +++ b/.maestro/tests/room/room-actions.yaml @@ -23,7 +23,6 @@ onFlowComplete: ROOM: ${output.room.name} # should have room actions screen - - extendedWaitUntil: visible: id: 'room-actions-view' @@ -100,17 +99,17 @@ onFlowComplete: visible: id: 'room-actions-view' timeout: 60000 - -# should star and show in starred message - tapOn: id: custom-header-back + +# should star and show in starred message - runFlow: file: '../../helpers/send-message.yaml' env: message: 'messageToStar' - extendedWaitUntil: visible: - text: 'messageToStar' + id: message-content-messageToStar timeout: 10000 - longPressOn: id: message-content-messageToStar @@ -130,6 +129,10 @@ onFlowComplete: - tapOn: text: 'Star' index: 1 +- extendedWaitUntil: + visible: + text: 'Message starred' + timeout: 10000 - tapOn: id: 'room-header' - extendedWaitUntil: @@ -138,6 +141,10 @@ onFlowComplete: timeout: 60000 - tapOn: text: 'Starred' +- extendedWaitUntil: + visible: + id: starred-messages-view + timeout: 60000 - extendedWaitUntil: visible: id: 'message-content-messageToStar' @@ -153,7 +160,7 @@ onFlowComplete: id: custom-header-back - extendedWaitUntil: visible: - text: 'messageToStar' + id: message-content-messageToStar timeout: 10000 - longPressOn: id: message-content-messageToStar @@ -171,3 +178,96 @@ onFlowComplete: timeout: 10000 - tapOn: text: 'Unstar' +- extendedWaitUntil: + visible: + text: 'Message unstarred' + timeout: 10000 +- tapOn: + id: 'room-header' +- extendedWaitUntil: + visible: + id: 'room-actions-view' + timeout: 60000 +- tapOn: + text: 'Starred' +- extendedWaitUntil: + visible: + id: starred-messages-view + timeout: 60000 +- extendedWaitUntil: + notVisible: + id: 'message-content-messageToStar' + timeout: 60000 +- tapOn: + id: custom-header-back +- extendedWaitUntil: + visible: + id: 'room-actions-view' + timeout: 60000 +- tapOn: + id: custom-header-back + +# should pin a message and show in pinned +- runFlow: + file: '../../helpers/send-message.yaml' + env: + message: 'messageToPin' +- extendedWaitUntil: + visible: + id: 'message-content-messageToPin' + timeout: 10000 +- longPressOn: + id: message-content-messageToPin +- extendedWaitUntil: + visible: + id: 'action-sheet' + timeout: 10000 +- swipe: + from: + id: action-sheet-handle + direction: UP +- extendedWaitUntil: + visible: + text: Pin + index: 1 + timeout: 60000 +- tapOn: + text: Pin + index: 1 +- extendedWaitUntil: + visible: + text: '.*Pinned a message:.*' + timeout: 60000 +- tapOn: + id: 'room-header' +- extendedWaitUntil: + visible: + id: 'room-actions-view' + timeout: 60000 +- tapOn: Pinned +- extendedWaitUntil: + visible: + id: 'message-content-messageToPin' + timeout: 60000 + +# should unpin a message +- longPressOn: + id: message-content-messageToPin +- extendedWaitUntil: + visible: + text: 'Unpin' + timeout: 60000 +- tapOn: + text: 'Unpin' +- extendedWaitUntil: + notVisible: + id: 'message-content-messageToPin' + timeout: 60000 +- tapOn: + id: custom-header-back +- extendedWaitUntil: + visible: + id: 'room-actions-view' + timeout: 60000 +- tapOn: + id: custom-header-back From 2ec688c1bcf79ca1ce21e982a0685f10820b846a Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Sep 2025 02:52:24 +0530 Subject: [PATCH 03/37] more changes --- .maestro/tests/room/room-actions.yaml | 285 ++++++++++++++++++++++++++ 1 file changed, 285 insertions(+) diff --git a/.maestro/tests/room/room-actions.yaml b/.maestro/tests/room/room-actions.yaml index b4454d7b563..5266fb83841 100644 --- a/.maestro/tests/room/room-actions.yaml +++ b/.maestro/tests/room/room-actions.yaml @@ -263,11 +263,296 @@ onFlowComplete: notVisible: id: 'message-content-messageToPin' timeout: 60000 +- tapOn: + id: 'custom-header-back' +- extendedWaitUntil: + visible: + id: 'room-actions-view' + timeout: 60000 + +# should navigate to notification preference view +- scrollUntilVisible: + element: + id: 'room-actions-notifications' + timeout: 60000 +- tapOn: + id: 'room-actions-notifications' +- extendedWaitUntil: + visible: + id: 'notification-preference-view' + timeout: 60000 + +# should have receive notification option +- extendedWaitUntil: + visible: + id: 'notification-preference-view-receive-notification' + timeout: 60000 + +# should have show unread count option +- extendedWaitUntil: + visible: + id: 'notification-preference-view-mark-as-unread' + timeout: 60000 + +# should have notification alert option +- extendedWaitUntil: + visible: + id: 'notification-preference-view-alert' + timeout: 60000 + +# should have push notification option +- extendedWaitUntil: + visible: + id: 'notification-preference-view-push-notification' + timeout: 60000 + +# should have notification sound option +- scrollUntilVisible: + element: + id: 'notification-preference-view-sound' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'notification-preference-view-sound' + timeout: 60000 + +# should have email alert option +- scrollUntilVisible: + element: + id: 'notification-preference-view-email-alert' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'notification-preference-view-email-alert' + timeout: 60000 + - tapOn: id: custom-header-back - extendedWaitUntil: visible: id: 'room-actions-view' timeout: 60000 + +# should tap on leave channel and raise alert +- scrollUntilVisible: + element: + id: room-actions-leave-channel + timeout: 60000 +- tapOn: + id: room-actions-leave-channel +- extendedWaitUntil: + visible: + text: '.*Are you sure you want to leave the room.*' + timeout: 60000 +- extendedWaitUntil: + visible: + text: '.*YES, LEAVE IT!.*' + timeout: 60000 +- tapOn: + text: '.*YES, LEAVE IT!.*' +- extendedWaitUntil: + visible: + text: '.*You are the last owner. Please set new owner before leaving the room.*' + timeout: 60000 +- extendedWaitUntil: + visible: + text: 'OK' + timeout: 60000 +- tapOn: + text: 'OK' +- extendedWaitUntil: + visible: + id: 'room-actions-view' + timeout: 60000 + +# should add users to the room +- extendedWaitUntil: + visible: + id: 'room-actions-members' + timeout: 60000 +- tapOn: + id: 'room-actions-members' +- extendedWaitUntil: + visible: + id: 'room-actions-add-user' + timeout: 60000 +- tapOn: + id: room-actions-add-user +- evalScript: ${output.result = output.utils.createDM(output.user.username, output.user.password, 'rocket.cat')} +- extendedWaitUntil: + visible: + id: 'select-users-view-item-rocket.cat' + timeout: 60000 +- tapOn: + id: 'select-users-view-item-rocket.cat' +- extendedWaitUntil: + visible: + id: 'selected-user-rocket.cat' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'select-users-view-search' + timeout: 60000 +- tapOn: + id: select-users-view-search +- inputText: ${output.otherUser.username} +- extendedWaitUntil: + visible: + id: 'select-users-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: 'select-users-view-item-${output.otherUser.username}' +- extendedWaitUntil: + visible: + id: 'selected-user-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: selected-users-view-submit - tapOn: id: custom-header-back +- extendedWaitUntil: + visible: + text: '.*3 members.*' + timeout: 60000 + +# should show all users +- tapOn: + id: 'room-actions-members' +- extendedWaitUntil: + visible: + id: 'room-members-view' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'room-members-view-filter' + timeout: 60000 +- tapOn: + id: 'room-members-view-filter' +- extendedWaitUntil: + visible: + id: 'room-members-view-toggle-status-all' + timeout: 60000 +- tapOn: + id: 'room-members-view-toggle-status-all' +- extendedWaitUntil: + notVisible: + id: 'room-members-view-toggle-status-all' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: 'custom-header-back' + +# should filter user +- tapOn: + id: 'room-actions-members' +- extendedWaitUntil: + visible: + id: 'room-members-view' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'room-members-view-search' + timeout: 60000 +- tapOn: + id: room-members-view-search +- inputText: 'rocket' +- tapOn: + id: room-members-view +- extendedWaitUntil: + visible: + id: 'room-members-view-item-rocket.cat' + timeout: 60000 +- extendedWaitUntil: + notVisible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: clear-text-input +- extendedWaitUntil: + visible: + id: 'room-members-view-item-rocket.cat' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 + +# should remove user from room +- extendedWaitUntil: + visible: + id: 'room-members-view-item-rocket.cat' + timeout: 60000 +- tapOn: + id: room-members-view-item-rocket.cat +- extendedWaitUntil: + visible: + id: 'action-sheet-remove-from-room' + timeout: 60000 +- tapOn: + id: action-sheet-remove-from-room +- extendedWaitUntil: + visible: + text: '.*The user will be removed from.*' + timeout: 60000 +- extendedWaitUntil: + visible: + text: '.*YES, REMOVE USER!.*' + timeout: 60000 +- tapOn: YES, REMOVE USER! +- extendedWaitUntil: + notVisible: + id: 'room-members-view-item-rocket.cat' + timeout: 60000 + +# should set/remove as owner +- extendedWaitUntil: + visible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: 'room-members-view-item-${output.otherUser.username}' +- extendedWaitUntil: + visible: + id: 'action-sheet-set-owner' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'action-sheet-set-owner-unchecked' + timeout: 60000 +- tapOn: + id: action-sheet-set-owner + +- extendedWaitUntil: + visible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: 'room-members-view-item-${output.otherUser.username}' +- extendedWaitUntil: + visible: + id: 'action-sheet-set-owner' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'action-sheet-set-owner-checked' + timeout: 60000 +- tapOn: + id: action-sheet-set-owner + +- extendedWaitUntil: + visible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: 'room-members-view-item-${output.otherUser.username}' +- extendedWaitUntil: + visible: + id: 'action-sheet-set-owner' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'action-sheet-set-owner-unchecked' + timeout: 60000 From ab6298a69756dd943eb2da839afac62d7f7a4b48 Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Sep 2025 17:55:18 +0530 Subject: [PATCH 04/37] done --- .maestro/tests/room/room-actions.yaml | 201 ++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) diff --git a/.maestro/tests/room/room-actions.yaml b/.maestro/tests/room/room-actions.yaml index 5266fb83841..acca4178aa4 100644 --- a/.maestro/tests/room/room-actions.yaml +++ b/.maestro/tests/room/room-actions.yaml @@ -556,3 +556,204 @@ onFlowComplete: visible: id: 'action-sheet-set-owner-unchecked' timeout: 60000 +- tapOn: + text: Cancel + +# should set/remove as moderator +- extendedWaitUntil: + visible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: 'room-members-view-item-${output.otherUser.username}' +- extendedWaitUntil: + visible: + id: 'action-sheet-set-moderator' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'action-sheet-set-moderator-unchecked' + timeout: 60000 +- tapOn: + id: action-sheet-set-moderator + +- extendedWaitUntil: + visible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: 'room-members-view-item-${output.otherUser.username}' +- extendedWaitUntil: + visible: + id: 'action-sheet-set-moderator' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'action-sheet-set-moderator-checked' + timeout: 60000 +- tapOn: + id: action-sheet-set-moderator + +- extendedWaitUntil: + visible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: 'room-members-view-item-${output.otherUser.username}' +- extendedWaitUntil: + visible: + id: 'action-sheet-set-moderator' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'action-sheet-set-moderator-unchecked' + timeout: 60000 +- tapOn: + text: 'Cancel' + +# should set/remove as mute +- extendedWaitUntil: + visible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: 'room-members-view-item-${output.otherUser.username}' +- extendedWaitUntil: + visible: + id: 'action-sheet-mute-user' + timeout: 60000 +- extendedWaitUntil: + visible: + text: 'Disable writing in room' + timeout: 60000 +- tapOn: + id: 'action-sheet-mute-user' +- extendedWaitUntil: + visible: + text: '.*Are you sure?.*' + timeout: 60000 +- extendedWaitUntil: + visible: + text: '.*DISABLE WRITING IN ROOM.*' + timeout: 60000 +- tapOn: 'DISABLE WRITING IN ROOM' + +- extendedWaitUntil: + visible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: 'room-members-view-item-${output.otherUser.username}' +- extendedWaitUntil: + visible: + id: 'action-sheet-mute-user' + timeout: 60000 +- extendedWaitUntil: + visible: + text: 'Enable writing in room' + timeout: 60000 +- tapOn: + id: action-sheet-mute-user +- extendedWaitUntil: + visible: + text: '.*Are you sure?.*' + timeout: 60000 +- extendedWaitUntil: + visible: + text: '.*ENABLE WRITING IN ROOM.*' + timeout: 60000 +- tapOn: 'ENABLE WRITING IN ROOM' + +- extendedWaitUntil: + visible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: 'room-members-view-item-${output.otherUser.username}' +- extendedWaitUntil: + visible: + id: 'action-sheet-mute-user' + timeout: 60000 +- extendedWaitUntil: + visible: + text: 'Disable writing in room' + timeout: 60000 +- tapOn: + text: 'Cancel' + +# should ignore user +- evalScript: ${output.message = '${output.random()}ignoredmessagecontent'} +- evalScript: ${output.utils.sendMessage(output.otherUser.username, output.otherUser.password, output.room.name, output.message)} +- extendedWaitUntil: + visible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: 'room-members-view-item-${output.otherUser.username}' +- extendedWaitUntil: + visible: + id: 'action-sheet-ignore-user' + timeout: 60000 +- tapOn: + id: action-sheet-ignore-user +- extendedWaitUntil: + visible: + text: 'User has been ignored' + timeout: 60000 +- tapOn: + id: custom-header-back +- extendedWaitUntil: + visible: + id: 'room-actions-view' + timeout: 60000 +- tapOn: + id: custom-header-back +- extendedWaitUntil: + visible: + text: '.*Message ignored. Tap to display it.*' + timeout: 60000 +- tapOn: + text: '.*Message ignored. Tap to display it.*' +- extendedWaitUntil: + visible: + text: '.*${output.message}.*' + timeout: 60000 + +# should navigate to direct message +- tapOn: + id: 'room-header' +- extendedWaitUntil: + visible: + id: 'room-actions-view' + timeout: 60000 +- tapOn: + id: 'room-actions-members' +- extendedWaitUntil: + visible: + id: 'room-members-view' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'room-members-view-item-${output.otherUser.username}' + timeout: 60000 +- tapOn: + id: 'room-members-view-item-${output.otherUser.username}' +- extendedWaitUntil: + visible: + text: 'Direct message' + timeout: 60000 +- tapOn: + text: 'Direct message' +- extendedWaitUntil: + visible: + id: 'room-view' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'room-view-title-${output.otherUser.username}' + timeout: 10000 +- tapOn: Back +- extendedWaitUntil: + visible: + id: 'rooms-list-view' + timeout: 10000 \ No newline at end of file From d3deceae69d5e59a48b766efda6b5e0955f85b89 Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Sep 2025 17:55:50 +0530 Subject: [PATCH 05/37] Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat.ReactNative into 3rd-set-of-room-test From 1c60a8f21e7d5dd800ce19bbe9d45d31739e2399 Mon Sep 17 00:00:00 2001 From: Rohit3523 Date: Wed, 17 Sep 2025 12:26:51 +0000 Subject: [PATCH 06/37] chore: format code with Prettier [skip ci] --- .maestro/tests/room/room-actions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.maestro/tests/room/room-actions.yaml b/.maestro/tests/room/room-actions.yaml index acca4178aa4..1305a782b7a 100644 --- a/.maestro/tests/room/room-actions.yaml +++ b/.maestro/tests/room/room-actions.yaml @@ -756,4 +756,4 @@ onFlowComplete: - extendedWaitUntil: visible: id: 'rooms-list-view' - timeout: 10000 \ No newline at end of file + timeout: 10000 From 447347eb2328b170ec8fef8134f1b87f58737dce Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Sep 2025 18:41:13 +0530 Subject: [PATCH 07/37] change timeout to 60000 --- .maestro/tests/room/room-actions.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.maestro/tests/room/room-actions.yaml b/.maestro/tests/room/room-actions.yaml index acca4178aa4..4cb05dd2e0a 100644 --- a/.maestro/tests/room/room-actions.yaml +++ b/.maestro/tests/room/room-actions.yaml @@ -110,13 +110,13 @@ onFlowComplete: - extendedWaitUntil: visible: id: message-content-messageToStar - timeout: 10000 + timeout: 60000 - longPressOn: id: message-content-messageToStar - extendedWaitUntil: visible: id: 'action-sheet' - timeout: 10000 + timeout: 60000 - swipe: from: id: action-sheet-handle @@ -125,14 +125,14 @@ onFlowComplete: visible: text: 'Star' index: 1 - timeout: 10000 + timeout: 60000 - tapOn: text: 'Star' index: 1 - extendedWaitUntil: visible: text: 'Message starred' - timeout: 10000 + timeout: 60000 - tapOn: id: 'room-header' - extendedWaitUntil: @@ -161,13 +161,13 @@ onFlowComplete: - extendedWaitUntil: visible: id: message-content-messageToStar - timeout: 10000 + timeout: 60000 - longPressOn: id: message-content-messageToStar - extendedWaitUntil: visible: id: 'action-sheet' - timeout: 10000 + timeout: 60000 - swipe: from: id: action-sheet-handle @@ -175,13 +175,13 @@ onFlowComplete: - extendedWaitUntil: visible: text: 'Unstar' - timeout: 10000 + timeout: 60000 - tapOn: text: 'Unstar' - extendedWaitUntil: visible: text: 'Message unstarred' - timeout: 10000 + timeout: 60000 - tapOn: id: 'room-header' - extendedWaitUntil: @@ -215,13 +215,13 @@ onFlowComplete: - extendedWaitUntil: visible: id: 'message-content-messageToPin' - timeout: 10000 + timeout: 60000 - longPressOn: id: message-content-messageToPin - extendedWaitUntil: visible: id: 'action-sheet' - timeout: 10000 + timeout: 60000 - swipe: from: id: action-sheet-handle @@ -751,9 +751,9 @@ onFlowComplete: - extendedWaitUntil: visible: id: 'room-view-title-${output.otherUser.username}' - timeout: 10000 + timeout: 60000 - tapOn: Back - extendedWaitUntil: visible: id: 'rooms-list-view' - timeout: 10000 \ No newline at end of file + timeout: 60000 \ No newline at end of file From b932ef40884c7ae4fe9b0c5548cf7862450a46bf Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Sep 2025 18:48:02 +0530 Subject: [PATCH 08/37] fix --- .maestro/tests/room/room-actions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.maestro/tests/room/room-actions.yaml b/.maestro/tests/room/room-actions.yaml index 4cb05dd2e0a..2de736cd1cd 100644 --- a/.maestro/tests/room/room-actions.yaml +++ b/.maestro/tests/room/room-actions.yaml @@ -682,7 +682,7 @@ onFlowComplete: text: 'Cancel' # should ignore user -- evalScript: ${output.message = '${output.random()}ignoredmessagecontent'} +- evalScript: ${output.message = ${output.random()} + 'ignoredmessagecontent'} - evalScript: ${output.utils.sendMessage(output.otherUser.username, output.otherUser.password, output.room.name, output.message)} - extendedWaitUntil: visible: From 894a8d6ed8ac64e07fe8c669e2d1bbce5ab8c402 Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Sep 2025 18:48:19 +0530 Subject: [PATCH 09/37] fix --- .maestro/tests/room/room-actions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.maestro/tests/room/room-actions.yaml b/.maestro/tests/room/room-actions.yaml index 2de736cd1cd..f9e964e3767 100644 --- a/.maestro/tests/room/room-actions.yaml +++ b/.maestro/tests/room/room-actions.yaml @@ -682,7 +682,7 @@ onFlowComplete: text: 'Cancel' # should ignore user -- evalScript: ${output.message = ${output.random()} + 'ignoredmessagecontent'} +- evalScript: ${output.message = 'ignoredmessagecontent' - evalScript: ${output.utils.sendMessage(output.otherUser.username, output.otherUser.password, output.room.name, output.message)} - extendedWaitUntil: visible: From 3fa808455849474f24a4d1c9a195adc2d335b8d4 Mon Sep 17 00:00:00 2001 From: Rohit3523 Date: Wed, 17 Sep 2025 13:19:33 +0000 Subject: [PATCH 10/37] chore: format code with Prettier [skip ci] --- .maestro/tests/room/room-actions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.maestro/tests/room/room-actions.yaml b/.maestro/tests/room/room-actions.yaml index f9e964e3767..5e5230925ec 100644 --- a/.maestro/tests/room/room-actions.yaml +++ b/.maestro/tests/room/room-actions.yaml @@ -756,4 +756,4 @@ onFlowComplete: - extendedWaitUntil: visible: id: 'rooms-list-view' - timeout: 60000 \ No newline at end of file + timeout: 60000 From 72aac2665bf79c02bd9461cc30365356270692b0 Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Sep 2025 19:14:32 +0530 Subject: [PATCH 11/37] Fix for send message --- .maestro/tests/room/room-actions.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.maestro/tests/room/room-actions.yaml b/.maestro/tests/room/room-actions.yaml index f9e964e3767..7e625c41f2f 100644 --- a/.maestro/tests/room/room-actions.yaml +++ b/.maestro/tests/room/room-actions.yaml @@ -682,8 +682,7 @@ onFlowComplete: text: 'Cancel' # should ignore user -- evalScript: ${output.message = 'ignoredmessagecontent' -- evalScript: ${output.utils.sendMessage(output.otherUser.username, output.otherUser.password, output.room.name, output.message)} +- evalScript: ${output.utils.sendMessage(output.otherUser.username, output.otherUser.password, output.room.name, 'ignoredmessagecontent')} - extendedWaitUntil: visible: id: 'room-members-view-item-${output.otherUser.username}' @@ -716,7 +715,7 @@ onFlowComplete: text: '.*Message ignored. Tap to display it.*' - extendedWaitUntil: visible: - text: '.*${output.message}.*' + text: '.*ignoredmessagecontent.*' timeout: 60000 # should navigate to direct message From 1e8b20552151f398b0d103c5b90e03c3a2a7805f Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Sep 2025 20:35:57 +0530 Subject: [PATCH 12/37] discussion basic --- .maestro/tests/room/discussion.yaml | 112 ++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 .maestro/tests/room/discussion.yaml diff --git a/.maestro/tests/room/discussion.yaml b/.maestro/tests/room/discussion.yaml new file mode 100644 index 00000000000..06f29d9b988 --- /dev/null +++ b/.maestro/tests/room/discussion.yaml @@ -0,0 +1,112 @@ +appId: chat.rocket.reactnative +name: Discussion +onFlowStart: + - runFlow: '../../helpers/setup.yaml' +onFlowComplete: + - evalScript: ${output.utils.deleteCreatedUsers()} + +--- +- runFlow: '../../helpers/launch-app.yaml' + +- evalScript: ${output.user = output.utils.createUser()} +- evalScript: ${output.room = output.utils.createRandomRoom(output.user.username, output.user.password)} +- evalScript: ${output.discussionFromNewMessage = output.random() + ' Discussion NewMessageView'} +- evalScript: ${output.discussionFromMessageComposer = output.random() + ' Discussion MessageComposer actions'} +- evalScript: ${output.selectUser = 'rocket.cat'} + +- runFlow: + file: '../../helpers/login.yaml' + env: + USERNAME: ${output.user.username} + PASSWORD: ${output.user.password} + +# should create discussion from NewMessageView +- extendedWaitUntil: + visible: + id: 'rooms-list-view' + timeout: 60000 +- assertVisible: + id: 'rooms-list-view-create-channel' +- tapOn: + id: 'rooms-list-view-create-channel' +- extendedWaitUntil: + visible: + id: 'new-message-view' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'new-message-view-create-discussion' + timeout: 60000 +- tapOn: + id: 'new-message-view-create-discussion' +- extendedWaitUntil: + visible: + id: 'create-discussion-view' + timeout: 60000 +- tapOn: 'Select a channel' +- extendedWaitUntil: + visible: + id: 'action-sheet' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'multi-select-item-${output.room.name}' + timeout: 60000 +- tapOn: + id: 'multi-select-item-${output.room.name}' +- tapOn: + id: 'multi-select-discussion-name' +- inputText: ${output.discussionFromNewMessage} +- tapOn: 'Select users' +- extendedWaitUntil: + visible: + id: 'action-sheet' + timeout: 60000 +- tapOn: + id: 'multi-select-search' +- inputText: ${output.selectUser} +- extendedWaitUntil: + visible: + id: 'multi-select-item-${output.selectUser}' + timeout: 60000 +- tapOn: + id: 'multi-select-item-${output.selectUser}' +- extendedWaitUntil: + visible: + id: 'multi-select-chip-${output.selectUser}' + timeout: 60000 +- eraseText +- inputText: 'user' +- extendedWaitUntil: + notVisible: + id: 'multi-select-item-${output.selectUser}' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'multi-select-chip-${output.selectUser}' + timeout: 60000 +- tapOn: + id: 'create-discussion-view' +- tapOn: + id: 'multi-select-chip-${output.selectUser}' +- extendedWaitUntil: + notVisible: + id: 'multi-select-chip-${output.selectUser}' + timeout: 60000 +- tapOn: + id: 'create-discussion-submit' +- extendedWaitUntil: + visible: + id: 'room-view' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'room-view-title-${output.discussionFromNewMessage}' + timeout: 60000 +- tapOn: 'Back' +- extendedWaitUntil: + visible: + id: 'rooms-list-view-item-${output.discussionFromNewMessage}' + timeout: 60000 + +# should create discussion from MessageComposer Actions From d5e78df02c0bf963f4fdbb0e216166882fc83f33 Mon Sep 17 00:00:00 2001 From: Rohit3523 Date: Wed, 17 Sep 2025 15:07:06 +0000 Subject: [PATCH 13/37] chore: format code with Prettier [skip ci] --- .maestro/tests/room/discussion.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.maestro/tests/room/discussion.yaml b/.maestro/tests/room/discussion.yaml index 06f29d9b988..c8fae3ce375 100644 --- a/.maestro/tests/room/discussion.yaml +++ b/.maestro/tests/room/discussion.yaml @@ -108,5 +108,4 @@ onFlowComplete: visible: id: 'rooms-list-view-item-${output.discussionFromNewMessage}' timeout: 60000 - # should create discussion from MessageComposer Actions From 769ad49d52effee092022c3154eaddb67fe9e8c4 Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Sep 2025 21:04:24 +0530 Subject: [PATCH 14/37] Added test id to multi select --- app/containers/UIKit/MultiSelect/Input.tsx | 4 +++- app/containers/UIKit/MultiSelect/index.tsx | 10 ++++++---- app/views/CreateDiscussionView/SelectUsers.tsx | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/containers/UIKit/MultiSelect/Input.tsx b/app/containers/UIKit/MultiSelect/Input.tsx index cfa61894434..47a1cb8203a 100644 --- a/app/containers/UIKit/MultiSelect/Input.tsx +++ b/app/containers/UIKit/MultiSelect/Input.tsx @@ -15,13 +15,15 @@ interface IInput { placeholder?: string; loading?: boolean; innerInputStyle?: object; + testID?: string; } -const Input = ({ children, onPress, loading, inputStyle, placeholder, disabled, innerInputStyle }: IInput) => { +const Input = ({ children, onPress, loading, inputStyle, placeholder, disabled, innerInputStyle, testID }: IInput) => { const { colors } = useTheme(); return ( diff --git a/app/containers/UIKit/MultiSelect/index.tsx b/app/containers/UIKit/MultiSelect/index.tsx index 52c25479f61..32c00e66d92 100644 --- a/app/containers/UIKit/MultiSelect/index.tsx +++ b/app/containers/UIKit/MultiSelect/index.tsx @@ -38,6 +38,7 @@ interface IMultiSelect { value?: any[]; disabled?: boolean; innerInputStyle?: object; + testID?: string; } export const MultiSelect = React.memo( @@ -53,7 +54,8 @@ export const MultiSelect = React.memo( onClose = () => {}, disabled, inputStyle, - innerInputStyle + innerInputStyle, + testID, }: IMultiSelectWithMultiSelect | IMultiSelectWithoutMultiSelect) => { const { colors } = useTheme(); const [selected, select] = useState(Array.isArray(values) ? values : []); @@ -116,9 +118,9 @@ export const MultiSelect = React.memo( }; let button = multiselect ? ( -