Skip to content

Commit 89dc35c

Browse files
committed
Fix nested test to match 5th page exactly
1 parent c5e790c commit 89dc35c

File tree

2 files changed

+4
-4
lines changed
  • app/src

2 files changed

+4
-4
lines changed

app/src/androidInstrumentedTest/kotlin/io/github/xxfast/decompose/router/app/TestNestedRouters.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class TestNestedRouters {
4141
// Go to pages and swipe to the 5th page
4242
onNode(bottomNavPagesItem).performClick()
4343
onNode(pager).performScrollToIndex(5)
44-
onNode(hasText("5")).assertExists()
44+
onNode(hasText("Page #5")).assertExists()
4545

4646
// Go to slots, open the bottom sheet and verify if it is visible
4747
onNode(bottomNavSlotItem).performClick()
@@ -58,7 +58,7 @@ class TestNestedRouters {
5858
onNode(bottomNavStackItem).performClick()
5959
onNode(details).assertExists().assertTextContains("Item@", substring = true)
6060
onNode(bottomNavPagesItem).performClick()
61-
onNode(hasText("5")).assertExists()
61+
onNode(hasText("Page #5")).assertExists()
6262
onNode(bottomNavSlotItem).performClick()
6363
onNode(buttonBottomSheet).performClick()
6464
activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT

app/src/commonMain/kotlin/io/github/xxfast/decompose/router/screens/pages/PagesScreen.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ fun PagesScreen() {
5858
Card(modifier = Modifier.padding(16.dp)) {
5959
Box(modifier = Modifier.fillMaxSize()) {
6060
Text(
61-
text = page.index.toString(),
62-
style = MaterialTheme.typography.displayLarge,
61+
text = "Page #${page.index}",
62+
style = MaterialTheme.typography.displayMedium,
6363
modifier = Modifier.align(Alignment.Center)
6464
)
6565
}

0 commit comments

Comments
 (0)