From 5498ff8a87678e5859ec440f40d2f5e7b648a68c Mon Sep 17 00:00:00 2001 From: "Alinson S. Xavier" Date: Sat, 10 Sep 2022 19:25:40 -0500 Subject: [PATCH] Switch emulator to google_apis; test APIs 28 to 33 --- .github/workflows/main.yml | 2 +- build.sh | 4 ++-- .../java/org/isoron/uhabits/acceptance/steps/CommonSteps.kt | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 46bed95e5..b42512d32 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: run: ./build.sh build - name: Run Android tests - run: ./build.sh android-tests-parallel 23 24 25 26 27 28 30 31 + run: ./build.sh android-tests-parallel 28 29 30 31 32 33 - name: Upload artifacts if: always() diff --git a/build.sh b/build.sh index 5c27503fa..271a2ba61 100755 --- a/build.sh +++ b/build.sh @@ -85,10 +85,10 @@ android_setup() { $AVDMANAGER delete avd --name $AVDNAME log_info "Creating new Android virtual device (API $API)..." - (echo "y" | $SDKMANAGER --install "system-images;android-$API;default;x86_64") || return 1 + (echo "y" | $SDKMANAGER --install "system-images;android-$API;google_apis;x86_64") || return 1 $AVDMANAGER create avd \ --name $AVDNAME \ - --package "system-images;android-$API;default;x86_64" \ + --package "system-images;android-$API;google_apis;x86_64" \ --device "Nexus 4" || return 1 flock -u 10 diff --git a/uhabits-android/src/androidTest/java/org/isoron/uhabits/acceptance/steps/CommonSteps.kt b/uhabits-android/src/androidTest/java/org/isoron/uhabits/acceptance/steps/CommonSteps.kt index 83e0a8610..e7978c977 100644 --- a/uhabits-android/src/androidTest/java/org/isoron/uhabits/acceptance/steps/CommonSteps.kt +++ b/uhabits-android/src/androidTest/java/org/isoron/uhabits/acceptance/steps/CommonSteps.kt @@ -20,6 +20,7 @@ package org.isoron.uhabits.acceptance.steps import android.os.Build import android.os.Build.VERSION.SDK_INT +import android.os.Build.VERSION_CODES import androidx.annotation.StringRes import androidx.recyclerview.widget.RecyclerView import androidx.test.espresso.Espresso @@ -73,7 +74,7 @@ object CommonSteps : BaseUserInterfaceTest() { } fun offsetHeaders() { - device.swipe(750, 160, 600, 160, 20) + device.swipe(500, 160, 350, 160, 20) } fun scrollToText(text: String?) {