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 <noreply@anthropic.com>
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user