diff --git a/app/src/main/java/eu/llembas/android/ui/scheduled/ScheduledScreens.kt b/app/src/main/java/eu/llembas/android/ui/scheduled/ScheduledScreens.kt index b0f3eee..2ec1a00 100644 --- a/app/src/main/java/eu/llembas/android/ui/scheduled/ScheduledScreens.kt +++ b/app/src/main/java/eu/llembas/android/ui/scheduled/ScheduledScreens.kt @@ -72,6 +72,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color +import androidx.compose.ui.platform.LocalInspectionMode import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.text.style.TextAlign @@ -1229,7 +1230,8 @@ private fun TypeChoice(state: EditState, onWhere: ((EditState) -> EditState) -> modifier = Modifier.weight(1f), ) // The schedule is still being read: its type is not known yet, and not to be chosen. - if (!ready && !state.loadFailed) CircularProgressIndicator(strokeWidth = 2.dp, modifier = Modifier.size(16.dp)) + // (Not in a preview or a screenshot: an animation that never ends never lets the picture be taken.) + if (!ready && !state.loadFailed && !LocalInspectionMode.current) CircularProgressIndicator(strokeWidth = 2.dp, modifier = Modifier.size(16.dp)) } ChoiceRow( selected = ready && !state.agentic, diff --git a/app/src/test/java/eu/llembas/android/shots/Fakes.kt b/app/src/test/java/eu/llembas/android/shots/Fakes.kt index 485ee2a..e03ccc6 100644 --- a/app/src/test/java/eu/llembas/android/shots/Fakes.kt +++ b/app/src/test/java/eu/llembas/android/shots/Fakes.kt @@ -779,7 +779,7 @@ object Fakes { ) /** The form with "When…" chosen and the person's own words in it. */ - val editingNotify: EditState get() = editing.copy(reports = true, notify = "when", notifyWhen = "a tender for storage opens or closes") + val editingNotify: EditState get() = editing.copy(reports = true, notify = "when", notifyWhen = "a tender for storage opens or closes", loaded = true) val editing = EditState( words = "Every weekday at 7:30, sum up the news about renewable energy in five points", diff --git a/app/src/test/java/eu/llembas/android/shots/ScreenShots.kt b/app/src/test/java/eu/llembas/android/shots/ScreenShots.kt index 3d7180d..9aa9632 100644 --- a/app/src/test/java/eu/llembas/android/shots/ScreenShots.kt +++ b/app/src/test/java/eu/llembas/android/shots/ScreenShots.kt @@ -281,6 +281,8 @@ class ScreenShots { shoot("43-schedule-edit-agentic", Phone.Scroll) { ScheduleEditContent(Fakes.editingAgentic, editing = false) } shoot("43-schedule-edit-agentic", Phone.SmallScroll, fontScale = 1.5f) { ScheduleEditContent(Fakes.editingAgentic, editing = false) } shoot("43-schedule-edit-no-computer", Phone.Scroll) { ScheduleEditContent(Fakes.editingNoComputer, editing = false) } + // A schedule being edited that has not been read yet: the type cannot be chosen. + shoot("43-schedule-edit-not-read", Phone.Scroll) { ScheduleEditContent(Fakes.editing, editing = true) } // A run that says where it ran and that its model was the folder's usual one. shoot("43-schedule-agentic-run", Phone.Scroll) { ScheduleContent(Fakes.scheduleAgenticRun) } shoot("43-schedule-agentic-run", Phone.SmallScroll, fontScale = 1.5f) { ScheduleContent(Fakes.scheduleAgenticRun) }