Make manual level selection responsive
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user