diff --git a/.github/workflows/NativePipeline.yml b/.github/workflows/NativePipeline.yml index cef6dc827..ca85b0e0f 100644 --- a/.github/workflows/NativePipeline.yml +++ b/.github/workflows/NativePipeline.yml @@ -751,7 +751,7 @@ jobs: # truncated โ€” at 20 min several shards (accordion, background-image, bottom-sheet, # color-picker, safe-area-view) were cancelled mid-flow. If a shard still hits 30 the cause # is real app instability, not the cap. - timeout-minutes: 30 + timeout-minutes: 35 strategy: max-parallel: 4 matrix: diff --git a/maestro/helpers/helpers.sh b/maestro/helpers/helpers.sh index d035668e1..77235e86d 100644 --- a/maestro/helpers/helpers.sh +++ b/maestro/helpers/helpers.sh @@ -78,9 +78,24 @@ stop_recording() { REC_FILE="" } +# Function to clean up stale XCTest processes (iOS only) +cleanup_xctest_processes() { + if [ "$PLATFORM" != "ios" ]; then + return 0 + fi + echo "๐Ÿงน Cleaning up stale XCTest processes..." + # Kill any leftover XCTest runner processes that might be blocking driver initialization + pkill -9 -f "XCTRunner" 2>/dev/null || true + pkill -9 -f "xctest" 2>/dev/null || true + pkill -9 -f "maestro.*driver" 2>/dev/null || true + sleep 2 +} + # Function to restart the iOS simulator restart_simulator() { echo "๐Ÿ”„ Restarting iOS Simulator..." + # Clean up XCTest processes first + cleanup_xctest_processes # Shut down whatever is booted; the device is auto-selected in prepare_ios.sh, # so we don't depend on a hardcoded device name here. xcrun simctl shutdown all || true diff --git a/maestro/run_maestro_jsactions_tests.sh b/maestro/run_maestro_jsactions_tests.sh index 56bc5b595..f4f7c5a7b 100644 --- a/maestro/run_maestro_jsactions_tests.sh +++ b/maestro/run_maestro_jsactions_tests.sh @@ -97,6 +97,16 @@ run_jsactions_tests() { fi } +# Clean up any stale XCTest processes before starting (iOS only) +if [ "$PLATFORM" == "ios" ]; then + cleanup_xctest_processes +fi + +# Fast-fail smoke check before running jsActions tests (same as widget tests) +if ! smoke_check; then + exit 1 +fi + # Run jsActions tests run_jsactions_tests if [ $? -ne 0 ]; then diff --git a/packages/pluggableWidgets/bottom-sheet-native/e2e/specs/maestro/Botton_sheet_expanding_fullscreen.yaml b/packages/pluggableWidgets/bottom-sheet-native/e2e/specs/maestro/Botton_sheet_expanding_fullscreen.yaml index c7c3a9a5c..84f75e399 100644 --- a/packages/pluggableWidgets/bottom-sheet-native/e2e/specs/maestro/Botton_sheet_expanding_fullscreen.yaml +++ b/packages/pluggableWidgets/bottom-sheet-native/e2e/specs/maestro/Botton_sheet_expanding_fullscreen.yaml @@ -8,11 +8,11 @@ appId: "${APP_ID}" text: "Bottom Sheet" - tapOn: text: "Expanding fullscreen" -# Because the image loading can take some time due to resources on emulator, we need to wait for the image to be visible -- extendedWaitUntil: +# Because the image loading and animation can take some time due to resources on emulator, we need to wait +- extendedWaitUntil: visible: randText # Any random text that does not exist in the UI optional: true # This should be true so that the test won't fail - timeout: 10000 # 10 seconds + timeout: 15000 # 15 seconds to allow for animation to complete - takeScreenshot: path: "maestro/images/actual/${PLATFORM}/bottom_sheet_expanding_fullscreen" - assertScreenshot: diff --git a/packages/pluggableWidgets/bottom-sheet-native/e2e/specs/maestro/Modal_basic_non_native.yaml b/packages/pluggableWidgets/bottom-sheet-native/e2e/specs/maestro/Modal_basic_non_native.yaml index 199199179..95d39bdcd 100644 --- a/packages/pluggableWidgets/bottom-sheet-native/e2e/specs/maestro/Modal_basic_non_native.yaml +++ b/packages/pluggableWidgets/bottom-sheet-native/e2e/specs/maestro/Modal_basic_non_native.yaml @@ -8,6 +8,10 @@ appId: "${APP_ID}" text: "Bottom Sheet" - tapOn: text: "Modal basic non native" +# Wait for the page to fully load before tapping Open +- extendedWaitUntil: + visible: "Open" + timeout: 10000 - tapOn: text: "Open" diff --git a/packages/pluggableWidgets/intro-screen-native/e2e/specs/maestro/IntroScreen.yaml b/packages/pluggableWidgets/intro-screen-native/e2e/specs/maestro/IntroScreen.yaml index 9df303212..0b898fbb9 100644 --- a/packages/pluggableWidgets/intro-screen-native/e2e/specs/maestro/IntroScreen.yaml +++ b/packages/pluggableWidgets/intro-screen-native/e2e/specs/maestro/IntroScreen.yaml @@ -39,7 +39,15 @@ appId: "${APP_ID}" timeout: 5000 - tapOn: text: "OK" +# Wait for dialog to dismiss before navigating back +- extendedWaitUntil: + visible: "Go back" + timeout: 3000 - tapOn: "Go back" +# Wait for widgets menu to appear before tapping intro screen again +- extendedWaitUntil: + visible: "Widgets menu" + timeout: 5000 - tapOn: text: "Intro screen" - extendedWaitUntil: @@ -47,6 +55,13 @@ appId: "${APP_ID}" timeout: 5000 - tapOn: text: "NEXT" +# Wait for slide transition to complete - longer timeout for Android emulator +- extendedWaitUntil: + visible: "Active slide: 3" + timeout: 10000 +- extendedWaitUntil: + visible: "FINISH" + timeout: 10000 - tapOn: text: "FINISH" - extendedWaitUntil: