Restrict shell route and Back handling to the current entry
This commit is contained in:
parent
afff383b75
commit
22850632ec
3 changed files with 18 additions and 5 deletions
|
|
@ -105,9 +105,17 @@ class FirstSignInNavigationTest {
|
|||
assertEquals(6, session.state!!.view.library!!.source.size)
|
||||
assertFalse(session.state!!.person.hasAnime)
|
||||
rule.onNodeWithText("Shows").performClick()
|
||||
rule.waitUntil(10_000) {
|
||||
Shadows.shadowOf(Looper.getMainLooper()).idle()
|
||||
session.state!!.view.library?.source?.size == 29
|
||||
try {
|
||||
rule.waitUntil(10_000) {
|
||||
Shadows.shadowOf(Looper.getMainLooper()).idle()
|
||||
session.state!!.view.library?.source?.size == 29
|
||||
}
|
||||
} catch (timeout: ComposeTimeoutException) {
|
||||
val shell = session.state!!
|
||||
throw AssertionError("Active=${navigation.backStack.last()}, shell=${shell.route}, " +
|
||||
"movies=${shell.rememberedView("movies").library?.source?.size}, " +
|
||||
"shows=${shell.rememberedView("shows").library?.source?.size}/" +
|
||||
"${shell.rememberedView("shows").library?.status}", timeout)
|
||||
}
|
||||
rule.onNodeWithTag("library-grid").assertIsDisplayed()
|
||||
rule.onAllNodesWithText("Mindel Shows title 0")[0].assertIsDisplayed()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue