From 876539b514977dd52e0d7cb057211ab745de8438 Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Wed, 1 Jul 2026 08:41:05 -0500 Subject: [PATCH] test(onboarding): widen onboarding E2E waitForText timeout to 15s OnboardingFlowTest passed on the API-37 job but timed out (ComposeTimeoutException after 5000ms) across the animation-disabled API 29-36 matrix, at the single async-gated transition: click -> viewModelScope coroutine -> addImapAccount -> DONE -> LaunchedEffect -> navigate -> AddAnother render. The flow is correct (green on API 37; ManualSetupScreenTest proves the add-callback path); the 5s cap was just too tight for that compound step on slower matrix emulators. waitUntil returns as soon as the text appears, so the happy path is unaffected. Co-Authored-By: Claude Opus 4.8 --- .../org/libremail/ui/onboarding/OnboardingFlowTest.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/androidTest/kotlin/org/libremail/ui/onboarding/OnboardingFlowTest.kt b/app/src/androidTest/kotlin/org/libremail/ui/onboarding/OnboardingFlowTest.kt index 30299ad..56dc92b 100644 --- a/app/src/androidTest/kotlin/org/libremail/ui/onboarding/OnboardingFlowTest.kt +++ b/app/src/androidTest/kotlin/org/libremail/ui/onboarding/OnboardingFlowTest.kt @@ -52,7 +52,11 @@ class OnboardingFlowTest { private fun string(resId: Int) = composeTestRule.activity.getString(resId) - private fun waitForText(text: String) = composeTestRule.waitUntil(5_000) { + // 15s (not the 5s used elsewhere): the add-another step is reached only after an async chain + // (button → viewModelScope coroutine → addImapAccount → DONE → LaunchedEffect → navigate), which + // on the slower, animation-disabled E2E matrix emulators can exceed a 5s budget for that one + // transition. waitUntil returns as soon as the text appears, so this only raises the cap. + private fun waitForText(text: String) = composeTestRule.waitUntil(15_000) { composeTestRule.onAllNodesWithText(text).fetchSemanticsNodes().isNotEmpty() }