Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: increased timeout times #430

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class GoogleMapViewTests {
initMap()
assertEquals(CameraMoveStartedReason.NO_MOVEMENT_YET, cameraPositionState.cameraMoveStartedReason)
zoom(shouldAnimate = true, zoomIn = true) {
composeTestRule.waitUntil(1000) {
composeTestRule.waitUntil(timeout2) {
cameraPositionState.isMoving
}
assertTrue(cameraPositionState.isMoving)
Expand All @@ -92,10 +92,10 @@ class GoogleMapViewTests {
fun testCameraReportsNotMoving() {
initMap()
zoom(shouldAnimate = true, zoomIn = true) {
composeTestRule.waitUntil(1000) {
composeTestRule.waitUntil(timeout2) {
cameraPositionState.isMoving
}
composeTestRule.waitUntil(5000) {
composeTestRule.waitUntil(timeout5) {
!cameraPositionState.isMoving
}
assertFalse(cameraPositionState.isMoving)
Expand All @@ -106,10 +106,10 @@ class GoogleMapViewTests {
fun testCameraZoomInAnimation() {
initMap()
zoom(shouldAnimate = true, zoomIn = true) {
composeTestRule.waitUntil(1000) {
composeTestRule.waitUntil(timeout2) {
cameraPositionState.isMoving
}
composeTestRule.waitUntil(3000) {
composeTestRule.waitUntil(timeout3) {
!cameraPositionState.isMoving
}
assertEquals(
Expand All @@ -124,10 +124,10 @@ class GoogleMapViewTests {
fun testCameraZoomIn() {
initMap()
zoom(shouldAnimate = false, zoomIn = true) {
composeTestRule.waitUntil(1000) {
composeTestRule.waitUntil(timeout2) {
cameraPositionState.isMoving
}
composeTestRule.waitUntil(3000) {
composeTestRule.waitUntil(timeout3) {
!cameraPositionState.isMoving
}
assertEquals(
Expand All @@ -142,10 +142,10 @@ class GoogleMapViewTests {
fun testCameraZoomOut() {
initMap()
zoom(shouldAnimate = false, zoomIn = false) {
composeTestRule.waitUntil(1000) {
composeTestRule.waitUntil(timeout2) {
cameraPositionState.isMoving
}
composeTestRule.waitUntil(3000) {
composeTestRule.waitUntil(timeout3) {
!cameraPositionState.isMoving
}
assertEquals(
Expand All @@ -160,10 +160,10 @@ class GoogleMapViewTests {
fun testCameraZoomOutAnimation() {
initMap()
zoom(shouldAnimate = true, zoomIn = false) {
composeTestRule.waitUntil(1000) {
composeTestRule.waitUntil(timeout2) {
cameraPositionState.isMoving
}
composeTestRule.waitUntil(3000) {
composeTestRule.waitUntil(timeout3) {
!cameraPositionState.isMoving
}
assertEquals(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class StreetViewTests {
onClick = onClick
)
}
composeTestRule.waitUntil(10000) {
composeTestRule.waitUntil(timeout5) {
cameraPositionState.location.position.latitude != 0.0 &&
cameraPositionState.location.position.longitude != 0.0
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ package com.google.maps.android.compose
import com.google.android.gms.maps.model.LatLng
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotEquals
const val timeout2 = 2_000L
const val timeout3 = 3_000L
const val timeout5 = 5_000L

val hasValidApiKey: Boolean =
BuildConfig.MAPS_API_KEY.isNotBlank() && BuildConfig.MAPS_API_KEY != "YOUR_API_KEY"
Expand Down
Loading