From fc83a687f59c3d24a73c2b4ee5d05479a3279240 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Mon, 23 Feb 2026 22:59:31 +0530 Subject: [PATCH 01/27] Improvements --- .github/workflows/maestro-android.yml | 35 +++++++++++++++++++++------ .github/workflows/maestro-ios.yml | 26 +++++++++++++++++--- 2 files changed, 50 insertions(+), 11 deletions(-) diff --git a/.github/workflows/maestro-android.yml b/.github/workflows/maestro-android.yml index 752714fe668..9f2bfaaf211 100644 --- a/.github/workflows/maestro-android.yml +++ b/.github/workflows/maestro-android.yml @@ -19,8 +19,22 @@ jobs: - name: Setup Java uses: actions/setup-java@v4 with: - distribution: 'temurin' - java-version: '17' + distribution: temurin + java-version: 17 + + - name: Cache Android AVD + uses: actions/cache@v4 + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: avd-${{ runner.os }}-api34 + + - name: Cache Maestro + uses: actions/cache@v4 + with: + path: ~/.maestro + key: maestro-${{ runner.os }} - name: Download APK uses: actions/download-artifact@v4 @@ -34,21 +48,27 @@ jobs: - name: Install Maestro run: | - curl -fsSL "https://get.maestro.mobile.dev" | bash - echo "$HOME/.maestro/bin" >> $GITHUB_PATH - + curl -Ls "https://get.maestro.mobile.dev" | bash + env: + MAESTRO_VERSION: 2.2.0 + - name: Enable KVM group permissions run: | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules sudo udevadm control --reload-rules sudo udevadm trigger --name-match=kvm + - name: Disable unnecessary services (improves emulator stability) + run: | + sudo systemctl stop docker || true + sudo systemctl stop snapd || true + - name: Make Maestro script executable run: chmod +x .github/scripts/run-maestro.sh - name: Start Android Emulator and Run Maestro Tests uses: reactivecircus/android-emulator-runner@v2 - timeout-minutes: 120 + timeout-minutes: 60 with: api-level: 34 disk-size: 4096M @@ -58,8 +78,9 @@ jobs: cores: 4 ram-size: 4096M force-avd-creation: false - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true + emulator-boot-timeout: 900 + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -accel on script: ./.github/scripts/run-maestro.sh android ${{ inputs.shard }} - name: Android Maestro Logs diff --git a/.github/workflows/maestro-ios.yml b/.github/workflows/maestro-ios.yml index 4fc43f2ff0b..e84418ba654 100644 --- a/.github/workflows/maestro-ios.yml +++ b/.github/workflows/maestro-ios.yml @@ -9,7 +9,7 @@ on: jobs: ios-test: - runs-on: macos-14 + runs-on: macos-26 steps: - name: Checkout Repo @@ -32,12 +32,19 @@ jobs: with: E2E_ACCOUNT: ${{ secrets.E2E_ACCOUNT }} + - name: Cache Maestro + uses: actions/cache@v4 + with: + path: ~/.maestro + key: maestro-macos + - name: Install Maestro run: | brew tap facebook/fb brew install facebook/fb/idb-companion - curl -fsSL "https://get.maestro.mobile.dev" | bash - echo "$HOME/.maestro/bin" >> $GITHUB_PATH + curl -Ls "https://get.maestro.mobile.dev" | bash + env: + MAESTRO_VERSION: 2.2.0 - name: Configure Simulator run: | @@ -50,6 +57,8 @@ jobs: - name: Boot Simulator timeout-minutes: 30 run: | + open -a Simulator + SIM_NAME="iPhone 16 Pro Max" TIMEOUT=300 # 5 minutes in seconds INTERVAL=5 # Check every 5 seconds @@ -87,12 +96,21 @@ jobs: - name: Make Maestro script executable run: chmod +x .github/scripts/run-maestro.sh + - name: Set Maestro Driver Startup Timeout + run: echo "MAESTRO_DRIVER_STARTUP_TIMEOUT=180000" >> $GITHUB_ENV + - name: Install App run: | xcrun simctl install $UDID "ios-simulator-app" - name: Run Tests - timeout-minutes: 120 + timeout-minutes: 60 + id: maestro_run + run: ./.github/scripts/run-maestro.sh ios ${{ inputs.shard }} + + - name: Run Tests (Retry) + if: steps.maestro_run.outcome == 'failure' + timeout-minutes: 60 run: ./.github/scripts/run-maestro.sh ios ${{ inputs.shard }} - name: iOS Maestro Logs From 83f8c025e50cf3f12e2802aa2d046c511b95fbce Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Mon, 23 Feb 2026 23:54:55 +0530 Subject: [PATCH 02/27] Added retry logic for maestro api calling --- .maestro/scripts/data-setup.js | 63 ++++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 10 deletions(-) diff --git a/.maestro/scripts/data-setup.js b/.maestro/scripts/data-setup.js index 0a56bf62ca0..76d1017f224 100644 --- a/.maestro/scripts/data-setup.js +++ b/.maestro/scripts/data-setup.js @@ -22,7 +22,7 @@ const getDeepLink = (method, server, ...params) => { const login = (username, password) => { - const response = http.post(`${data.server}/api/v1/login`, { + const response = postWithRetry(`${data.server}/a1pi/v1/login`, { headers: { 'Content-Type': 'application/json' }, @@ -44,7 +44,7 @@ const createUser = (customProps) => { login(output.account.adminUser, output.account.adminPassword); - http.post(`${data.server}/api/v1/users.create`, { + postWithRetry(`${data.server}/api/v1/users.create`, { headers: { 'Content-Type': 'application/json', ...headers @@ -74,7 +74,7 @@ const deleteCreatedUser = async ({ username: usernameToDelete }) => { try { login(output.account.adminUser, output.account.adminPassword); - const result = http.get(`${data.server}/api/v1/users.info?username=${usernameToDelete}`, { + const result = getWithRetry(`${data.server}/api/v1/users.info?username=${usernameToDelete}`, { headers: { 'Content-Type': 'application/json', ...headers @@ -82,7 +82,7 @@ const deleteCreatedUser = async ({ username: usernameToDelete }) => { }); const userId = json(result.body)?.data?.user?._id; - http.post(`${data.server}/api/v1/users.delete`, { userId, confirmRelinquish: true }, { + postWithRetry(`${data.server}/api/v1/users.delete`, { userId, confirmRelinquish: true }, { headers: { 'Content-Type': 'application/json', ...headers @@ -98,7 +98,7 @@ const createRandomTeam = (username, password) => { const teamName = output.randomTeamName(); - http.post(`${data.server}/api/v1/teams.create`, { + postWithRetry(`${data.server}/api/v1/teams.create`, { headers: { 'Content-Type': 'application/json', ...headers @@ -113,7 +113,7 @@ const createRandomRoom = (username, password, type = 'c') => { login(username, password); const room = `room${output.random()}`; - const response = http.post(`${data.server}/api/v1/${type === 'c' ? 'channels.create' : 'groups.create'}`, { + const response = postWithRetry(`${data.server}/api/v1/${type === 'c' ? 'channels.create' : 'groups.create'}`, { headers: { 'Content-Type': 'application/json', ...headers @@ -133,7 +133,7 @@ const sendMessage = (username, password, channel, msg, tmid) => { login(username, password); const channelParam = tmid ? { roomId: channel } : { channel }; - const response = http.post(`${data.server}/api/v1/chat.postMessage`, { + const response = postWithRetry(`${data.server}/api/v1/chat.postMessage`, { headers: { 'Content-Type': 'application/json', ...headers @@ -153,7 +153,7 @@ const sendMessage = (username, password, channel, msg, tmid) => { const getProfileInfo = (userId) => { login(output.account.adminUser, output.account.adminPassword); - const result = http.get(`${data.server}/api/v1/users.info?userId=${userId}`, { + const result = getWithRetry(`${data.server}/api/v1/users.info?userId=${userId}`, { headers: { 'Content-Type': 'application/json', ...headers @@ -168,7 +168,7 @@ const getProfileInfo = (userId) => { const post = (endpoint, username, password, body) => { login(username, password); - const response = http.post(`${data.server}/api/v1/${endpoint}`, { + const response = postWithRetry(`${data.server}/api/v1/${endpoint}`, { headers: { 'Content-Type': 'application/json', ...headers @@ -182,7 +182,7 @@ const post = (endpoint, username, password, body) => { const createDM = (username, password, otherUsername) => { login(username, password); - const result = http.post(`${data.server}/api/v1/im.create`, { + const result = postWithRetry(`${data.server}/api/v1/im.create`, { headers: { 'Content-Type': 'application/json', ...headers @@ -208,6 +208,49 @@ function logAccounts() { console.log(JSON.stringify(data.accounts)); } +function sleep(ms) { + const start = Date.now(); + while (Date.now() - start < ms) { } +} + +const retryRequest = (fn, { + retries = 3, + delay = 1000, + factor = 2 +} = {}) => { + let lastError; + + for (let attempt = 1; attempt <= retries; attempt++) { + try { + const response = fn(); + + if (response && response.status >= 200 && response.status < 300) { + return response; + } + + if (response && response.status >= 400 && response.status < 500) { + throw new Error(`Non-retryable error ${response.status}`); + } + + lastError = new Error(`HTTP ${response ? response.status : 'unknown'}`); + } catch (err) { + lastError = err; + } + + if (attempt < retries) { + const wait = delay * Math.pow(factor, attempt - 1); + console.log(`Retry ${attempt}/${retries} after ${wait}ms`); + sleep(wait); + } + } + + throw lastError; +}; + +const postWithRetry = (url, options) => retryRequest(() => http.post(url, options)); + +const getWithRetry = (url, options) => retryRequest(() => http.get(url, options)); + output.utils = { createUser, createUserWithPasswordChange, From b0882fb4c40437c596c4ed96b4e27481dd043206 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Tue, 24 Feb 2026 00:16:16 +0530 Subject: [PATCH 03/27] use macos 14 --- .github/workflows/maestro-ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maestro-ios.yml b/.github/workflows/maestro-ios.yml index e84418ba654..fd33483351e 100644 --- a/.github/workflows/maestro-ios.yml +++ b/.github/workflows/maestro-ios.yml @@ -9,7 +9,7 @@ on: jobs: ios-test: - runs-on: macos-26 + runs-on: macos-14 steps: - name: Checkout Repo From a76c24af5451aef9890517a543aa865f10f394cd Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Tue, 24 Feb 2026 00:18:41 +0530 Subject: [PATCH 04/27] Add maestro path in android --- .github/workflows/maestro-android.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/maestro-android.yml b/.github/workflows/maestro-android.yml index 9f2bfaaf211..4c05949c5e4 100644 --- a/.github/workflows/maestro-android.yml +++ b/.github/workflows/maestro-android.yml @@ -49,6 +49,7 @@ jobs: - name: Install Maestro run: | curl -Ls "https://get.maestro.mobile.dev" | bash + echo "$HOME/.maestro/bin" >> $GITHUB_PATH env: MAESTRO_VERSION: 2.2.0 From 9653ebbc34aeebec42ddcf2823be0b01b523b296 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Tue, 24 Feb 2026 00:40:42 +0530 Subject: [PATCH 05/27] fix api... --- .maestro/scripts/data-setup.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.maestro/scripts/data-setup.js b/.maestro/scripts/data-setup.js index 76d1017f224..f6da97b4ba1 100644 --- a/.maestro/scripts/data-setup.js +++ b/.maestro/scripts/data-setup.js @@ -22,7 +22,7 @@ const getDeepLink = (method, server, ...params) => { const login = (username, password) => { - const response = postWithRetry(`${data.server}/a1pi/v1/login`, { + const response = postWithRetry(`${data.server}/api/v1/login`, { headers: { 'Content-Type': 'application/json' }, @@ -219,7 +219,6 @@ const retryRequest = (fn, { factor = 2 } = {}) => { let lastError; - for (let attempt = 1; attempt <= retries; attempt++) { try { const response = fn(); From 8a972e7012bb131ed50a234b9e4b9456722a3f4f Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Tue, 24 Feb 2026 01:16:43 +0530 Subject: [PATCH 06/27] Add maestro in path --- .github/workflows/maestro-ios.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/maestro-ios.yml b/.github/workflows/maestro-ios.yml index fd33483351e..32894d227f1 100644 --- a/.github/workflows/maestro-ios.yml +++ b/.github/workflows/maestro-ios.yml @@ -43,6 +43,7 @@ jobs: brew tap facebook/fb brew install facebook/fb/idb-companion curl -Ls "https://get.maestro.mobile.dev" | bash + echo "$HOME/.maestro/bin" >> $GITHUB_PATH env: MAESTRO_VERSION: 2.2.0 From d7eae22303015907a7f00ab02207f1e40f8e63b5 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Tue, 24 Feb 2026 01:17:06 +0530 Subject: [PATCH 07/27] improve --- .maestro/scripts/data-setup.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.maestro/scripts/data-setup.js b/.maestro/scripts/data-setup.js index f6da97b4ba1..ba6f79ba57f 100644 --- a/.maestro/scripts/data-setup.js +++ b/.maestro/scripts/data-setup.js @@ -82,11 +82,12 @@ const deleteCreatedUser = async ({ username: usernameToDelete }) => { }); const userId = json(result.body)?.data?.user?._id; - postWithRetry(`${data.server}/api/v1/users.delete`, { userId, confirmRelinquish: true }, { + postWithRetry(`${data.server}/api/v1/users.delete`, { headers: { 'Content-Type': 'application/json', ...headers - } + }, + body: JSON.stringify({ userId, confirmRelinquish: true }) }); } catch (error) { console.log(JSON.stringify(error)); From 312cfff15f1c5119495f47fdcebc35a57388e246 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Tue, 24 Feb 2026 01:20:41 +0530 Subject: [PATCH 08/27] Use hidekeyboard from helper --- .maestro/helpers/create-account.yaml | 2 +- .maestro/tests/assorted/broadcast.yaml | 2 +- .maestro/tests/assorted/change-avatar.yaml | 2 +- .maestro/tests/e2ee/flows/create-e2ee-room.yaml | 2 +- .maestro/tests/e2ee/utils/change-e2ee-key.yaml | 2 +- .maestro/tests/onboarding/change-password.yaml | 4 ++-- .../tests/onboarding/login/invalid-credentials.yaml | 2 +- .maestro/tests/onboarding/login/login.yaml | 2 +- .../tests/onboarding/register/create-account.yaml | 2 +- .maestro/tests/room/create-room.yaml | 12 ++++++------ .maestro/tests/room/ignoreuser.yaml | 4 ++-- .maestro/tests/room/room.yaml | 8 ++++---- .maestro/tests/room/share-message.yaml | 2 +- .maestro/tests/teams/team.yaml | 6 +++--- .maestro/tests/teams/utils/create-channel.yaml | 2 +- 15 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.maestro/helpers/create-account.yaml b/.maestro/helpers/create-account.yaml index e451feccc23..01350a1d8d1 100644 --- a/.maestro/helpers/create-account.yaml +++ b/.maestro/helpers/create-account.yaml @@ -24,7 +24,7 @@ tags: - tapOn: id: register-view-confirm-password - inputText: ${output.user.password} -- hideKeyboard +- runFlow: './hide-keyboard.yaml' - scrollUntilVisible: element: id: register-view-submit diff --git a/.maestro/tests/assorted/broadcast.yaml b/.maestro/tests/assorted/broadcast.yaml index 1ee8df14453..f8bca168bc4 100644 --- a/.maestro/tests/assorted/broadcast.yaml +++ b/.maestro/tests/assorted/broadcast.yaml @@ -65,7 +65,7 @@ tags: - tapOn: id: 'create-channel-name' - inputText: ${output.room} -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - assertVisible: id: 'create-channel-broadcast' - tapOn: diff --git a/.maestro/tests/assorted/change-avatar.yaml b/.maestro/tests/assorted/change-avatar.yaml index da1ab5c351e..385d04df75c 100644 --- a/.maestro/tests/assorted/change-avatar.yaml +++ b/.maestro/tests/assorted/change-avatar.yaml @@ -173,7 +173,7 @@ tags: timeout: 60000 - tapOn: text: 'Fetch image from URL' -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: 'change-avatar-view-submit' diff --git a/.maestro/tests/e2ee/flows/create-e2ee-room.yaml b/.maestro/tests/e2ee/flows/create-e2ee-room.yaml index 07dbebd8c8b..551a94362c6 100644 --- a/.maestro/tests/e2ee/flows/create-e2ee-room.yaml +++ b/.maestro/tests/e2ee/flows/create-e2ee-room.yaml @@ -44,7 +44,7 @@ tags: - tapOn: id: 'create-channel-name' - inputText: ${ROOM} -- hideKeyboard +- runFlow: '../../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: 'create-channel-encrypted' diff --git a/.maestro/tests/e2ee/utils/change-e2ee-key.yaml b/.maestro/tests/e2ee/utils/change-e2ee-key.yaml index 125cc968a6e..4ff8767bee9 100644 --- a/.maestro/tests/e2ee/utils/change-e2ee-key.yaml +++ b/.maestro/tests/e2ee/utils/change-e2ee-key.yaml @@ -7,7 +7,7 @@ tags: - tapOn: Enter manually - tapOn: New password - inputText: ${output.data.e2eePassword} -- hideKeyboard +- runFlow: '../../../helpers/hide-keyboard.yaml' - swipe: direction: DOWN duration: 100 diff --git a/.maestro/tests/onboarding/change-password.yaml b/.maestro/tests/onboarding/change-password.yaml index cc3f0e2ee66..5c5276aa5e5 100644 --- a/.maestro/tests/onboarding/change-password.yaml +++ b/.maestro/tests/onboarding/change-password.yaml @@ -26,13 +26,13 @@ tags: - tapOn: id: change-password-view-new-password - inputText: 123456 -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - assertVisible: id: change-password-view-confirm-new-password - tapOn: id: change-password-view-confirm-new-password - inputText: 123456 -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - assertVisible: id: change-password-view-set-new-password-button - tapOn: diff --git a/.maestro/tests/onboarding/login/invalid-credentials.yaml b/.maestro/tests/onboarding/login/invalid-credentials.yaml index f896d60d03d..6068f2761b1 100644 --- a/.maestro/tests/onboarding/login/invalid-credentials.yaml +++ b/.maestro/tests/onboarding/login/invalid-credentials.yaml @@ -17,7 +17,7 @@ tags: - tapOn: id: 'login-view-password' - inputText: 'NotMyActualPassword' -- hideKeyboard +- runFlow: '../../../helpers/hide-keyboard.yaml' - tapOn: id: login-view-submit - assertVisible: diff --git a/.maestro/tests/onboarding/login/login.yaml b/.maestro/tests/onboarding/login/login.yaml index 3d1df9a6f01..133daf00888 100644 --- a/.maestro/tests/onboarding/login/login.yaml +++ b/.maestro/tests/onboarding/login/login.yaml @@ -18,7 +18,7 @@ tags: - tapOn: id: 'login-view-password' - inputText: ${output.createdUser.password} -- hideKeyboard +- runFlow: '../../../helpers/hide-keyboard.yaml' - tapOn: id: login-view-submit - extendedWaitUntil: diff --git a/.maestro/tests/onboarding/register/create-account.yaml b/.maestro/tests/onboarding/register/create-account.yaml index 58fc4ed842c..79364d8e509 100644 --- a/.maestro/tests/onboarding/register/create-account.yaml +++ b/.maestro/tests/onboarding/register/create-account.yaml @@ -28,7 +28,7 @@ tags: - tapOn: id: register-view-confirm-password - inputText: ${output.user.password} -- hideKeyboard +- runFlow: '../../../helpers/hide-keyboard.yaml' - scrollUntilVisible: element: id: register-view-submit diff --git a/.maestro/tests/room/create-room.yaml b/.maestro/tests/room/create-room.yaml index 5e92836ad0c..3daabbf9df6 100644 --- a/.maestro/tests/room/create-room.yaml +++ b/.maestro/tests/room/create-room.yaml @@ -171,7 +171,7 @@ tags: - tapOn: id: 'create-channel-name' - inputText: 'general' -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: 'create-channel-submit' @@ -190,7 +190,7 @@ tags: id: 'create-channel-name' - eraseText: 100 - inputText: ${output.publicRoomName} -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - tapOn: id: 'create-channel-type' - extendedWaitUntil: @@ -258,7 +258,7 @@ tags: - tapOn: id: 'create-channel-name' - inputText: ${output.privateRoomName} -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: 'create-channel-submit' @@ -322,7 +322,7 @@ tags: - tapOn: id: 'create-channel-name' - inputText: ${output.emptyRoomName} -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: 'create-channel-submit' @@ -392,7 +392,7 @@ tags: - tapOn: id: 'create-channel-name' - inputText: ${output.nonLatinRoomName} - - hideKeyboard + - runFlow: '../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: 'create-channel-submit' @@ -429,7 +429,7 @@ tags: - tapOn: id: 'rooms-list-view-search-input' - inputText: ${output.nonLatinRoomNameLower} - - hideKeyboard + - runFlow: '../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: ${'rooms-list-view-item-' + output.nonLatinRoomName} diff --git a/.maestro/tests/room/ignoreuser.yaml b/.maestro/tests/room/ignoreuser.yaml index f545cead62f..c3509d97e59 100644 --- a/.maestro/tests/room/ignoreuser.yaml +++ b/.maestro/tests/room/ignoreuser.yaml @@ -192,7 +192,7 @@ tags: visible: id: 'report-user-view-submit' timeout: 60000 -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - tapOn: id: 'report-user-view-submit' retryTapIfNoChange: true @@ -235,7 +235,7 @@ tags: - tapOn: id: 'report-user-view-input' - inputText: 'e2e test' -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: 'report-user-view-submit' diff --git a/.maestro/tests/room/room.yaml b/.maestro/tests/room/room.yaml index fa6c6f983b8..6c61b8f8184 100644 --- a/.maestro/tests/room/room.yaml +++ b/.maestro/tests/room/room.yaml @@ -161,7 +161,7 @@ tags: - tapOn: id: emoji-searchbar-input - inputText: 'laughing' -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: emoji-laughing @@ -487,7 +487,7 @@ tags: - tapOn: id: message-composer-input - inputText: ${output.replyMessage} -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - tapOn: id: message-composer-send - extendedWaitUntil: @@ -510,7 +510,7 @@ tags: - tapOn: id: message-composer-input - inputText: 'draft' -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - runFlow: '../../helpers/go-back.yaml' - runFlow: file: '../../helpers/navigate-to-room.yaml' @@ -565,7 +565,7 @@ tags: - tapOn: id: message-composer-input - inputText: ${output.draftMessage} -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - runFlow: '../../helpers/go-back.yaml' - runFlow: file: '../../helpers/navigate-to-room.yaml' diff --git a/.maestro/tests/room/share-message.yaml b/.maestro/tests/room/share-message.yaml index 4bbf18fff3e..fa56d7ab638 100644 --- a/.maestro/tests/room/share-message.yaml +++ b/.maestro/tests/room/share-message.yaml @@ -68,7 +68,7 @@ tags: - tapOn: id: 'multi-select-search' - inputText: ${output.otherUser.username} -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: multi-select-item-${output.otherUser.username.toLowerCase()} diff --git a/.maestro/tests/teams/team.yaml b/.maestro/tests/teams/team.yaml index 67ba897ffb1..65fcffb2f74 100644 --- a/.maestro/tests/teams/team.yaml +++ b/.maestro/tests/teams/team.yaml @@ -106,7 +106,7 @@ tags: - tapOn: id: create-channel-name - inputText: ${output.privateRoomName} -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: create-channel-submit @@ -297,7 +297,7 @@ tags: - tapOn: id: select-users-view-search - inputText: rocket.cat -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: select-users-view-item-rocket.cat @@ -316,7 +316,7 @@ tags: id: select-users-view-search - eraseText - inputText: ${output.secondUser.username} -- hideKeyboard +- runFlow: '../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: select-users-view-item-${output.secondUser.username} diff --git a/.maestro/tests/teams/utils/create-channel.yaml b/.maestro/tests/teams/utils/create-channel.yaml index 679c0c2c8c8..e8f9d91fcb2 100644 --- a/.maestro/tests/teams/utils/create-channel.yaml +++ b/.maestro/tests/teams/utils/create-channel.yaml @@ -34,7 +34,7 @@ tags: - tapOn: id: create-channel-name - inputText: ${channelName} -- hideKeyboard +- runFlow: '../../../helpers/hide-keyboard.yaml' - runFlow: when: From d814fb7bef143f882711692242da80c8738b4e95 Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Tue, 24 Feb 2026 11:58:02 +0530 Subject: [PATCH 09/27] Refactor iOS workflow for Maestro installation and setup --- .github/workflows/maestro-ios.yml | 89 +++++++++++-------------------- 1 file changed, 32 insertions(+), 57 deletions(-) diff --git a/.github/workflows/maestro-ios.yml b/.github/workflows/maestro-ios.yml index 32894d227f1..a8e993aeb8e 100644 --- a/.github/workflows/maestro-ios.yml +++ b/.github/workflows/maestro-ios.yml @@ -18,8 +18,8 @@ jobs: - name: Setup Java uses: actions/setup-java@v4 with: - distribution: 'temurin' - java-version: '17' + distribution: temurin + java-version: "17" - name: Download App uses: actions/download-artifact@v4 @@ -32,89 +32,64 @@ jobs: with: E2E_ACCOUNT: ${{ secrets.E2E_ACCOUNT }} - - name: Cache Maestro - uses: actions/cache@v4 - with: - path: ~/.maestro - key: maestro-macos - - - name: Install Maestro + - name: Install Maestro + idb run: | brew tap facebook/fb brew install facebook/fb/idb-companion - curl -Ls "https://get.maestro.mobile.dev" | bash + curl -fsSL https://get.maestro.mobile.dev | bash echo "$HOME/.maestro/bin" >> $GITHUB_PATH - env: - MAESTRO_VERSION: 2.2.0 - name: Configure Simulator run: | defaults write com.apple.iphonesimulator ConnectHardwareKeyboard -bool false - defaults write com.apple.iphonesimulator ShowSingleTouches 1 defaults write com.apple.iphonesimulator SlowAnimations -bool false defaults write com.apple.iphonesimulator ShowDeviceBezels -bool false defaults write com.apple.iphonesimulator DisableShadows -bool true + defaults write com.apple.iphonesimulator AllowFullscreenMode -bool false + defaults write com.apple.iphonesimulator PasteboardAutomaticSync -bool false + defaults write com.apple.iphonesimulator ShowChrome -bool false + defaults write com.apple.iphonesimulator DeviceFramebufferOnly -bool true - name: Boot Simulator - timeout-minutes: 30 + timeout-minutes: 15 run: | - open -a Simulator + SIM_NAME="iPhone SE (3rd generation)" + + echo "Booting simulator: $SIM_NAME" - SIM_NAME="iPhone 16 Pro Max" - TIMEOUT=300 # 5 minutes in seconds - INTERVAL=5 # Check every 5 seconds - xcrun simctl boot "$SIM_NAME" || true - - ELAPSED=0 - while true; do - BOOTED=$(xcrun simctl list devices | grep "$SIM_NAME (" | grep "(Booted)") - if [ -n "$BOOTED" ]; then - echo "$SIM_NAME is booted" - break - fi - - if [ $ELAPSED -ge $TIMEOUT ]; then - echo "Simulator did not boot within 5 minutes. Retrying..." - xcrun simctl shutdown "$SIM_NAME" - xcrun simctl boot "$SIM_NAME" - ELAPSED=0 - fi - - sleep $INTERVAL - ELAPSED=$((ELAPSED + INTERVAL)) - done - + xcrun simctl bootstatus "$SIM_NAME" -b + + echo "Disabling animations" + xcrun simctl spawn booted defaults write -g UIAnimationDragCoefficient -float 10 + + echo "Warming SpringBoard" + xcrun simctl launch booted com.apple.springboard + sleep 15 + + echo "Booted devices:" xcrun simctl list devices | grep Booted - - name: Get Simulator UDID + - name: Get Booted Simulator UDID id: booted-sim run: | - UDID=$(xcrun simctl list devices | grep "iPhone 16 Pro Max (" | grep "(Booted)" | grep -oE '[A-F0-9-]{36}' | head -n1) + UDID=$(xcrun simctl list devices booted | grep -oE '[A-F0-9-]{36}' | head -n1) echo "UDID=$UDID" echo "UDID=$UDID" >> $GITHUB_ENV - - name: Make Maestro script executable - run: chmod +x .github/scripts/run-maestro.sh - - - name: Set Maestro Driver Startup Timeout - run: echo "MAESTRO_DRIVER_STARTUP_TIMEOUT=180000" >> $GITHUB_ENV - - name: Install App run: | - xcrun simctl install $UDID "ios-simulator-app" + xcrun simctl install booted ios-simulator-app - - name: Run Tests - timeout-minutes: 60 - id: maestro_run - run: ./.github/scripts/run-maestro.sh ios ${{ inputs.shard }} + - name: Make Maestro Script Executable + run: chmod +x .github/scripts/run-maestro.sh - - name: Run Tests (Retry) - if: steps.maestro_run.outcome == 'failure' - timeout-minutes: 60 - run: ./.github/scripts/run-maestro.sh ios ${{ inputs.shard }} + - name: Run Maestro Tests + timeout-minutes: 120 + run: | + ./.github/scripts/run-maestro.sh ios ${{ inputs.shard }} - - name: iOS Maestro Logs + - name: Upload Maestro Logs if: always() uses: actions/upload-artifact@v4 with: From 1d575a47aee30d7097622747ebcfe5408b5f48ca Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Tue, 24 Feb 2026 16:49:52 +0530 Subject: [PATCH 10/27] try 16 pro --- .github/workflows/maestro-ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maestro-ios.yml b/.github/workflows/maestro-ios.yml index a8e993aeb8e..762edb686b1 100644 --- a/.github/workflows/maestro-ios.yml +++ b/.github/workflows/maestro-ios.yml @@ -53,7 +53,7 @@ jobs: - name: Boot Simulator timeout-minutes: 15 run: | - SIM_NAME="iPhone SE (3rd generation)" + SIM_NAME="iPhone 16 Pro" echo "Booting simulator: $SIM_NAME" From 8966d77aa3c159708a0701e3781ec0267c06e617 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:40:34 +0530 Subject: [PATCH 11/27] More fix --- .maestro/helpers/search-room.yaml | 2 ++ .maestro/tests/room/ignoreuser.yaml | 16 +++++++--------- app/views/ReportUserView/index.tsx | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.maestro/helpers/search-room.yaml b/.maestro/helpers/search-room.yaml index 4472a71bc21..59eef9262ed 100644 --- a/.maestro/helpers/search-room.yaml +++ b/.maestro/helpers/search-room.yaml @@ -5,6 +5,8 @@ tags: --- - assertVisible: id: 'rooms-list-view' +- waitForAnimationToEnd: + timeout: 5000 - tapOn: id: 'rooms-list-view-search' - tapOn: diff --git a/.maestro/tests/room/ignoreuser.yaml b/.maestro/tests/room/ignoreuser.yaml index c3509d97e59..cecfd28e69a 100644 --- a/.maestro/tests/room/ignoreuser.yaml +++ b/.maestro/tests/room/ignoreuser.yaml @@ -90,7 +90,7 @@ tags: timeout: 60000 - tapOn: text: ${output.otherUser.username} - index: 1 + index: 0 retryTapIfNoChange: true - extendedWaitUntil: visible: @@ -188,14 +188,13 @@ tags: - tapOn: id: 'report-user-view-input' - inputText: 'e2e test' +- runFlow: '../../helpers/hide-keyboard.yaml' - extendedWaitUntil: visible: id: 'report-user-view-submit' timeout: 60000 -- runFlow: '../../helpers/hide-keyboard.yaml' - tapOn: - id: 'report-user-view-submit' - retryTapIfNoChange: true + text: 'Report' - extendedWaitUntil: visible: id: 'room-view-title-${output.otherUser.username}' @@ -209,11 +208,11 @@ tags: ROOM: ${output.room.name} - extendedWaitUntil: visible: - text: ${output.otherUser.username} + id: username-header-${output.otherUser.username} timeout: 60000 - tapOn: - text: ${output.otherUser.username} - index: 1 + id: username-header-${output.otherUser.username} + retryTapIfNoChange: true - extendedWaitUntil: visible: id: 'room-info-view' @@ -241,8 +240,7 @@ tags: id: 'report-user-view-submit' timeout: 60000 - tapOn: - id: 'report-user-view-submit' - retryTapIfNoChange: true + text: 'Report' - extendedWaitUntil: visible: id: 'room-view-title-${output.room.name}' diff --git a/app/views/ReportUserView/index.tsx b/app/views/ReportUserView/index.tsx index ad1fd079a6a..fc2d0a63ddb 100644 --- a/app/views/ReportUserView/index.tsx +++ b/app/views/ReportUserView/index.tsx @@ -87,7 +87,7 @@ const ReportUserView = () => { return ( - + Date: Tue, 24 Feb 2026 23:15:19 +0530 Subject: [PATCH 12/27] Ignore user test fix --- .maestro/tests/room/ignoreuser.yaml | 35 +++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/.maestro/tests/room/ignoreuser.yaml b/.maestro/tests/room/ignoreuser.yaml index cecfd28e69a..b949fd49f3d 100644 --- a/.maestro/tests/room/ignoreuser.yaml +++ b/.maestro/tests/room/ignoreuser.yaml @@ -90,7 +90,6 @@ tags: timeout: 60000 - tapOn: text: ${output.otherUser.username} - index: 0 retryTapIfNoChange: true - extendedWaitUntil: visible: @@ -140,9 +139,20 @@ tags: visible: id: 'username-header-${output.otherUser.username}' timeout: 60000 -- tapOn: - id: 'username-header-${output.otherUser.username}' - retryTapIfNoChange: true +- runFlow: + when: + platform: iOS + commands: + - tapOn: + id: username-header-${output.otherUser.username} + retryTapIfNoChange: true +- runFlow: + when: + platform: Android + commands: + - tapOn: + text: ${output.otherUser.username} + retryTapIfNoChange: true - extendedWaitUntil: visible: text: 'Unignore' @@ -210,9 +220,20 @@ tags: visible: id: username-header-${output.otherUser.username} timeout: 60000 -- tapOn: - id: username-header-${output.otherUser.username} - retryTapIfNoChange: true +- runFlow: + when: + platform: iOS + commands: + - tapOn: + id: username-header-${output.otherUser.username} + retryTapIfNoChange: true +- runFlow: + when: + platform: Android + commands: + - tapOn: + text: ${output.otherUser.username} + retryTapIfNoChange: true - extendedWaitUntil: visible: id: 'room-info-view' From 25ce5ea14f8e92d977f1c35c88c4ba145a97d4ab Mon Sep 17 00:00:00 2001 From: Rohit3523 Date: Tue, 24 Feb 2026 17:47:59 +0000 Subject: [PATCH 13/27] chore: format code and fix lint issues --- .maestro/tests/room/ignoreuser.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.maestro/tests/room/ignoreuser.yaml b/.maestro/tests/room/ignoreuser.yaml index b949fd49f3d..644fa097596 100644 --- a/.maestro/tests/room/ignoreuser.yaml +++ b/.maestro/tests/room/ignoreuser.yaml @@ -142,14 +142,14 @@ tags: - runFlow: when: platform: iOS - commands: + commands: - tapOn: id: username-header-${output.otherUser.username} retryTapIfNoChange: true - runFlow: when: platform: Android - commands: + commands: - tapOn: text: ${output.otherUser.username} retryTapIfNoChange: true @@ -223,14 +223,14 @@ tags: - runFlow: when: platform: iOS - commands: + commands: - tapOn: id: username-header-${output.otherUser.username} retryTapIfNoChange: true - runFlow: when: platform: Android - commands: + commands: - tapOn: text: ${output.otherUser.username} retryTapIfNoChange: true From a63dabafc55a5b8bee8be581dca17177f041aa53 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 25 Feb 2026 01:41:37 +0530 Subject: [PATCH 14/27] possible fix --- .maestro/tests/room/ignoreuser.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.maestro/tests/room/ignoreuser.yaml b/.maestro/tests/room/ignoreuser.yaml index b949fd49f3d..27c6b04d0f7 100644 --- a/.maestro/tests/room/ignoreuser.yaml +++ b/.maestro/tests/room/ignoreuser.yaml @@ -89,7 +89,7 @@ tags: id: 'username-header-${output.otherUser.username}' timeout: 60000 - tapOn: - text: ${output.otherUser.username} + text: .*${output.otherUser.username}.* retryTapIfNoChange: true - extendedWaitUntil: visible: @@ -151,7 +151,7 @@ tags: platform: Android commands: - tapOn: - text: ${output.otherUser.username} + text: .*${output.otherUser.username}.* retryTapIfNoChange: true - extendedWaitUntil: visible: @@ -232,7 +232,7 @@ tags: platform: Android commands: - tapOn: - text: ${output.otherUser.username} + text: .*${output.otherUser.username}.* retryTapIfNoChange: true - extendedWaitUntil: visible: From ede8727c6da9826b8354c28c816d8a61cd45599b Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 25 Feb 2026 16:35:17 +0530 Subject: [PATCH 15/27] upload everything for ios temp --- .github/workflows/maestro-ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maestro-ios.yml b/.github/workflows/maestro-ios.yml index 762edb686b1..956f6d26da9 100644 --- a/.github/workflows/maestro-ios.yml +++ b/.github/workflows/maestro-ios.yml @@ -94,5 +94,5 @@ jobs: uses: actions/upload-artifact@v4 with: name: iOS Maestro Logs - Shard ${{ inputs.shard }} - path: ~/.maestro/tests/**/*.png + path: ~/.maestro retention-days: 7 From 94df785604f938a45b0261ea46cc2e4f0e601f98 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:34:00 +0530 Subject: [PATCH 16/27] another try to fix it --- .maestro/tests/room/ignoreuser.yaml | 25 +++++++++---- scripts/create-avd.sh | 55 ++++++++++++++++++++++++----- 2 files changed, 65 insertions(+), 15 deletions(-) diff --git a/.maestro/tests/room/ignoreuser.yaml b/.maestro/tests/room/ignoreuser.yaml index 24a779ef86b..75391535b5e 100644 --- a/.maestro/tests/room/ignoreuser.yaml +++ b/.maestro/tests/room/ignoreuser.yaml @@ -88,9 +88,20 @@ tags: visible: id: 'username-header-${output.otherUser.username}' timeout: 60000 -- tapOn: - text: .*${output.otherUser.username}.* - retryTapIfNoChange: true +- runFlow: + when: + platform: Android + commands: + - tapOn: + text: .*${output.otherUser.username}.* + retryTapIfNoChange: true +- runFlow: + when: + platform: iOS + commands: + - tapOn: + text: 'username-header-${output.otherUser.username}' + retryTapIfNoChange: true - extendedWaitUntil: visible: text: 'Ignore' @@ -141,17 +152,17 @@ tags: timeout: 60000 - runFlow: when: - platform: iOS + platform: Android commands: - tapOn: - id: username-header-${output.otherUser.username} + text: .*${output.otherUser.username}.* retryTapIfNoChange: true - runFlow: when: - platform: Android + platform: iOS commands: - tapOn: - text: .*${output.otherUser.username}.* + text: 'username-header-${output.otherUser.username}' retryTapIfNoChange: true - extendedWaitUntil: visible: diff --git a/scripts/create-avd.sh b/scripts/create-avd.sh index 36f54c58ee4..fb158feae11 100644 --- a/scripts/create-avd.sh +++ b/scripts/create-avd.sh @@ -1,14 +1,53 @@ #!/usr/bin/env bash +set -e -$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install emulator +if [ -z "$ANDROID_HOME" ]; then + export ANDROID_HOME="$ANDROID_SDK_ROOT" +fi -$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-31;default;arm64-v8a" -$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses +if [ -z "$ANDROID_HOME" ]; then + export ANDROID_HOME="$HOME/Android/Sdk" +fi -$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n Pixel_API_31_AOSP -d pixel --package "system-images;android-31;default;arm64-v8a" +export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$PATH -echo "hw.lcd.density = 440" >> ~/.android/avd/Pixel_API_31_AOSP.avd/config.ini -echo "hw.lcd.height = 2280" >> ~/.android/avd/Pixel_API_31_AOSP.avd/config.ini -echo "hw.lcd.width = 1080" >> ~/.android/avd/Pixel_API_31_AOSP.avd/config.ini +echo "ANDROID_HOME=$ANDROID_HOME" +echo "PATH=$PATH" -echo "Pixel_API_31_AOSP created" \ No newline at end of file +API_LEVEL=34 +AVD_NAME="Pixel_API_${API_LEVEL}" + +HOST_ARCH=$(uname -m) + +if [[ "$HOST_ARCH" == "arm64" || "$HOST_ARCH" == "aarch64" ]]; then + ABI="arm64-v8a" +else + ABI="x86_64" +fi + +echo "Host architecture: $HOST_ARCH" +echo "Using emulator ABI: $ABI" + +IMAGE="system-images;android-${API_LEVEL};google_apis;${ABI}" + +echo "Installing emulator + system image" + +sdkmanager --install emulator +sdkmanager "$IMAGE" +yes | sdkmanager --licenses + +echo "Creating AVD" + +echo "no" | avdmanager create avd \ + -n "$AVD_NAME" \ + -d "pixel_7_pro" \ + --package "$IMAGE" + +CONFIG="$HOME/.android/avd/${AVD_NAME}.avd/config.ini" + +echo "hw.lcd.density=440" >> "$CONFIG" +echo "hw.lcd.height=2280" >> "$CONFIG" +echo "hw.lcd.width=1080" >> "$CONFIG" +echo "hw.gpu.enabled=yes" >> "$CONFIG" + +echo "AVD created: $AVD_NAME ($ABI)" \ No newline at end of file From 9236738a3ab28997e8d7dfba2d7a14320ff8f976 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 25 Feb 2026 19:49:54 +0530 Subject: [PATCH 17/27] id fix --- .maestro/tests/room/ignoreuser.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.maestro/tests/room/ignoreuser.yaml b/.maestro/tests/room/ignoreuser.yaml index 75391535b5e..974d3626e05 100644 --- a/.maestro/tests/room/ignoreuser.yaml +++ b/.maestro/tests/room/ignoreuser.yaml @@ -100,7 +100,7 @@ tags: platform: iOS commands: - tapOn: - text: 'username-header-${output.otherUser.username}' + id: 'username-header-${output.otherUser.username}' retryTapIfNoChange: true - extendedWaitUntil: visible: @@ -162,7 +162,7 @@ tags: platform: iOS commands: - tapOn: - text: 'username-header-${output.otherUser.username}' + id: 'username-header-${output.otherUser.username}' retryTapIfNoChange: true - extendedWaitUntil: visible: From fe600b222ddc9ec9aa9fe3c7f24d608ad831e561 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 25 Feb 2026 21:23:11 +0530 Subject: [PATCH 18/27] Retry step --- .github/workflows/maestro-ios.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maestro-ios.yml b/.github/workflows/maestro-ios.yml index 956f6d26da9..deb2cfb8e72 100644 --- a/.github/workflows/maestro-ios.yml +++ b/.github/workflows/maestro-ios.yml @@ -85,9 +85,12 @@ jobs: run: chmod +x .github/scripts/run-maestro.sh - name: Run Maestro Tests - timeout-minutes: 120 - run: | - ./.github/scripts/run-maestro.sh ios ${{ inputs.shard }} + uses: nick-fields/retry@v3 + with: + timeout_minutes: 30 + max_attempts: 2 + retry_on: timeout + command: ./.github/scripts/run-maestro.sh ios ${{ inputs.shard }} - name: Upload Maestro Logs if: always() From ecf230647f51ca19086fd757b5992ee1d91b55b3 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:17:22 +0530 Subject: [PATCH 19/27] fix --- .maestro/tests/room/ignoreuser.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.maestro/tests/room/ignoreuser.yaml b/.maestro/tests/room/ignoreuser.yaml index 974d3626e05..93b4df7c309 100644 --- a/.maestro/tests/room/ignoreuser.yaml +++ b/.maestro/tests/room/ignoreuser.yaml @@ -215,7 +215,7 @@ tags: id: 'report-user-view-submit' timeout: 60000 - tapOn: - text: 'Report' + id: 'report-user-view-submit' - extendedWaitUntil: visible: id: 'room-view-title-${output.otherUser.username}' @@ -272,7 +272,7 @@ tags: id: 'report-user-view-submit' timeout: 60000 - tapOn: - text: 'Report' + id: 'report-user-view-submit' - extendedWaitUntil: visible: id: 'room-view-title-${output.room.name}' From 6afdb77df93acbb5a6cdb7a8896d3e856caa87c9 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:19:07 +0530 Subject: [PATCH 20/27] fix --- .github/workflows/maestro-android.yml | 2 +- .github/workflows/maestro-ios.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maestro-android.yml b/.github/workflows/maestro-android.yml index 4c05949c5e4..cd0415a5da4 100644 --- a/.github/workflows/maestro-android.yml +++ b/.github/workflows/maestro-android.yml @@ -49,7 +49,7 @@ jobs: - name: Install Maestro run: | curl -Ls "https://get.maestro.mobile.dev" | bash - echo "$HOME/.maestro/bin" >> $GITHUB_PATH + echo "$HOME/.maestro/bin" >> "$GITHUB_PATH" env: MAESTRO_VERSION: 2.2.0 diff --git a/.github/workflows/maestro-ios.yml b/.github/workflows/maestro-ios.yml index deb2cfb8e72..54f8727b5f1 100644 --- a/.github/workflows/maestro-ios.yml +++ b/.github/workflows/maestro-ios.yml @@ -37,7 +37,7 @@ jobs: brew tap facebook/fb brew install facebook/fb/idb-companion curl -fsSL https://get.maestro.mobile.dev | bash - echo "$HOME/.maestro/bin" >> $GITHUB_PATH + echo "$HOME/.maestro/bin" >> "$GITHUB_PATH" - name: Configure Simulator run: | From 5f12139b08cdf1e50d69d4fab69fa3c0ebfd35a4 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Thu, 26 Feb 2026 17:39:39 +0530 Subject: [PATCH 21/27] Remove latin test --- .maestro/tests/room/create-room.yaml | 100 +-------------------------- 1 file changed, 1 insertion(+), 99 deletions(-) diff --git a/.maestro/tests/room/create-room.yaml b/.maestro/tests/room/create-room.yaml index 3daabbf9df6..dfd300939e5 100644 --- a/.maestro/tests/room/create-room.yaml +++ b/.maestro/tests/room/create-room.yaml @@ -345,102 +345,4 @@ tags: - extendedWaitUntil: visible: id: ${'rooms-list-view-item-' + output.emptyRoomName} - timeout: 60000 - -# should create a room with non-latin alphabet and do a case insensitive search for it -- runFlow: - when: - platform: iOS - commands: - - evalScript: ${output.nonLatinRoomName = 'ПРОВЕРКА' + output.random()} - - evalScript: ${output.nonLatinRoomNameLower = output.nonLatinRoomName.toLowerCase()} - - - extendedWaitUntil: - visible: - id: 'rooms-list-view' - timeout: 60000 - - extendedWaitUntil: - visible: - id: 'rooms-list-view-create-channel' - timeout: 60000 - - tapOn: - id: 'rooms-list-view-create-channel' - - extendedWaitUntil: - visible: - id: 'new-message-view' - timeout: 60000 - - extendedWaitUntil: - visible: - id: 'new-message-view-create-channel' - timeout: 60000 - - tapOn: - id: 'new-message-view-create-channel' - - extendedWaitUntil: - visible: - id: 'select-users-view' - timeout: 60000 - - tapOn: - id: 'selected-users-view-submit' - - extendedWaitUntil: - visible: - id: 'create-channel-view' - timeout: 60000 - - extendedWaitUntil: - visible: - id: 'create-channel-name' - timeout: 60000 - - tapOn: - id: 'create-channel-name' - - inputText: ${output.nonLatinRoomName} - - runFlow: '../../helpers/hide-keyboard.yaml' - - extendedWaitUntil: - visible: - id: 'create-channel-submit' - timeout: 60000 - - tapOn: - id: 'create-channel-submit' - - extendedWaitUntil: - visible: - id: 'room-view' - timeout: 60000 - - extendedWaitUntil: - visible: - id: ${'room-view-title-' + output.nonLatinRoomName} - timeout: 60000 - - runFlow: '../../helpers/go-back.yaml' - - extendedWaitUntil: - visible: - id: 'rooms-list-view' - timeout: 60000 - - extendedWaitUntil: - visible: - id: ${'rooms-list-view-item-' + output.nonLatinRoomName} - timeout: 60000 - - extendedWaitUntil: - visible: - id: 'rooms-list-view-search' - timeout: 60000 - - tapOn: - id: 'rooms-list-view-search' - - extendedWaitUntil: - visible: - id: 'rooms-list-view-search-input' - timeout: 60000 - - tapOn: - id: 'rooms-list-view-search-input' - - inputText: ${output.nonLatinRoomNameLower} - - runFlow: '../../helpers/hide-keyboard.yaml' - - extendedWaitUntil: - visible: - id: ${'rooms-list-view-item-' + output.nonLatinRoomName} - timeout: 60000 - - tapOn: - id: ${'rooms-list-view-item-' + output.nonLatinRoomName} - - extendedWaitUntil: - visible: - id: 'room-view' - timeout: 60000 - - extendedWaitUntil: - visible: - id: ${'room-view-title-' + output.nonLatinRoomName} - timeout: 60000 + timeout: 60000 \ No newline at end of file From bb8f4a636d6cbd090dd0f04c32d66b8ce2fdd99b Mon Sep 17 00:00:00 2001 From: Rohit3523 Date: Thu, 26 Feb 2026 12:11:17 +0000 Subject: [PATCH 22/27] chore: format code and fix lint issues --- .maestro/tests/room/create-room.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.maestro/tests/room/create-room.yaml b/.maestro/tests/room/create-room.yaml index dfd300939e5..5cbdf51a5b9 100644 --- a/.maestro/tests/room/create-room.yaml +++ b/.maestro/tests/room/create-room.yaml @@ -345,4 +345,4 @@ tags: - extendedWaitUntil: visible: id: ${'rooms-list-view-item-' + output.emptyRoomName} - timeout: 60000 \ No newline at end of file + timeout: 60000 From 3918b2f31757cf6e5518405967826146252436c0 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Thu, 26 Feb 2026 23:10:13 +0530 Subject: [PATCH 23/27] more changes --- .github/workflows/maestro-android.yml | 6 +++--- .github/workflows/maestro-ios.yml | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/maestro-android.yml b/.github/workflows/maestro-android.yml index cd0415a5da4..a12e381f5dc 100644 --- a/.github/workflows/maestro-android.yml +++ b/.github/workflows/maestro-android.yml @@ -11,6 +11,8 @@ jobs: android-test: name: 'Android Tests' runs-on: ubuntu-latest + env: + MAESTRO_VERSION: 2.2.0 steps: - name: Checkout Repository @@ -34,7 +36,7 @@ jobs: uses: actions/cache@v4 with: path: ~/.maestro - key: maestro-${{ runner.os }} + key: maestro-${{ runner.os }}-${{ env.MAESTRO_VERSION }} - name: Download APK uses: actions/download-artifact@v4 @@ -50,8 +52,6 @@ jobs: run: | curl -Ls "https://get.maestro.mobile.dev" | bash echo "$HOME/.maestro/bin" >> "$GITHUB_PATH" - env: - MAESTRO_VERSION: 2.2.0 - name: Enable KVM group permissions run: | diff --git a/.github/workflows/maestro-ios.yml b/.github/workflows/maestro-ios.yml index 54f8727b5f1..23650950377 100644 --- a/.github/workflows/maestro-ios.yml +++ b/.github/workflows/maestro-ios.yml @@ -10,6 +10,8 @@ on: jobs: ios-test: runs-on: macos-14 + env: + MAESTRO_VERSION: 2.2.0 steps: - name: Checkout Repo @@ -32,11 +34,17 @@ jobs: with: E2E_ACCOUNT: ${{ secrets.E2E_ACCOUNT }} + - name: Cache Maestro + uses: actions/cache@v4 + with: + path: ~/.maestro + key: maestro-${{ runner.os }}-${{ env.MAESTRO_VERSION }} + - name: Install Maestro + idb run: | brew tap facebook/fb brew install facebook/fb/idb-companion - curl -fsSL https://get.maestro.mobile.dev | bash + curl -Ls https://get.maestro.mobile.dev | bash echo "$HOME/.maestro/bin" >> "$GITHUB_PATH" - name: Configure Simulator From ca9a38a3ac431d42124fcb83d0dc1664abf8b13a Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Thu, 26 Feb 2026 23:18:32 +0530 Subject: [PATCH 24/27] store images in ios --- .github/workflows/maestro-ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maestro-ios.yml b/.github/workflows/maestro-ios.yml index 23650950377..4f8ae6a1896 100644 --- a/.github/workflows/maestro-ios.yml +++ b/.github/workflows/maestro-ios.yml @@ -105,5 +105,5 @@ jobs: uses: actions/upload-artifact@v4 with: name: iOS Maestro Logs - Shard ${{ inputs.shard }} - path: ~/.maestro + path: ~/.maestro/tests/**/*.png retention-days: 7 From bb624524a6041bf28968f7c1473c592d5524f8a9 Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Thu, 26 Feb 2026 23:29:52 +0530 Subject: [PATCH 25/27] Update scripts/create-avd.sh Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- scripts/create-avd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create-avd.sh b/scripts/create-avd.sh index fb158feae11..fe6ca9ec429 100644 --- a/scripts/create-avd.sh +++ b/scripts/create-avd.sh @@ -32,9 +32,9 @@ IMAGE="system-images;android-${API_LEVEL};google_apis;${ABI}" echo "Installing emulator + system image" +yes | sdkmanager --licenses sdkmanager --install emulator sdkmanager "$IMAGE" -yes | sdkmanager --licenses echo "Creating AVD" From 0cb8a417bca5fe6e0bf0dcdc8973e290d7185821 Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Fri, 27 Feb 2026 18:40:29 +0530 Subject: [PATCH 26/27] use arrow function --- .maestro/scripts/data-setup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.maestro/scripts/data-setup.js b/.maestro/scripts/data-setup.js index ba6f79ba57f..59d044b4326 100644 --- a/.maestro/scripts/data-setup.js +++ b/.maestro/scripts/data-setup.js @@ -209,7 +209,7 @@ function logAccounts() { console.log(JSON.stringify(data.accounts)); } -function sleep(ms) { +const sleep = (ms) => { const start = Date.now(); while (Date.now() - start < ms) { } } From dbbc6e3b7c4a3b656de7cbf390411b30a2aa992c Mon Sep 17 00:00:00 2001 From: Rohit <40559587+Rohit3523@users.noreply.github.com> Date: Fri, 27 Feb 2026 18:45:46 +0530 Subject: [PATCH 27/27] revert change requested by coderabbit --- .github/workflows/maestro-ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maestro-ios.yml b/.github/workflows/maestro-ios.yml index 4f8ae6a1896..7a6c686716d 100644 --- a/.github/workflows/maestro-ios.yml +++ b/.github/workflows/maestro-ios.yml @@ -44,7 +44,7 @@ jobs: run: | brew tap facebook/fb brew install facebook/fb/idb-companion - curl -Ls https://get.maestro.mobile.dev | bash + curl -fsSL "https://get.maestro.mobile.dev" | bash echo "$HOME/.maestro/bin" >> "$GITHUB_PATH" - name: Configure Simulator