Fixed: testPauseAndResumeInOtherLanguage was failing due to our recent change — we now wait for the frame to settle in production code, but Compose is unaware of this wait and immediately checks for the new view. This caused the failure where localLibrary was not found, as Compose was still waiting for synchronized execution.

This commit is contained in:
MohitMaliFtechiz 2025-08-15 14:31:48 +05:30 committed by Kelson
parent 456e348078
commit 9ef9f1b0fe

View File

@ -205,9 +205,13 @@ class DownloadTest : BaseActivityTest() {
clickLanguagePreference(composeTestRule)
assertLanguagePrefDialogDisplayed(composeTestRule)
selectDeviceDefaultLanguage(composeTestRule)
// Advance the main clock to settle the frame of compose.
composeTestRule.mainClock.advanceTimeByFrame()
clickLanguagePreference(composeTestRule)
assertLanguagePrefDialogDisplayed(composeTestRule)
selectAlbanianLanguage(composeTestRule)
// Advance the main clock to settle the frame of compose.
composeTestRule.mainClock.advanceTimeByFrame()
}
}
clickDownloadOnBottomNav(composeTestRule)
@ -226,6 +230,8 @@ class DownloadTest : BaseActivityTest() {
clickLanguagePreference(composeTestRule)
assertLanguagePrefDialogDisplayed(composeTestRule)
selectDeviceDefaultLanguage(composeTestRule)
// Advance the main clock to settle the frame of compose.
composeTestRule.mainClock.advanceTimeByFrame()
// check if the device default language is selected or not.
clickLanguagePreference(composeTestRule)
// close the language dialog.