Skip to content

Commit 712acd1

Browse files
committed
chore: update e2e tests and align iOS handling, update dependencies
1 parent 0b457e9 commit 712acd1

File tree

4 files changed

+163
-194
lines changed

4 files changed

+163
-194
lines changed

.circleci/config.yml

Lines changed: 0 additions & 188 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
analyse_js:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
- run: corepack enable
17+
- uses: actions/setup-node@v6
18+
with:
19+
node-version: lts/*
20+
cache: yarn
21+
- run: yarn install --immutable
22+
- name: Run ESLint
23+
run: yarn lint
24+
- name: Jest
25+
run: yarn test
26+
27+
e2e_release_ios:
28+
runs-on: macos-26
29+
env:
30+
DEVELOPER_DIR: /Applications/Xcode_26.3.app/Contents/Developer
31+
steps:
32+
- uses: actions/checkout@v6
33+
- name: Boot iPhone 17 Pro Max simulator
34+
run: |
35+
DEVICE_ID=$(xcrun simctl list devices available -j | jq -r '.devices | to_entries[] | .value[] | select(.name == "iPhone 17 Pro Max") | .udid' | head -1)
36+
xcrun simctl boot "$DEVICE_ID"
37+
- name: Install applesimutils
38+
run: |
39+
HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
40+
HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
41+
- run: corepack enable
42+
- uses: actions/setup-node@v6
43+
with:
44+
node-version: lts/*
45+
cache: yarn
46+
- run: yarn install --immutable
47+
- name: Bundle JS
48+
run: yarn bundle:ios
49+
- uses: actions/cache@v5
50+
with:
51+
path: example/ios/Pods
52+
key: pods-${{ runner.os }}-${{ hashFiles('example/ios/Podfile.lock') }}
53+
- name: Pod install
54+
run: cd example && RCT_NEW_ARCH_ENABLED=0 npx pod-install
55+
- name: Build app for e2e tests
56+
run: yarn detox:ios:build:release
57+
- name: Run e2e tests
58+
run: yarn detox:ios:test:release
59+
- uses: actions/upload-artifact@v7
60+
if: failure()
61+
with:
62+
name: ios-e2e-artifacts
63+
path: artifacts
64+
retention-days: 14
65+
66+
new_arch_ios_build_only:
67+
runs-on: macos-26
68+
env:
69+
DEVELOPER_DIR: /Applications/Xcode_26.3.app/Contents/Developer
70+
steps:
71+
- uses: actions/checkout@v6
72+
- run: corepack enable
73+
- uses: actions/setup-node@v6
74+
with:
75+
node-version: lts/*
76+
cache: yarn
77+
- run: yarn install --immutable
78+
- uses: actions/cache@v5
79+
with:
80+
path: example/ios/Pods
81+
key: pods-newarch-${{ runner.os }}-${{ hashFiles('example/ios/Podfile.lock') }}
82+
- name: Pod install (new arch)
83+
run: cd example && RCT_NEW_ARCH_ENABLED=1 RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 npx pod-install
84+
- name: Build app with new arch
85+
run: yarn detox:ios:build:release
86+
87+
e2e_release_android:
88+
runs-on: ubuntu-latest
89+
env:
90+
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx4g -XX:+HeapDumpOnOutOfMemoryError" -Dorg.gradle.daemon=false'
91+
steps:
92+
- uses: actions/checkout@v6
93+
- run: corepack enable
94+
- uses: actions/setup-node@v6
95+
with:
96+
node-version: lts/*
97+
cache: yarn
98+
- uses: actions/setup-java@v5
99+
with:
100+
distribution: zulu
101+
java-version: 17
102+
- uses: actions/cache@v5
103+
with:
104+
path: |
105+
~/.gradle/caches
106+
~/.gradle/wrapper
107+
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
108+
- run: yarn install --immutable
109+
- name: Bundle JS
110+
run: yarn bundle:android
111+
- run: yarn generateManifest
112+
- name: Build app for e2e tests
113+
run: ORG_GRADLE_PROJECT_newArchEnabled=false yarn detox:android:build:release
114+
- name: Enable KVM
115+
run: |
116+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
117+
sudo udevadm control --reload-rules
118+
sudo udevadm trigger --name-match=kvm
119+
- name: Run e2e tests
120+
uses: reactivecircus/android-emulator-runner@v2
121+
with:
122+
api-level: 29
123+
avd-name: TestingAVD
124+
disable-animations: true
125+
script: yarn detox:android:test:release
126+
- uses: actions/upload-artifact@v7
127+
if: failure()
128+
with:
129+
name: android-e2e-artifacts
130+
path: artifacts
131+
retention-days: 14
132+
133+
new_arch_android_build_only:
134+
runs-on: ubuntu-latest
135+
env:
136+
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx4g -XX:+HeapDumpOnOutOfMemoryError" -Dorg.gradle.daemon=false'
137+
steps:
138+
- uses: actions/checkout@v6
139+
- run: corepack enable
140+
- uses: actions/setup-node@v6
141+
with:
142+
node-version: lts/*
143+
cache: yarn
144+
- uses: actions/setup-java@v5
145+
with:
146+
distribution: zulu
147+
java-version: 17
148+
- uses: actions/cache@v5
149+
with:
150+
path: |
151+
~/.gradle/caches
152+
~/.gradle/wrapper
153+
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
154+
- run: yarn install --immutable
155+
- name: Bundle JS
156+
run: yarn bundle:android
157+
- run: yarn generateManifest
158+
- name: Build app with new arch
159+
run: ORG_GRADLE_PROJECT_newArchEnabled=true yarn detox:android:build:release

example/e2e/detoxTest.spec.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,7 @@ describe('e2e tests', () => {
3636
}, 300000);
3737

3838
beforeEach(async () => {
39-
if (isIOS()) {
40-
await device.reloadReactNative();
41-
} else {
42-
await device.launchApp({newInstance: true});
43-
}
39+
await device.launchApp({newInstance: true});
4440
await waitFor(elementByText('Example DateTime Picker'))
4541
.toBeVisible()
4642
.withTimeout(5000);

example/e2e/utils/actions.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ async function userSelectsDayInCalendar(uiDevice, {xPos, yPos}) {
9595
}
9696

9797
async function userDismissesCompactDatePicker() {
98-
await element(by.type('_UIDatePickerContainerView')).tap();
98+
// On iOS 26, _UIDatePickerContainerView is behind the RN views and not hittable.
99+
// Tap the compact date picker element to toggle the popup closed instead.
100+
await element(by.id('dateTimePicker')).tap();
99101
}
100102

101103
module.exports = {

0 commit comments

Comments
 (0)