Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ jobs:
uses: ./.github/workflows/e2e-build-android.yml
needs: [e2e-hold]
secrets: inherit
with:
DISABLE_KEYBOARD_NAVIGATION: true

e2e-run-android:
name: E2E Run Android
Expand All @@ -82,10 +84,34 @@ jobs:
secrets: inherit
strategy:
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
fail-fast: false
with:
shard: ${{ matrix.shard }}
DISABLE_KEYBOARD_NAVIGATION: true

e2e-build-android-keyboard-navigation:
name: E2E Build Android Keyboard Navigation
if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }}
uses: ./.github/workflows/e2e-build-android.yml
needs: [e2e-hold]
secrets: inherit
with:
DISABLE_KEYBOARD_NAVIGATION: false

e2e-run-android-keyboard-navigation:
name: E2E Run Android Keyboard Navigation
if: ${{ github.repository == 'RocketChat/Rocket.Chat.ReactNative' }}
uses: ./.github/workflows/maestro-android.yml
needs: [e2e-build-android-keyboard-navigation]
secrets: inherit
strategy:
matrix:
shard: [14]
fail-fast: false
with:
shard: ${{ matrix.shard }}
DISABLE_KEYBOARD_NAVIGATION: false

e2e-build-ios:
name: E2E Build iOS
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/e2e-build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: E2E Build Android

on:
workflow_call:
inputs:
DISABLE_KEYBOARD_NAVIGATION:
required: true
type: boolean
secrets:
EXPERIMENTAL_KEYSTORE_BASE64:
required: true
Expand Down Expand Up @@ -89,9 +93,19 @@ jobs:
run: ./gradlew assembleExperimentalRelease --build-cache --parallel --max-workers=4 --no-daemon --stacktrace
env:
RUNNING_E2E_TESTS: true
DISABLE_KEYBOARD_NAVIGATION_ENABLED: ${{ inputs.DISABLE_KEYBOARD_NAVIGATION }}

- name: Upload APK
if: ${{ inputs.DISABLE_KEYBOARD_NAVIGATION }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: Android Experimental APK
path: android/app/build/outputs/apk/experimental/release/app-experimental-release.apk

- name: Upload APK with Keyboard Navigation
if: ${{ !inputs.DISABLE_KEYBOARD_NAVIGATION }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: Android Experimental APK with Keyboard Navigation
path: android/app/build/outputs/apk/experimental/release/app-experimental-release.apk

21 changes: 16 additions & 5 deletions .github/workflows/maestro-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ on:
workflow_call:
inputs:
shard:
required: true
required: false
type: string
DISABLE_KEYBOARD_NAVIGATION:
required: true
type: boolean
Comment thread
coderabbitai[bot] marked this conversation as resolved.

jobs:
android-test:
Expand Down Expand Up @@ -40,10 +43,17 @@ jobs:
key: maestro-${{ runner.os }}-${{ env.MAESTRO_VERSION }}

- name: Download APK
if: ${{ inputs.DISABLE_KEYBOARD_NAVIGATION }}
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: Android Experimental APK

- name: Download Keyboard Navigation APK
if: ${{ !inputs.DISABLE_KEYBOARD_NAVIGATION }}
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: Android Experimental APK with Keyboard Navigation

- name: Setup E2E Account
uses: ./.github/actions/e2e-account
with:
Expand All @@ -68,8 +78,8 @@ jobs:
- name: Make Maestro script executable
run: chmod +x .github/scripts/run-maestro.sh

- name: Create Keyboard-enabled AVD (shard 14)
if: ${{ inputs.shard == '14' }}
- name: Create Keyboard-enabled AVD
if: ${{ !inputs.DISABLE_KEYBOARD_NAVIGATION }}
run: |
set -eux

Expand Down Expand Up @@ -124,7 +134,7 @@ jobs:
echo "$AVD_NAME created with physical keyboard support"

- name: Start Android Emulator and Run Maestro Tests (keyboard AVD)
if: ${{ inputs.shard == '14' }}
if: ${{ !inputs.DISABLE_KEYBOARD_NAVIGATION }}
uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a # v2.37.0
timeout-minutes: 60
with:
Expand All @@ -142,7 +152,7 @@ jobs:
script: ./.github/scripts/run-maestro.sh android ${{ inputs.shard }}

- name: Start Android Emulator and Run Maestro Tests (default)
if: ${{ inputs.shard != '14' }}
if: ${{ inputs.DISABLE_KEYBOARD_NAVIGATION }}
uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a # v2.37.0
timeout-minutes: 60
with:
Expand All @@ -155,6 +165,7 @@ jobs:
ram-size: 4096M
force-avd-creation: false
disable-animations: true
enable-hw-keyboard: false
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 }}
Expand Down
16 changes: 10 additions & 6 deletions .maestro/tests/room/room-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ tags:
from:
id: action-sheet-handle
direction: UP
- extendedWaitUntil:
visible:
- scrollUntilVisible:
element:
text: 'Unstar'
timeout: 60000
- tapOn:
Expand Down Expand Up @@ -226,8 +226,8 @@ tags:
from:
id: action-sheet-handle
direction: UP
- extendedWaitUntil:
visible:
- scrollUntilVisible:
element:
text: Pin
timeout: 60000
- tapOn:
Expand All @@ -251,8 +251,12 @@ tags:
# should unpin a message
- longPressOn:
id: message-content-messageToPin
- extendedWaitUntil:
visible:
- swipe:
from:
id: action-sheet-handle
direction: UP
- scrollUntilVisible:
element:
text: 'Unpin'
timeout: 60000
- tapOn:
Expand Down
1 change: 1 addition & 0 deletions .maestro/tests/room/room.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ tags:
- scrollUntilVisible:
element:
id: message-actions-delete
timeout: 60000
- tapOn:
id: message-actions-delete
- extendedWaitUntil:
Expand Down
4 changes: 2 additions & 2 deletions .maestro/tests/room/threads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,10 @@ tags:
direction: UP
- scrollUntilVisible:
element:
text: 'Delete'
id: message-actions-delete
timeout: 60000
- tapOn:
text: 'Delete'
id: 'message-actions-delete'
- extendedWaitUntil:
visible:
text: '.*You will not be able to recover this message.*'
Expand Down
2 changes: 1 addition & 1 deletion app/views/RoomView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
}
// Skip autofocus in development because simulators always report a keyboard as connected,
// which would force the composer to open on every focus while debugging.
if (__DEV__) {
if (__DEV__ || process.env.DISABLE_KEYBOARD_NAVIGATION_ENABLED === 'true') {
return;
}
const hasExternalKeyboard = isExternalKeyboardConnected();
Expand Down
4 changes: 2 additions & 2 deletions scripts/create-avd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ echo "no" | avdmanager create avd \

CONFIG="$HOME/.android/avd/${AVD_NAME}.avd/config.ini"

echo "hw.lcd.density=440" >> "$CONFIG"
echo "hw.lcd.height=2280" >> "$CONFIG"
echo "hw.lcd.density=420" >> "$CONFIG"
echo "hw.lcd.height=2424" >> "$CONFIG"
echo "hw.lcd.width=1080" >> "$CONFIG"
echo "hw.gpu.enabled=yes" >> "$CONFIG"

Expand Down
Loading