This repository was archived by the owner on Jan 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
mobile/src/androidTest/java/com/google/samples/apps/iosched/tests/ui Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,12 @@ import com.google.samples.apps.iosched.shared.data.FakeConferenceDataSource
29
29
import com.google.samples.apps.iosched.tests.SetPreferencesRule
30
30
import dagger.hilt.android.testing.HiltAndroidRule
31
31
import dagger.hilt.android.testing.HiltAndroidTest
32
+ import kotlinx.coroutines.Dispatchers
33
+ import kotlinx.coroutines.test.TestCoroutineDispatcher
34
+ import kotlinx.coroutines.test.setMain
32
35
import org.hamcrest.CoreMatchers.allOf
33
36
import org.hamcrest.CoreMatchers.instanceOf
37
+ import org.junit.Before
34
38
import org.junit.Rule
35
39
import org.junit.Test
36
40
import org.junit.runner.RunWith
@@ -55,6 +59,7 @@ class CodelabTest {
55
59
onView(allOf(instanceOf(TextView ::class .java), withParent(withId(R .id.toolbar))))
56
60
.check(matches(withText(R .string.event_codelabs_title)))
57
61
// One of the codelabs
62
+ Thread .sleep(400 ) // TODO: RecyclerView is async so it makes the test fail
58
63
onView(withText(FakeConferenceDataSource .FAKE_CODELAB_TITLE )).check(matches(isDisplayed()))
59
64
}
60
65
}
You can’t perform that action at this time.
0 commit comments