Skip to content

Commit 6585b17

Browse files
Assume
1 parent 0ec25d1 commit 6585b17

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ concurrency:
1919
cancel-in-progress: true
2020

2121
env:
22+
CI: true
2223
ANDROID_SDK_VERSION: "28"
2324
ANDROID_EMU_NAME: test
2425
ANDROID_EMU_TARGET: default

src/e2eIosTest/java/io/appium/java_client/ios/IOSWebViewTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package io.appium.java_client.ios;
22

33
import io.appium.java_client.AppiumBy;
4+
import io.appium.java_client.TestUtils;
5+
import org.junit.jupiter.api.Assumptions;
46
import org.junit.jupiter.api.Test;
57
import org.openqa.selenium.By;
68
import org.openqa.selenium.support.ui.ExpectedConditions;
@@ -15,6 +17,9 @@ public class IOSWebViewTest extends BaseIOSWebViewTest {
1517

1618
@Test
1719
public void webViewPageTestCase() throws InterruptedException {
20+
// this test is not stable in the CI env
21+
Assumptions.assumeFalse(TestUtils.isCiEnv());
22+
1823
new WebDriverWait(driver, LOOKUP_TIMEOUT)
1924
.until(ExpectedConditions.presenceOfElementLocated(By.id("login")))
2025
.click();

src/test/java/io/appium/java_client/TestUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,8 @@ public static Point getCenter(WebElement webElement, @Nullable Point location) {
7878
}
7979
return new Point(location.x + dim.width / 2, location.y + dim.height / 2);
8080
}
81+
82+
public static boolean isCiEnv() {
83+
return System.getenv("CI") != null;
84+
}
8185
}

0 commit comments

Comments
 (0)