Skip to content

Commit 68b7897

Browse files
authored
Remove Robolectric (#911)
* Remove Robolectric * Move instrumented tests into androidTest folder
1 parent f01fcad commit 68b7897

File tree

8 files changed

+1
-12
lines changed

8 files changed

+1
-12
lines changed

.github/workflows/blueprints.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
# comply, run spotless with a gradle init script and disable the cache.
4444
run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache
4545

46-
- name: Robolectric
46+
- name: Unit tests
4747
run: ./gradlew testDebugUnitTest
4848

4949
# Needed to accept licenses

app/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ dependencies {
170170
testImplementation(libs.androidx.archcore.testing)
171171
testImplementation(libs.kotlinx.coroutines.android)
172172
testImplementation(libs.kotlinx.coroutines.test)
173-
testImplementation(libs.robolectric.core)
174173
testImplementation(libs.androidx.navigation.testing)
175174
testImplementation(libs.androidx.test.espresso.core)
176175
testImplementation(libs.androidx.test.espresso.contrib)
@@ -205,7 +204,6 @@ dependencies {
205204
androidTestImplementation(libs.androidx.test.espresso.intents)
206205
androidTestImplementation(libs.androidx.test.espresso.idling.resources)
207206
androidTestImplementation(libs.androidx.test.espresso.idling.concurrent)
208-
androidTestImplementation(libs.robolectric.annotations)
209207

210208
// AndroidX Test - Hilt testing
211209
androidTestImplementation(libs.hilt.android.testing)
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,12 @@ import org.junit.Before
4444
import org.junit.Rule
4545
import org.junit.Test
4646
import org.junit.runner.RunWith
47-
import org.robolectric.annotation.LooperMode
48-
import org.robolectric.annotation.TextLayoutMode
4947

5048
/**
5149
* Integration test for the Add Task screen.
5250
*/
5351
@RunWith(AndroidJUnit4::class)
5452
@MediumTest
55-
@LooperMode(LooperMode.Mode.PAUSED)
56-
@TextLayoutMode(TextLayoutMode.Mode.REALISTIC)
5753
@HiltAndroidTest
5854
@ExperimentalCoroutinesApi
5955
class AddEditTaskScreenTest {

app/src/sharedTest/resources/robolectric.properties

Lines changed: 0 additions & 2 deletions
This file was deleted.

gradle/libs.versions.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ protobuf = "3.21.12"
5151
protobufPlugin = "0.8.19"
5252
retrofit = "2.9.0"
5353
retrofitKotlinxSerializationJson = "0.8.0"
54-
robolectric = "4.9"
5554
room = "2.5.0-rc01"
5655
spotless = "5.12.5"
5756
timber = "5.0.1"
@@ -132,8 +131,6 @@ kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-cor
132131
kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "kotlinxDatetime" }
133132
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
134133
lint-api = { group = "com.android.tools.lint", name = "lint-api", version.ref = "lint" }
135-
robolectric-core = { group = "org.robolectric", name = "robolectric", version.ref = "robolectric" }
136-
robolectric-annotations = { group = "org.robolectric", name = "annotations", version.ref = "robolectric" }
137134
room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }
138135
room-ktx = { group = "androidx.room", name = "room-ktx", version.ref = "room" }
139136
room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "room" }

0 commit comments

Comments
 (0)