Skip to content

Commit

Permalink
clean up debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
boringcactus committed Dec 23, 2024
1 parent 625c320 commit ea79368
Showing 1 changed file with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.semantics.SemanticsActions
import androidx.compose.ui.test.ComposeTimeoutException
import androidx.compose.ui.test.ExperimentalTestApi
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.hasText
import androidx.compose.ui.test.isRoot
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithContentDescription
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performSemanticsAction
import androidx.compose.ui.test.printToLog
import androidx.test.rule.GrantPermissionRule
import com.mapbox.geojson.FeatureCollection
import com.mapbox.maps.MapboxExperimental
Expand Down Expand Up @@ -300,6 +297,9 @@ class NearbyTransitPageTest : KoinTest {
}

composeTestRule.waitUntilDoesNotExist(hasText("Loading..."))
composeTestRule
.onNodeWithContentDescription("Drag handle")
.performSemanticsAction(SemanticsActions.Expand)

composeTestRule.onNodeWithText("Nearby Transit").assertIsDisplayed()
composeTestRule.onNodeWithText("Search by stop").assertIsDisplayed()
Expand All @@ -309,16 +309,6 @@ class NearbyTransitPageTest : KoinTest {
composeTestRule.onNodeWithText("Green Line Head Sign").assertExists()
composeTestRule.onNodeWithText("5 min").assertExists()

composeTestRule
.onNodeWithContentDescription("Drag handle")
.performSemanticsAction(SemanticsActions.Expand)
try {
composeTestRule.waitUntilExactlyOneExists(hasText("Sample Route"))
} catch (ex: ComposeTimeoutException) {
// by some mechanism there are two roots
composeTestRule.onAllNodes(isRoot()).printToLog("ci-keep", maxDepth = Int.MAX_VALUE)
throw ex
}
composeTestRule.onNodeWithText("Sample Route").assertExists()
composeTestRule.onNodeWithText("Sample Stop").assertExists()
composeTestRule.onNodeWithText("Sample Headsign").assertExists()
Expand Down

0 comments on commit ea79368

Please sign in to comment.