Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Bump iOS version #2167

Merged
merged 8 commits into from
May 28, 2024
Merged
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
22 changes: 11 additions & 11 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ 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"
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
XCODE_VERSION: "15.4"
IOS_DEVICE_NAME: iPhone 15
IOS_PLATFORM_VERSION: "17.5"

jobs:
build:
Expand All @@ -34,7 +35,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
Expand Down Expand Up @@ -100,19 +101,18 @@ 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:
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
2 changes: 1 addition & 1 deletion .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ testing {
filter {
exclude '**/IOSScreenRecordTest.class'
exclude '**/ImagesComparisonTest.class'
exclude '**/IOSNativeWebTapSettingTest.class'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,19 @@
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() {
startAppiumServer();

XCUITestOptions options = new XCUITestOptions()
.setPlatformVersion(PLATFORM_VERSION)
.setDeviceName(DEVICE_NAME)
.setWdaLaunchTimeout(WDA_LAUNCH_TIMEOUT)
.setCommandTimeouts(Duration.ofSeconds(240))
.setShowIosLog(true)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep it for some time to monitor the tests, there is some flakiness in the app, it will help to catch details

.setApp(VODQA_ZIP);
Supplier<IOSDriver> createDriver = () -> new IOSDriver(service.getUrl(), options);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.ofSeconds(30);

@BeforeAll public static void beforeClass() throws IOException {
@BeforeAll public static void beforeClass() {
startAppiumServer();

XCUITestOptions options = new XCUITestOptions()
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -14,7 +13,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");
Expand Down