From d0875a5e5fa02b0c52f4cfca5234f0411bbf010e Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Mon, 6 May 2024 08:34:45 +0200 Subject: [PATCH 1/8] ci: Bump iOS version --- .github/workflows/gradle.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index c83581927..7605142a5 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -22,9 +22,9 @@ env: ANDROID_SDK_VERSION: "28" ANDROID_EMU_NAME: test ANDROID_EMU_TARGET: default - XCODE_VERSION: "14.2" - IOS_DEVICE_NAME: iPhone 12 - IOS_PLATFORM_VERSION: "16.2" + XCODE_VERSION: "15.3" + IOS_DEVICE_NAME: iPhone 15 + IOS_PLATFORM_VERSION: "17.4" jobs: build: @@ -34,7 +34,7 @@ jobs: include: - java: 11 # Need to use specific (not `-latest`) version of macOS to be sure the required version of Xcode/simulator is available - platform: macos-12 + platform: macos-14 e2e-tests: ios - java: 17 platform: ubuntu-latest @@ -100,19 +100,19 @@ jobs: uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: "${{ env.XCODE_VERSION }}" + - name: Prepare iOS simulator + if: matrix.e2e-tests == 'ios' + uses: futureware-tech/simulator-action@v3 + with: + # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md + model: "${{ env.IOS_DEVICE_NAME }}" + os_version: "${{ env.IOS_PLATFORM_VERSION }}" - name: Install XCUITest driver if: matrix.e2e-tests == 'ios' run: appium driver install xcuitest - name: Prebuild XCUITest driver if: matrix.e2e-tests == 'ios' run: appium driver run xcuitest build-wda - - name: Prepare iOS simulator - if: matrix.e2e-tests == 'ios' - run: | - xcrun simctl list - target_sim_id=$(xcrun simctl list devices available | grep "$IOS_DEVICE_NAME (" | cut -d "(" -f2 | cut -d ")" -f1) - open -Fn "/Applications/Xcode_$XCODE_VERSION.app/Contents/Developer/Applications/Simulator.app" - xcrun simctl bootstatus $target_sim_id -b - name: Run iOS E2E tests if: matrix.e2e-tests == 'ios' run: ./gradlew e2eIosTest -PisCI -Pselenium.version=$latest_snapshot From 50b0f54a4d279ad276547afdcda02645c4f7d713 Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Mon, 6 May 2024 08:53:12 +0200 Subject: [PATCH 2/8] tune --- .github/workflows/gradle.yml | 2 +- .github/workflows/pr-title.yml | 2 +- .../java/io/appium/java_client/ios/BaseSafariTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 7605142a5..06a4c0c29 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -22,6 +22,7 @@ env: ANDROID_SDK_VERSION: "28" ANDROID_EMU_NAME: test ANDROID_EMU_TARGET: default + # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md XCODE_VERSION: "15.3" IOS_DEVICE_NAME: iPhone 15 IOS_PLATFORM_VERSION: "17.4" @@ -104,7 +105,6 @@ jobs: if: matrix.e2e-tests == 'ios' uses: futureware-tech/simulator-action@v3 with: - # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md model: "${{ env.IOS_DEVICE_NAME }}" os_version: "${{ env.IOS_PLATFORM_VERSION }}" - name: Install XCUITest driver diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index f3387333b..420d03498 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -10,6 +10,6 @@ jobs: steps: - uses: beemojs/conventional-pr-action@v2 with: - config-preset: angular + config-preset: angular env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/src/e2eIosTest/java/io/appium/java_client/ios/BaseSafariTest.java b/src/e2eIosTest/java/io/appium/java_client/ios/BaseSafariTest.java index d35c76357..9b4c373e5 100644 --- a/src/e2eIosTest/java/io/appium/java_client/ios/BaseSafariTest.java +++ b/src/e2eIosTest/java/io/appium/java_client/ios/BaseSafariTest.java @@ -24,7 +24,7 @@ import java.time.Duration; public class BaseSafariTest extends BaseIOSTest { - private static final Duration WEBVIEW_CONNECT_TIMEOUT = Duration.ofSeconds(30); + private static final Duration WEBVIEW_CONNECT_TIMEOUT = Duration.ofMinutes(1); @BeforeAll public static void beforeClass() throws IOException { startAppiumServer(); From ca56d253c871f2ef729f552159ca2fa382d3d67f Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Mon, 6 May 2024 09:44:02 +0200 Subject: [PATCH 3/8] upd --- build.gradle | 1 + .../java/io/appium/java_client/ios/BaseSafariTest.java | 5 ++--- .../appium/java_client/ios/IOSNativeWebTapSettingTest.java | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 719b1921e..1926a2a00 100644 --- a/build.gradle +++ b/build.gradle @@ -242,6 +242,7 @@ testing { filter { exclude '**/IOSScreenRecordTest.class' exclude '**/ImagesComparisonTest.class' + exclude '**/IOSNativeWebTapSettingTest.class' } } } diff --git a/src/e2eIosTest/java/io/appium/java_client/ios/BaseSafariTest.java b/src/e2eIosTest/java/io/appium/java_client/ios/BaseSafariTest.java index 9b4c373e5..710f5dbf1 100644 --- a/src/e2eIosTest/java/io/appium/java_client/ios/BaseSafariTest.java +++ b/src/e2eIosTest/java/io/appium/java_client/ios/BaseSafariTest.java @@ -20,13 +20,12 @@ import io.appium.java_client.remote.MobileBrowserType; import org.junit.jupiter.api.BeforeAll; -import java.io.IOException; import java.time.Duration; public class BaseSafariTest extends BaseIOSTest { - private static final Duration WEBVIEW_CONNECT_TIMEOUT = Duration.ofMinutes(1); + private static final Duration WEBVIEW_CONNECT_TIMEOUT = Duration.ofSeconds(30); - @BeforeAll public static void beforeClass() throws IOException { + @BeforeAll public static void beforeClass() { startAppiumServer(); XCUITestOptions options = new XCUITestOptions() diff --git a/src/e2eIosTest/java/io/appium/java_client/ios/IOSNativeWebTapSettingTest.java b/src/e2eIosTest/java/io/appium/java_client/ios/IOSNativeWebTapSettingTest.java index 922dbb7cd..2f0397e90 100644 --- a/src/e2eIosTest/java/io/appium/java_client/ios/IOSNativeWebTapSettingTest.java +++ b/src/e2eIosTest/java/io/appium/java_client/ios/IOSNativeWebTapSettingTest.java @@ -14,7 +14,6 @@ public class IOSNativeWebTapSettingTest extends BaseSafariTest { @Test - @Disabled("https://github.com/appium/appium/issues/17014") public void nativeWebTapSettingTest() { assertTrue(driver.isBrowser()); driver.get("https://saucelabs.com/test/guinea-pig"); From 0fabf4f3f5eabc414ffeb356433761c8ef50cc20 Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Mon, 6 May 2024 11:11:59 +0200 Subject: [PATCH 4/8] unused import --- .../io/appium/java_client/ios/IOSNativeWebTapSettingTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/e2eIosTest/java/io/appium/java_client/ios/IOSNativeWebTapSettingTest.java b/src/e2eIosTest/java/io/appium/java_client/ios/IOSNativeWebTapSettingTest.java index 2f0397e90..8c1bc3fee 100644 --- a/src/e2eIosTest/java/io/appium/java_client/ios/IOSNativeWebTapSettingTest.java +++ b/src/e2eIosTest/java/io/appium/java_client/ios/IOSNativeWebTapSettingTest.java @@ -1,6 +1,5 @@ package io.appium.java_client.ios; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; From 71782e3a616cd6c6e2332a3e18eb33e48fffc59b Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Tue, 28 May 2024 13:34:25 +0300 Subject: [PATCH 5/8] Bump Xcode to 15.4 and iOS to 17.5 --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 06a4c0c29..e8006e8df 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -23,9 +23,9 @@ env: ANDROID_EMU_NAME: test ANDROID_EMU_TARGET: default # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md - XCODE_VERSION: "15.3" + XCODE_VERSION: "15.4" IOS_DEVICE_NAME: iPhone 15 - IOS_PLATFORM_VERSION: "17.4" + IOS_PLATFORM_VERSION: "17.5" jobs: build: From 626eecc2bcb9d3e457b59b9d0ded71adbd989faa Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Tue, 28 May 2024 13:56:58 +0300 Subject: [PATCH 6/8] Increase web view detection timeout --- .../java/io/appium/java_client/ios/BaseIOSWebViewTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/e2eIosTest/java/io/appium/java_client/ios/BaseIOSWebViewTest.java b/src/e2eIosTest/java/io/appium/java_client/ios/BaseIOSWebViewTest.java index f975d3c5b..04ecd2592 100644 --- a/src/e2eIosTest/java/io/appium/java_client/ios/BaseIOSWebViewTest.java +++ b/src/e2eIosTest/java/io/appium/java_client/ios/BaseIOSWebViewTest.java @@ -27,8 +27,8 @@ public class BaseIOSWebViewTest extends BaseIOSTest { private static final String VODQA_ZIP = TestUtils.resourcePathToAbsolutePath("vodqa.zip").toString(); - private static final Duration WEB_VIEW_DETECT_INTERVAL = Duration.ofSeconds(1); - private static final Duration WEB_VIEW_DETECT_DURATION = Duration.ofSeconds(15); + private static final Duration WEB_VIEW_DETECT_INTERVAL = Duration.ofSeconds(2); + private static final Duration WEB_VIEW_DETECT_DURATION = Duration.ofSeconds(30); @BeforeAll public static void beforeClass() { From dab2ccf31e532f40800d7ff0922c676fb208569f Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Tue, 28 May 2024 14:52:34 +0300 Subject: [PATCH 7/8] Set platform version of iOS web view tests --- .../java/io/appium/java_client/ios/BaseIOSWebViewTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/e2eIosTest/java/io/appium/java_client/ios/BaseIOSWebViewTest.java b/src/e2eIosTest/java/io/appium/java_client/ios/BaseIOSWebViewTest.java index 04ecd2592..2ffe6c79c 100644 --- a/src/e2eIosTest/java/io/appium/java_client/ios/BaseIOSWebViewTest.java +++ b/src/e2eIosTest/java/io/appium/java_client/ios/BaseIOSWebViewTest.java @@ -35,6 +35,7 @@ public static void beforeClass() { startAppiumServer(); XCUITestOptions options = new XCUITestOptions() + .setPlatformVersion(PLATFORM_VERSION) .setDeviceName(DEVICE_NAME) .setWdaLaunchTimeout(WDA_LAUNCH_TIMEOUT) .setCommandTimeouts(Duration.ofSeconds(240)) From 246c73895f014987586508aaf7fef786e574fbce Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Tue, 28 May 2024 15:39:27 +0300 Subject: [PATCH 8/8] Show iOS logs for web view tests --- .../java/io/appium/java_client/ios/BaseIOSWebViewTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/e2eIosTest/java/io/appium/java_client/ios/BaseIOSWebViewTest.java b/src/e2eIosTest/java/io/appium/java_client/ios/BaseIOSWebViewTest.java index 2ffe6c79c..752a0c539 100644 --- a/src/e2eIosTest/java/io/appium/java_client/ios/BaseIOSWebViewTest.java +++ b/src/e2eIosTest/java/io/appium/java_client/ios/BaseIOSWebViewTest.java @@ -39,6 +39,7 @@ public static void beforeClass() { .setDeviceName(DEVICE_NAME) .setWdaLaunchTimeout(WDA_LAUNCH_TIMEOUT) .setCommandTimeouts(Duration.ofSeconds(240)) + .setShowIosLog(true) .setApp(VODQA_ZIP); Supplier createDriver = () -> new IOSDriver(service.getUrl(), options); try {