Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class BuildNavGraphForLaunchTest {
): LaunchNavGraph? = buildNavGraphForLaunch(
state = state,
router = FakeRouter(action),
isNewUi = false,
deepLink = { deepLink },
)

Expand Down Expand Up @@ -122,9 +123,11 @@ class BuildNavGraphForLaunchTest {
}

@Test
fun `unknown auth state without deeplink navigates to OnboardingFlow`() {
val result = build(AuthState.Unknown)!!
assertIs<AppRoute.OnboardingFlow>(result.baseRoutes.single())
fun `unknown auth state waits on Loading`() {
// Unknown is a transient pre-resolution state, grouped with Authenticating: it returns
// null so the Loading screen stays put until auth resolves. A genuine no-account
// resolves to LoggedOut (which routes to OnboardingFlow), covered separately.
assertNull(build(AuthState.Unknown))
}

// -- Onboarding --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import com.flipcash.app.analytics.StubFlipcashAnalytics
import com.flipcash.app.core.AppRoute
import com.flipcash.app.core.MainCoroutineRule
import com.flipcash.app.core.dispatchers.TestDispatchers
import com.flipcash.app.activityfeed.ActivityFeedCoordinator
import com.flipcash.app.funding.PurchaseMethodController
import com.flipcash.app.userflags.UserFlagsCoordinator
import com.flipcash.shared.chat.ChatCoordinator
import com.flipcash.services.internal.model.thirdparty.OnRampProvider
import com.flipcash.services.user.UserManager
import io.mockk.coEvery
Expand Down Expand Up @@ -38,6 +40,8 @@ class BalanceViewModelTest {
private val userManager: UserManager = mockk(relaxed = true)
private val userFlags: UserFlagsCoordinator = mockk(relaxed = true)
private val purchaseMethodController: PurchaseMethodController = mockk(relaxed = true)
private val chatCoordinator: ChatCoordinator = mockk(relaxed = true)
private val feedCoordinator: ActivityFeedCoordinator = mockk(relaxed = true)

private lateinit var dispatchers: TestDispatchers

Expand All @@ -47,6 +51,8 @@ class BalanceViewModelTest {
dispatchers = dispatchers,
purchaseMethodController = purchaseMethodController,
analytics = StubFlipcashAnalytics(),
chatCoordinator = chatCoordinator,
feedCoordinator = feedCoordinator,
)

@Test
Expand Down
Loading