Skip to content

Commit ab8ddc3

Browse files
authored
Merge pull request #1048 from SimonMarquis/move-android-instrumented-test
Move Android instrumented test `ThemeTest` to unit test
2 parents 3141de0 + 7659925 commit ab8ddc3

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

core/designsystem/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ dependencies {
4040
implementation(libs.coil.kt.compose)
4141

4242
testImplementation(libs.androidx.compose.ui.test)
43+
testImplementation(libs.androidx.compose.ui.testManifest)
44+
4345
testImplementation(libs.hilt.android.testing)
4446
testImplementation(libs.robolectric)
4547
testImplementation(libs.roborazzi)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ import com.google.samples.apps.nowinandroid.core.designsystem.theme.NiaTheme
4444
import com.google.samples.apps.nowinandroid.core.designsystem.theme.TintTheme
4545
import org.junit.Rule
4646
import org.junit.Test
47+
import org.junit.runner.RunWith
48+
import org.robolectric.RobolectricTestRunner
4749
import kotlin.test.assertEquals
4850

4951
/**
@@ -54,6 +56,7 @@ import kotlin.test.assertEquals
5456
* [LocalBackgroundTheme] — have the expected values for a given theme mode, as specified by the
5557
* design system.
5658
*/
59+
@RunWith(RobolectricTestRunner::class)
5760
class ThemeTest {
5861

5962
@get:Rule

0 commit comments

Comments
 (0)