Skip to content

Commit 8c48fdd

Browse files
committed
WIP
1 parent 6263fa2 commit 8c48fdd

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

.github/workflows/e2e-tests-hybrid.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,26 @@ jobs:
167167
# List available simulators
168168
xcrun simctl list devices available
169169
170-
# Boot iPhone 16 (matches E2E test config)
170+
# Kill any existing simulators to start fresh
171+
xcrun simctl shutdown all || true
172+
sleep 5
173+
174+
# Boot iPhone 16 with specific device ID to avoid ambiguity
171175
xcrun simctl boot "iPhone 16" || true
172-
xcrun simctl bootstatus "iPhone 16" -b
173176
174-
# Wait for simulator to be fully ready
175-
sleep 10
177+
# Wait longer for simulator to boot and add retry logic
178+
echo "Waiting for simulator to boot..."
179+
for i in {1..30}; do
180+
if xcrun simctl list devices | grep "iPhone 16" | grep -q "Booted"; then
181+
echo "Simulator is booted!"
182+
break
183+
fi
184+
echo "Waiting for simulator boot... ($i/30)"
185+
sleep 5
186+
done
187+
188+
# Additional wait for simulator to be fully ready
189+
sleep 15
176190
177191
# Install the app
178192
xcrun simctl install "iPhone 16" e2e-app/bitkit.app
@@ -182,6 +196,10 @@ jobs:
182196
183197
# Check simulator status
184198
xcrun simctl list devices | grep "iPhone 16"
199+
200+
# Launch simulator app to ensure it's visible
201+
open -a Simulator
202+
sleep 5
185203
186204
- name: Start Appium Server
187205
run: |
@@ -241,6 +259,9 @@ jobs:
241259
sed -i '' 's/connectionRetryTimeout: [0-9]*/connectionRetryTimeout: 300000/' wdio.conf.ts
242260
sed -i '' 's/waitforTimeout: [0-9]*/waitforTimeout: 60000/' wdio.conf.ts
243261
262+
# Add Appium capabilities to help with simulator boot issues
263+
sed -i '' 's/"appium:autoAcceptAlerts": true/"appium:autoAcceptAlerts": true,\n "appium:newCommandTimeout": 300,\n "appium:commandTimeouts": {"implicit": 30000},\n "appium:launchTimeout": 300000,\n "appium:deviceReadyTimeout": 300000,\n "appium:autoLaunch": false/' wdio.conf.ts
264+
244265
# Pass everything through to WDIO/Mocha
245266
npm run e2e:ios -- "$@"
246267
env:

0 commit comments

Comments
 (0)