From af3d2731922f6feb93a60a1f4f1f6d3c72a493a6 Mon Sep 17 00:00:00 2001 From: francelu Date: Thu, 21 Nov 2024 21:45:56 +0100 Subject: [PATCH] test: update `TopAppBar` tests for map and timer UIs --- app/src/test/java/com/android/periodpals/ui/map/MapScreenTest.kt | 1 + .../test/java/com/android/periodpals/ui/timer/TimerScreenTest.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/test/java/com/android/periodpals/ui/map/MapScreenTest.kt b/app/src/test/java/com/android/periodpals/ui/map/MapScreenTest.kt index 0d6911313..e500f896a 100644 --- a/app/src/test/java/com/android/periodpals/ui/map/MapScreenTest.kt +++ b/app/src/test/java/com/android/periodpals/ui/map/MapScreenTest.kt @@ -48,6 +48,7 @@ class MapScreenTest { composeTestRule.onNodeWithTag(TopAppBar.TOP_BAR).assertIsDisplayed() composeTestRule.onNodeWithTag(TopAppBar.TITLE_TEXT).assertIsDisplayed().assertTextEquals("Map") composeTestRule.onNodeWithTag(TopAppBar.GO_BACK_BUTTON).assertIsNotDisplayed() + composeTestRule.onNodeWithTag(TopAppBar.SETTINGS_BUTTON).assertIsNotDisplayed() composeTestRule.onNodeWithTag(TopAppBar.EDIT_BUTTON).assertIsNotDisplayed() composeTestRule.onNodeWithTag(MapScreen.MAP_VIEW_CONTAINER).assertIsDisplayed() diff --git a/app/src/test/java/com/android/periodpals/ui/timer/TimerScreenTest.kt b/app/src/test/java/com/android/periodpals/ui/timer/TimerScreenTest.kt index a8ceb2a90..9427bcd51 100644 --- a/app/src/test/java/com/android/periodpals/ui/timer/TimerScreenTest.kt +++ b/app/src/test/java/com/android/periodpals/ui/timer/TimerScreenTest.kt @@ -40,6 +40,7 @@ class TimerScreenTest { .assertIsDisplayed() .assertTextEquals("Tampon Timer") composeTestRule.onNodeWithTag(TopAppBar.GO_BACK_BUTTON).assertIsNotDisplayed() + composeTestRule.onNodeWithTag(TopAppBar.SETTINGS_BUTTON).assertIsNotDisplayed() composeTestRule.onNodeWithTag(TopAppBar.EDIT_BUTTON).assertIsNotDisplayed() composeTestRule.onNodeWithTag(TimerScreen.TIMER_TEXT).performScrollTo().assertIsDisplayed()