Skip to content

Commit

Permalink
fix: fix test for swiping on map in column (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
kikoso authored Aug 17, 2023
1 parent ec4bef2 commit 1bd915c
Showing 1 changed file with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -130,18 +130,17 @@ class MapInColumnTests {
startingPosition.assertEquals(cameraPositionState.position.target)
}

// @Test
// fun testPanMapUp_MapCameraChangesColumnDoesNotScroll() {
// initMap()
// // Swipe the map up
// // FIXME - for some reason this scrolls the entire column instead of just the map
// composeTestRule.onNodeWithTag("Map").performTouchInput { swipeUp() }
// composeTestRule.waitForIdle()
//
// // Make sure that the map changed (i.e., we can scroll the map in the column)
// startingPosition.assertNotEquals(cameraPositionState.position.target)
//
// // Check to make sure column didn't scroll
// composeTestRule.onNodeWithTag("Item 1").assertIsDisplayed()
// }
@Test
fun testPanMapUp_MapCameraChangesColumnDoesNotScroll() {
initMap()
//Swipe the map up
composeTestRule.onNodeWithTag("Map").performTouchInput { swipeUp() }
composeTestRule.waitForIdle()

//Make sure that the map changed (i.e., we can scroll the map in the column)
assertNotEquals(startingPosition, cameraPositionState.position.target)

//Check to make sure column didn't scroll
composeTestRule.onNodeWithTag("Item 1").assertIsDisplayed()
}
}

0 comments on commit 1bd915c

Please sign in to comment.