Add photo preview loading state
This commit is contained in:
@@ -61,6 +61,18 @@ class DriverUiRulesTest {
|
||||
assertEquals(3, inlinePhotoGridRows(5))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun keepsPhotoPreviewFeedbackVisibleUntilImageLoadsOrFails() {
|
||||
assertTrue(shouldShowPhotoPreviewLoadingState(hasPhoto = true, isLoading = true, isError = false))
|
||||
assertFalse(shouldShowPhotoPreviewLoadingState(hasPhoto = true, isLoading = false, isError = false))
|
||||
assertFalse(shouldShowPhotoPreviewLoadingState(hasPhoto = true, isLoading = true, isError = true))
|
||||
assertFalse(shouldShowPhotoPreviewLoadingState(hasPhoto = false, isLoading = true, isError = false))
|
||||
|
||||
assertTrue(shouldShowPhotoPreviewErrorState(hasPhoto = true, isError = true))
|
||||
assertFalse(shouldShowPhotoPreviewErrorState(hasPhoto = true, isError = false))
|
||||
assertFalse(shouldShowPhotoPreviewErrorState(hasPhoto = false, isError = true))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun usesShorterChromeOnCompactScreens() {
|
||||
assertEquals(118, authBrandBannerHeightDp(600))
|
||||
|
||||
Reference in New Issue
Block a user