Skip to content

Commit cf2d445

Browse files
committed
Move Android instrumented test ThemeTest to unit test
1 parent 5087c86 commit cf2d445

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

core/designsystem/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ dependencies {
4242
implementation(libs.androidx.core.ktx)
4343
implementation(libs.coil.kt.compose)
4444

45-
androidTestImplementation(projects.core.testing)
45+
testImplementation(libs.androidx.compose.ui.testManifest)
4646
}

core/designsystem/src/androidTest/kotlin/com/google/samples/apps/nowinandroid/core/designsystem/ThemeTest.kt renamed to core/designsystem/src/test/kotlin/com/google/samples/apps/nowinandroid/core/designsystem/ThemeTest.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ import com.google.samples.apps.nowinandroid.core.designsystem.theme.NiaTheme
4343
import com.google.samples.apps.nowinandroid.core.designsystem.theme.TintTheme
4444
import org.junit.Rule
4545
import org.junit.Test
46+
import org.junit.runner.RunWith
47+
import org.robolectric.RobolectricTestRunner
48+
import org.robolectric.annotation.Config
4649
import kotlin.test.assertEquals
4750

4851
/**
@@ -53,6 +56,8 @@ import kotlin.test.assertEquals
5356
* [LocalBackgroundTheme] — have the expected values for a given theme mode, as specified by the
5457
* design system.
5558
*/
59+
@RunWith(RobolectricTestRunner::class)
60+
@Config(sdk = [33])
5661
class ThemeTest {
5762

5863
@get:Rule

0 commit comments

Comments
 (0)