Skip to content

A fully functional Android app built entirely with Kotlin and Jetpack Compose

Remove episodes and saved destinations

Don Turner57f478b7c16b
diff --git a/app/src/androidTest/java/com/google/samples/apps/nowinandroid/ui/NavigationTest.kt b/app/src/androidTest/java/com/google/samples/apps/nowinandroid/ui/NavigationTest.kt
index 8d6d4b524..6e3dab8b7 100644
--- a/app/src/androidTest/java/com/google/samples/apps/nowinandroid/ui/NavigationTest.kt
+++ b/app/src/androidTest/java/com/google/samples/apps/nowinandroid/ui/NavigationTest.kt
@@ -142,10 +142,7 @@ class NavigationTest {
composeTestRule.apply {
// GIVEN the user is on any of the top level destinations, THEN the Up arrow is not shown.
onNodeWithContentDescription(navigateUp).assertDoesNotExist()
- onNodeWithText(episodes).performClick()
- onNodeWithContentDescription(navigateUp).assertDoesNotExist()
- onNodeWithText(saved).performClick()
- onNodeWithContentDescription(navigateUp).assertDoesNotExist()
+ // TODO: Add top level destinations here, see b/226357686.
onNodeWithText(topics).performClick()
onNodeWithContentDescription(navigateUp).assertDoesNotExist()
}
@@ -157,8 +154,8 @@ class NavigationTest {
@Test(expected = NoActivityResumedException::class)
fun homeDestination_back_quitsApp() {
composeTestRule.apply {
- // GIVEN the user navigates to the Episodes destination
- onNodeWithText(episodes).performClick()
+ // GIVEN the user navigates to the Topics destination
+ onNodeWithText(topics).performClick()
// and then navigates to the For you destination
onNodeWithText(forYou).performClick()
// WHEN the user uses the system button/gesture to go back
@@ -174,10 +171,9 @@ class NavigationTest {
@Test
fun navigationBar_backFromAnyDestination_returnsToForYou() {
composeTestRule.apply {
- // GIVEN the user navigated to the Episodes destination
- onNodeWithText(episodes).performClick()
- // and then navigated to the Topics destination
+ // GIVEN the user navigated to the Topics destination
onNodeWithText(topics).performClick()
+ // TODO: Add another destination here to increase test coverage, see b/226357686.
// WHEN the user uses the system button/gesture to go back,
Espresso.pressBack()
// THEN the app shows the For You destination
diff --git a/app/src/main/java/com/google/samples/apps/nowinandroid/ui/NiaApp.kt b/app/src/main/java/com/google/samples/apps/nowinandroid/ui/NiaApp.kt
index 0a24b2f50..5073d8cad 100644
--- a/app/src/main/java/com/google/samples/apps/nowinandroid/ui/NiaApp.kt
+++ b/app/src/main/java/com/google/samples/apps/nowinandroid/ui/NiaApp.kt
@@ -195,7 +195,6 @@ private sealed class Destination(
private val TOP_LEVEL_DESTINATIONS = listOf(
Destination.ForYou,
- Destination.Episodes,
- Destination.Saved,
+ // TODO: Add destinations here, see b/226359180.
Destination.Following
)