Skip to content

Commit

Permalink
Add testing module to query-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
ogaclejapan committed Jun 22, 2024
1 parent b25db87 commit cac732a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions soil-query-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ kotlin {
implementation(compose.runtime)
implementation(compose.ui)
implementation(compose.material)
implementation(projects.internal.testing)
}

jvmTest.dependencies {
Expand Down Expand Up @@ -92,6 +93,10 @@ android {
sourceCompatibility = buildTarget.javaVersion.get()
targetCompatibility = buildTarget.javaVersion.get()
}
@Suppress("UnstableApiUsage")
testOptions {
unitTests.isIncludeAndroidResources = true
}
dependencies {
debugImplementation(libs.compose.ui.tooling)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ import androidx.compose.ui.test.assertTextEquals
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.performClick
import androidx.compose.ui.test.runComposeUiTest
import soil.testing.UnitTest
import kotlin.test.Test

@OptIn(ExperimentalTestApi::class)
class ExampleTest {
class ExampleTest: UnitTest() {

@Test
fun myTest() = runComposeUiTest {
Expand Down
4 changes: 4 additions & 0 deletions soil-query-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ android {
sourceCompatibility = buildTarget.javaVersion.get()
targetCompatibility = buildTarget.javaVersion.get()
}
@Suppress("UnstableApiUsage")
testOptions {
unitTests.isIncludeAndroidResources = true
}
dependencies {
debugImplementation(libs.compose.ui.tooling)
}
Expand Down

0 comments on commit cac732a

Please sign in to comment.