From 7e22d589e689223471cd375ce055a91fbaee1b0d Mon Sep 17 00:00:00 2001 From: Shobhit Agarwal Date: Tue, 20 Aug 2024 00:45:00 +0530 Subject: [PATCH] Revert the failing test and disable daemon --- .github/workflows/unit-test.yml | 2 +- .../ground/ui/home/mapcontainer/MapTypeDialogFragmentTest.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index d06aa2e6b6..15141fee50 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -38,4 +38,4 @@ jobs: run: chmod +x gradlew - name: Run unit tests - run: ./gradlew testDevDebugUnitTest + run: ./gradlew testDevDebugUnitTest --no-daemon diff --git a/ground/src/test/java/com/google/android/ground/ui/home/mapcontainer/MapTypeDialogFragmentTest.kt b/ground/src/test/java/com/google/android/ground/ui/home/mapcontainer/MapTypeDialogFragmentTest.kt index 11fb74e91a..e4609ecae7 100644 --- a/ground/src/test/java/com/google/android/ground/ui/home/mapcontainer/MapTypeDialogFragmentTest.kt +++ b/ground/src/test/java/com/google/android/ground/ui/home/mapcontainer/MapTypeDialogFragmentTest.kt @@ -31,12 +31,12 @@ import com.google.android.ground.shouldHaveTextAtPosition import com.google.android.ground.ui.map.MapType import com.google.common.truth.Truth.assertThat import dagger.hilt.android.testing.HiltAndroidTest +import javax.inject.Inject import org.hamcrest.Matchers.allOf import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner -import javax.inject.Inject @HiltAndroidTest @RunWith(RobolectricTestRunner::class) @@ -60,7 +60,7 @@ class MapTypeDialogFragmentTest : BaseHiltTest() { onView(withText("Base map")).check(matches(isDisplayed())) onView(withId(R.id.recycler_view)).check(matches(allOf(isDisplayed(), hasChildCount(3)))) with(R.id.recycler_view) { - shouldHaveTextAtPosition("Road map 2", 0) + shouldHaveTextAtPosition("Road map", 0) shouldHaveTextAtPosition("Terrain", 1) shouldHaveTextAtPosition("Satellite", 2) }