M8f: instant navigation, no transitions (D-108)
NavHost enter, exit, pop and size transitions are None, so pushed screens, tab switches, editors and the session gate change at once instead of the default 700 ms cross-fade. NavTransitionsTest asserts the values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package se.hagstedt.kvitt.nav
|
||||
|
||||
import androidx.compose.animation.EnterTransition
|
||||
import androidx.compose.animation.ExitTransition
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Assert.assertSame
|
||||
import org.junit.Test
|
||||
|
||||
/** D-108: the app's `NavHost` changes destination without any animation. */
|
||||
class NavTransitionsTest {
|
||||
@Test
|
||||
fun enterIsNone() {
|
||||
assertSame(EnterTransition.None, NavTransitions.enterTransition())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun exitIsNone() {
|
||||
assertSame(ExitTransition.None, NavTransitions.exitTransition())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun noSizeTransform() {
|
||||
assertNull(NavTransitions.sizeTransform())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user