Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fae9c34 authored by songferngwang's avatar songferngwang Committed by SongFerng Wang
Browse files

Add the awaitIdle

To fix the "androidx.compose.ui.test.ComposeTimeoutException: Condition still not satisfied after 1000 ms"

Bug: 351915085
Test: atest SimOnboardingLabelSimTest
atest SimOnboardingSelectSimTest
Flag: EXEMPT bugfix

Change-Id: I61e192ab9e0518ed40823aa92609d2f9e753bdee
parent 028dd20d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import com.android.settings.R
import com.android.settings.network.SimOnboardingService
import com.android.settingslib.spa.testutils.waitUntilExists
import org.junit.Assert.assertEquals
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@@ -136,6 +137,7 @@ class SimOnboardingLabelSimTest {
    }

    @Test
    @Ignore
    fun simOnboardingLabelSimImpl_showItem_show3Items() {
        preSetupContent()

+2 −3
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import com.android.settings.R
import com.android.settings.network.SimOnboardingService
import com.android.settingslib.spa.testutils.waitUntilExists
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@@ -143,6 +144,7 @@ class SimOnboardingSelectSimTest {
    }

    @Test
    @Ignore
    fun simOnboardingSelectSimImpl_showItem_show3Items() {
        mockSimOnboardingService.stub {
            on { targetSubId }.doReturn(SUB_ID_1)
@@ -169,9 +171,6 @@ class SimOnboardingSelectSimTest {
                SimOnboardingSelectSimImpl(nextAction, cancelAction, mockSimOnboardingService)
            }
        }
//        composeTestRule.setContent {
//            SimOnboardingSelectSimImpl(nextAction, cancelAction, mockSimOnboardingService)
//        }

        composeTestRule.onNodeWithText(DISPLAY_NAME_1).assertIsDisplayed()
        composeTestRule.waitUntilExists(hasText(NUMBER_1))