Make manual level selection responsive

This commit is contained in:
Joe Tretter
2026-06-25 10:02:06 -05:00
parent 82e38de3bb
commit 035851ac05
3 changed files with 57 additions and 7 deletions

View File

@@ -6,6 +6,7 @@ import androidx.compose.ui.test.junit4.createEmptyComposeRule
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.performClick
import androidx.compose.ui.test.performImeAction
import androidx.compose.ui.test.performScrollTo
import androidx.compose.ui.test.performTextClearance
import androidx.compose.ui.test.performTextInput
import androidx.test.core.app.ActivityScenario
@@ -62,6 +63,21 @@ class GitRepositoryRuntimeInstrumentedTest {
}
}
@Test
fun selectingLevelFromLevelsPaneUpdatesExerciseImmediately() {
launchFreshApp().use {
composeRule.onNodeWithTag("level-submodule")
.performScrollTo()
.performClick()
composeRule.waitUntil(timeoutMillis = 1_500) {
composeRule.onAllNodes(hasText(submoduleLevel().title, substring = true))
.fetchSemanticsNodes()
.isNotEmpty()
}
}
}
private fun launchFreshApp(): ActivityScenario<MainActivity> {
val context = InstrumentationRegistry.getInstrumentation().targetContext
File(context.filesDir, "githug-sandboxes").deleteRecursively()