Preserve check state after refreshing installed identity

This commit is contained in:
justinzeus 2026-11-07 16:55:14 +01:00
parent 19df50c0f1
commit ee3f3ae11e
9 changed files with 31 additions and 9 deletions

View file

@ -15,6 +15,7 @@ import androidx.compose.ui.test.onRoot
import androidx.compose.ui.test.performKeyInput
import androidx.compose.ui.test.pressKey
import androidx.compose.ui.input.key.Key
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.semantics.SemanticsProperties
import com.github.takahirom.roborazzi.captureRoboImage
import java.io.File
@ -141,6 +142,15 @@ class UpdatesCaptureTest {
assertEquals(1, (shell.contentFocus as UpdateFocus).actionIndex)
}
@Test fun refreshingInstalledIdentityCannotMaskAnOngoingCheck() {
launch(UpdateUiState.UpToDate)
rule.runOnIdle { controller.showInstalled(InstalledVersion("1.1.1", 100001)) }
rule.mainClock.advanceTimeBy(320)
rule.runOnIdle { controller.show(UpdateUiState.Checking) }
rule.mainClock.advanceTimeBy(320)
rule.onNodeWithTag("update-progress").assertIsDisplayed()
}
@Test fun nativeProgressAndStateTransitionAtSixteenMillisecondFrames() {
launch(UpdateUiState.Checking)
val target = directory