Fixed: The testBookmarks failing on Android 13 and above.

This commit is contained in:
MohitMaliFtechiz 2025-05-16 15:43:45 +05:30
parent 0c91e329d4
commit 21583e76c0
3 changed files with 10 additions and 5 deletions

View File

@ -19,6 +19,7 @@ package org.kiwix.kiwixmobile.language
import android.Manifest
import android.app.Instrumentation
import android.os.Build
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.core.content.edit
import androidx.lifecycle.Lifecycle
@ -207,6 +208,8 @@ class LanguageFragmentTest {
)
clickOnSaveLanguageIcon(composeTestRule)
}
LeakAssertions.assertNoLeaks()
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
LeakAssertions.assertNoLeaks()
}
}
}

View File

@ -134,9 +134,9 @@ class LibkiwixBookmarkTest : BaseActivityTest() {
pressBack()
// Test saving bookmark
clickOnSaveBookmarkImage()
topLevel {
clickBookmarksOnNavDrawer { assertBookmarkSaved(composeTestRule) }
}
openBookmarkScreen()
assertBookmarkSaved(composeTestRule)
pressBack()
// Test removing bookmark
clickOnSaveBookmarkImage()
longClickOnSaveBookmarkImage()

View File

@ -161,7 +161,9 @@ class NavigationHistoryTest : BaseActivityTest() {
pressBack()
pressBack()
}
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1) {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1 &&
Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU
) {
// temporary disabled on Android 25
LeakAssertions.assertNoLeaks()
}