mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Fixed: The testBookmarks
failing on Android 13 and above.
This commit is contained in:
parent
0c91e329d4
commit
21583e76c0
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user