fix(ui): keep the ring veil count per test (#1739)

* ci: run unit tests in four forks

* fix(ui): keep the ring veil count per test so tests do not share snapshot state

* ci: keep two unit test forks, four were slower
This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-10-28 18:19:15 -04:00
1 parent 92787dd0f0
commit 1e92d10fa5
2 files changed
+7 -1

No files matched your search

@@ -94,7 +94,12 @@ internal class FocusGlide(view: View?) {
internal val LocalFocusGlide = staticCompositionLocalOf<FocusGlide?> { null }
internal object RingVeil {
var count by mutableIntStateOf(0)
private var state = mutableIntStateOf(0)
var count: Int
get() = state.intValue
set(value) { state.intValue = value }
internal fun reset() { state = mutableIntStateOf(0) }
}
@Composable
@@ -8,6 +8,7 @@ import org.robolectric.RuntimeEnvironment
import org.robolectric.Shadows.shadowOf
fun createRobolectricComposeRule() = createComposeRule().also {
RingVeil.reset()
val context = RuntimeEnvironment.getApplication()
shadowOf(context.packageManager).addActivityIfNotPresent(
ComponentName(context, ComponentActivity::class.java),