Fix TestUnfoldProgressListener when there are no progress

.last() was failing when there was still no progress.

Test: RemoteUnfoldTransitionReceiverTest
Bug: 276407993
Change-Id: I82afe7a94e29975b96c749885fcbf87a0eeaa89c
This commit is contained in:
Nicolo' Mazzucato
2023-04-03 09:04:07 +00:00
parent af23c02000
commit ca6d0d258e

View File

@@ -126,7 +126,7 @@ class TestUnfoldProgressListener : UnfoldTransitionProgressProvider.TransitionPr
}
fun assertLastProgress(progress: Float) {
waitForCondition { progress == progressHistory.last() }
waitForCondition { progress == progressHistory.lastOrNull() }
}
}