From cb901da19246b961183bd7c4297025aa916697dc Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Fri, 15 May 2026 11:48:33 -0300 Subject: [PATCH 1/3] fix: acrionSheet height considering handle --- app/containers/ActionSheet/useActionSheetDetents.test.tsx | 4 ++-- app/containers/ActionSheet/useActionSheetDetents.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/containers/ActionSheet/useActionSheetDetents.test.tsx b/app/containers/ActionSheet/useActionSheetDetents.test.tsx index 51be4312ffe..63ddc6dddbc 100644 --- a/app/containers/ActionSheet/useActionSheetDetents.test.tsx +++ b/app/containers/ActionSheet/useActionSheetDetents.test.tsx @@ -1,6 +1,6 @@ import { renderHook } from '@testing-library/react-native'; -import { useActionSheetDetents } from './useActionSheetDetents'; +import { HANDLE_HEIGHT, useActionSheetDetents } from './useActionSheetDetents'; describe('useActionSheetDetents', () => { const windowHeight = 1000; @@ -71,7 +71,7 @@ describe('useActionSheetDetents', () => { }) ); - expect(result.current.detents).toEqual([(300 + 50) / windowHeight]); + expect(result.current.detents).toEqual([(300 + 50 + HANDLE_HEIGHT) / windowHeight]); }); it('falls back to minimum height when no content or options', () => { diff --git a/app/containers/ActionSheet/useActionSheetDetents.ts b/app/containers/ActionSheet/useActionSheetDetents.ts index 7dd747fa935..e5c9eb543a3 100644 --- a/app/containers/ActionSheet/useActionSheetDetents.ts +++ b/app/containers/ActionSheet/useActionSheetDetents.ts @@ -78,7 +78,7 @@ export function useActionSheetDetents({ detents = [heightToDetent(Math.round(measuredHeight), windowHeight)]; } } else if (contentHeight > 0) { - const rawContentDetent = (contentHeight + bottomInset) / windowHeight; + const rawContentDetent = (contentHeight + bottomInset + HANDLE_HEIGHT) / windowHeight; const contentDetent = Math.min( ACTION_SHEET_MAX_HEIGHT_FRACTION, Math.max(ACTION_SHEET_MIN_HEIGHT_FRACTION, rawContentDetent) From 3d574815a217e9d8873b272188d87f12c9d4ea67 Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Fri, 15 May 2026 11:54:46 -0300 Subject: [PATCH 2/3] feat: e2e tests --- .github/scripts/run-maestro.sh | 2 + .github/workflows/build-pr.yml | 2 +- .github/workflows/maestro-ios.yml | 6 ++- .../servers-history-small-screen.yaml | 44 +++++++++++++++++ .../tests/room/servers-list-small-screen.yaml | 47 +++++++++++++++++++ 5 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 .maestro/tests/onboarding/servers-history-small-screen.yaml create mode 100644 .maestro/tests/room/servers-list-small-screen.yaml diff --git a/.github/scripts/run-maestro.sh b/.github/scripts/run-maestro.sh index fdbb27cbf39..a0705a4f442 100755 --- a/.github/scripts/run-maestro.sh +++ b/.github/scripts/run-maestro.sh @@ -73,6 +73,7 @@ if [ "$PLATFORM" = "android" ]; then maestro test "${FLOW_FILES[@]}" \ --exclude-tags=util \ --include-tags="test-${SHARD}" \ + --exclude-tags=ios-only \ --format junit \ --output "$MAIN_REPORT" || true @@ -141,6 +142,7 @@ while [ ${#CURRENT_FAILS[@]} -gt 0 ] && [ "$ROUND" -le "$MAX_RERUN_ROUNDS" ]; do maestro test "${CURRENT_FAILS[@]}" \ --exclude-tags=util \ --include-tags="test-${SHARD}" \ + --exclude-tags=ios-only \ --format junit \ --output "$RPT" || true else diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index b1731a36ab3..a6ae4eed9d9 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -102,7 +102,7 @@ jobs: secrets: inherit strategy: matrix: - shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] + shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] fail-fast: false with: shard: ${{ matrix.shard }} \ No newline at end of file diff --git a/.github/workflows/maestro-ios.yml b/.github/workflows/maestro-ios.yml index fed60d8b176..36fdbb24839 100644 --- a/.github/workflows/maestro-ios.yml +++ b/.github/workflows/maestro-ios.yml @@ -61,7 +61,11 @@ jobs: - name: Boot Simulator timeout-minutes: 15 run: | - SIM_NAME="iPhone 16 Pro" + if [ "${{ inputs.shard }}" = "14" ]; then + SIM_NAME="iPhone SE (3rd generation)" + else + SIM_NAME="iPhone 16 Pro" + fi echo "Booting simulator: $SIM_NAME" diff --git a/.maestro/tests/onboarding/servers-history-small-screen.yaml b/.maestro/tests/onboarding/servers-history-small-screen.yaml new file mode 100644 index 00000000000..f54ef397cff --- /dev/null +++ b/.maestro/tests/onboarding/servers-history-small-screen.yaml @@ -0,0 +1,44 @@ +appId: chat.rocket.reactnative +name: Servers History Small Screen +jsEngine: graaljs +onFlowStart: + - runFlow: '../../helpers/setup.yaml' +onFlowComplete: + - evalScript: ${output.utils.deleteCreatedUsers()} +tags: + - test-14 + - ios-only + +--- +- evalScript: ${output.user = output.utils.createUser()} + +- runFlow: + file: '../../helpers/login-with-deeplink.yaml' + env: + USERNAME: ${output.user.username} + PASSWORD: ${output.user.password} +- runFlow: '../../helpers/logout.yaml' + +# should fully render the Servers History action sheet on small screens +# (regression for small-screen ServersHistoryActionSheetContent on iPhone SE) +- extendedWaitUntil: + visible: + id: 'servers-history-button' + timeout: 60000 +- tapOn: + id: 'servers-history-button' +- waitForAnimationToEnd +- extendedWaitUntil: + visible: + id: 'action-sheet' + timeout: 60000 +- assertVisible: + id: 'servers-history-${output.data.server}' + +# tap the history item — would fail if it were clipped by the sheet bottom +- tapOn: + id: 'servers-history-${output.data.server}' +- extendedWaitUntil: + visible: + id: 'login-view-submit' + timeout: 60000 diff --git a/.maestro/tests/room/servers-list-small-screen.yaml b/.maestro/tests/room/servers-list-small-screen.yaml new file mode 100644 index 00000000000..8ea3c63804e --- /dev/null +++ b/.maestro/tests/room/servers-list-small-screen.yaml @@ -0,0 +1,47 @@ +appId: chat.rocket.reactnative +name: Servers List Small Screen +jsEngine: graaljs +onFlowStart: + - runFlow: '../../helpers/setup.yaml' +onFlowComplete: + - evalScript: ${output.utils.deleteCreatedUsers()} +tags: + - test-14 + - ios-only + +--- +- evalScript: ${output.user = output.utils.createUser()} + +- runFlow: + file: '../../helpers/login-with-deeplink.yaml' + env: + USERNAME: ${output.user.username} + PASSWORD: ${output.user.password} + +# should fully render the Workspaces action sheet on small screens +# (regression for small-screen ServersList — the Add Server button was cut off on iPhone SE) +- extendedWaitUntil: + visible: + id: 'rooms-list-header-servers-list-button' + timeout: 60000 +- tapOn: + id: 'rooms-list-header-servers-list-button' +- waitForAnimationToEnd +- extendedWaitUntil: + visible: + id: 'action-sheet' + timeout: 60000 +- extendedWaitUntil: + visible: + id: 'rooms-list-header-servers-list' + timeout: 60000 +- assertVisible: + id: 'rooms-list-header-server-add' + +# tap the Add Server button — would fail if it were clipped by the sheet bottom +- tapOn: + id: 'rooms-list-header-server-add' +- extendedWaitUntil: + visible: + id: 'new-server-view' + timeout: 60000 From 831f9f7c2a5a12a62f0fcc8b2595b3fdb916440e Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Thu, 21 May 2026 20:38:20 -0300 Subject: [PATCH 3/3] fix: e2e tests --- .maestro/helpers/logout.yaml | 5 +++++ .maestro/tests/onboarding/servers-history-small-screen.yaml | 2 +- .maestro/tests/room/reaction-picker-small-screen.yaml | 2 +- .maestro/tests/room/servers-list-small-screen.yaml | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.maestro/helpers/logout.yaml b/.maestro/helpers/logout.yaml index ccc663c80ac..70ddc19cfb7 100644 --- a/.maestro/helpers/logout.yaml +++ b/.maestro/helpers/logout.yaml @@ -37,6 +37,11 @@ tags: - tapOn: id: 'sidebar-settings' +- scrollUntilVisible: + element: + id: 'settings-logout' + direction: DOWN + - assertVisible: id: 'settings-logout' diff --git a/.maestro/tests/onboarding/servers-history-small-screen.yaml b/.maestro/tests/onboarding/servers-history-small-screen.yaml index f54ef397cff..b3844e3dca8 100644 --- a/.maestro/tests/onboarding/servers-history-small-screen.yaml +++ b/.maestro/tests/onboarding/servers-history-small-screen.yaml @@ -1,4 +1,4 @@ -appId: chat.rocket.reactnative +appId: ${APP_ID} name: Servers History Small Screen jsEngine: graaljs onFlowStart: diff --git a/.maestro/tests/room/reaction-picker-small-screen.yaml b/.maestro/tests/room/reaction-picker-small-screen.yaml index f25910ac4ae..aac33b961cd 100644 --- a/.maestro/tests/room/reaction-picker-small-screen.yaml +++ b/.maestro/tests/room/reaction-picker-small-screen.yaml @@ -1,4 +1,4 @@ -appId: chat.rocket.reactnative +appId: ${APP_ID} name: Reaction Picker Small Screen jsEngine: graaljs onFlowStart: diff --git a/.maestro/tests/room/servers-list-small-screen.yaml b/.maestro/tests/room/servers-list-small-screen.yaml index 8ea3c63804e..685822b104b 100644 --- a/.maestro/tests/room/servers-list-small-screen.yaml +++ b/.maestro/tests/room/servers-list-small-screen.yaml @@ -1,4 +1,4 @@ -appId: chat.rocket.reactnative +appId: ${APP_ID} name: Servers List Small Screen jsEngine: graaljs onFlowStart: