mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 10:46:53 -04:00
Fixed: Test cases were failing on the Android 16 emulator due to the stylus_handwriting_enabled setting being enabled by default, which displays a hint dialog when a text field takes focus.
This commit is contained in:
parent
0bdfaf4541
commit
993c13f85e
@ -119,8 +119,11 @@ class ObjectBoxToRoomMigratorTest {
|
|||||||
val expectedSearchTerm = "test search"
|
val expectedSearchTerm = "test search"
|
||||||
val expectedZimId = "8812214350305159407L"
|
val expectedZimId = "8812214350305159407L"
|
||||||
val expectedUrl = "http://kiwix.app/mainPage"
|
val expectedUrl = "http://kiwix.app/mainPage"
|
||||||
val recentSearchEntity =
|
val recentSearchEntity = RecentSearchEntity(
|
||||||
RecentSearchEntity(searchTerm = expectedSearchTerm, zimId = expectedZimId, url = expectedUrl)
|
searchTerm = expectedSearchTerm,
|
||||||
|
zimId = expectedZimId,
|
||||||
|
url = expectedUrl
|
||||||
|
)
|
||||||
// insert into object box
|
// insert into object box
|
||||||
box.put(recentSearchEntity)
|
box.put(recentSearchEntity)
|
||||||
// migrate data into room database
|
// migrate data into room database
|
||||||
|
@ -22,6 +22,7 @@ import androidx.core.content.edit
|
|||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import androidx.test.core.app.ActivityScenario
|
import androidx.test.core.app.ActivityScenario
|
||||||
|
import androidx.test.espresso.Espresso
|
||||||
import androidx.test.espresso.accessibility.AccessibilityChecks
|
import androidx.test.espresso.accessibility.AccessibilityChecks
|
||||||
import androidx.test.platform.app.InstrumentationRegistry
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
import androidx.test.uiautomator.UiDevice
|
import androidx.test.uiautomator.UiDevice
|
||||||
@ -100,7 +101,7 @@ class OnlineLibraryFragmentTest : BaseActivityTest() {
|
|||||||
waitForDataToLoad()
|
waitForDataToLoad()
|
||||||
clickOnSearchIcon()
|
clickOnSearchIcon()
|
||||||
searchWikipediaZIMFiles()
|
searchWikipediaZIMFiles()
|
||||||
pressBack()
|
Espresso.closeSoftKeyboard()
|
||||||
clickLibraryOnBottomNav()
|
clickLibraryOnBottomNav()
|
||||||
clickDownloadOnBottomNav()
|
clickDownloadOnBottomNav()
|
||||||
assertPreviousSearchRemainsActive()
|
assertPreviousSearchRemainsActive()
|
||||||
@ -119,7 +120,7 @@ class OnlineLibraryFragmentTest : BaseActivityTest() {
|
|||||||
clickOnSearchIcon()
|
clickOnSearchIcon()
|
||||||
searchWikipediaZIMFiles()
|
searchWikipediaZIMFiles()
|
||||||
clickOnClearSearchIcon()
|
clickOnClearSearchIcon()
|
||||||
pressBack()
|
Espresso.closeSoftKeyboard()
|
||||||
clickLibraryOnBottomNav()
|
clickLibraryOnBottomNav()
|
||||||
clickDownloadOnBottomNav()
|
clickDownloadOnBottomNav()
|
||||||
assertSearchViewIsNotActive(kiwixMainActivity)
|
assertSearchViewIsNotActive(kiwixMainActivity)
|
||||||
|
@ -24,7 +24,7 @@ object Config {
|
|||||||
// levels: https://apilevels.com/
|
// levels: https://apilevels.com/
|
||||||
const val compileSdk = 36 // SDK version used by Gradle to compile our app.
|
const val compileSdk = 36 // SDK version used by Gradle to compile our app.
|
||||||
const val minSdk = 25 // Minimum SDK (Minimum Support Device) is 25 (Android 7.1 Nougat).
|
const val minSdk = 25 // Minimum SDK (Minimum Support Device) is 25 (Android 7.1 Nougat).
|
||||||
const val targetSdk = 36 // Target SDK (Maximum Support Device) is Baklava (Android 16).
|
const val targetSdk = 36 // Target SDK (Maximum Support Device) is 36 (Android 16).
|
||||||
|
|
||||||
val javaVersion = JavaVersion.VERSION_17
|
val javaVersion = JavaVersion.VERSION_17
|
||||||
|
|
||||||
|
@ -21,6 +21,10 @@
|
|||||||
# Enable Wi-Fi on the emulator
|
# Enable Wi-Fi on the emulator
|
||||||
adb shell svc wifi enable
|
adb shell svc wifi enable
|
||||||
adb logcat -c
|
adb logcat -c
|
||||||
|
# Check if the stylus_handwriting_enabled setting exists before disabling
|
||||||
|
if adb shell settings list secure | grep -q "stylus_handwriting_enabled"; then
|
||||||
|
adb shell settings put secure stylus_handwriting_enabled 0
|
||||||
|
fi
|
||||||
# shellcheck disable=SC2035
|
# shellcheck disable=SC2035
|
||||||
adb logcat *:E -v color &
|
adb logcat *:E -v color &
|
||||||
|
|
||||||
@ -61,6 +65,10 @@ while [ $retry -le 3 ]; do
|
|||||||
# Enable Wi-Fi on the emulator
|
# Enable Wi-Fi on the emulator
|
||||||
adb shell svc wifi enable
|
adb shell svc wifi enable
|
||||||
adb logcat -c
|
adb logcat -c
|
||||||
|
# Check if the stylus_handwriting_enabled setting exists before disabling
|
||||||
|
if adb shell settings list secure | grep -q "stylus_handwriting_enabled"; then
|
||||||
|
adb shell settings put secure stylus_handwriting_enabled 0
|
||||||
|
fi
|
||||||
# shellcheck disable=SC2035
|
# shellcheck disable=SC2035
|
||||||
adb logcat *:E -v color &
|
adb logcat *:E -v color &
|
||||||
|
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
# Enable Wi-Fi on the emulator
|
# Enable Wi-Fi on the emulator
|
||||||
adb shell svc wifi enable
|
adb shell svc wifi enable
|
||||||
adb logcat -c
|
adb logcat -c
|
||||||
|
# Check if the stylus_handwriting_enabled setting exists before disabling
|
||||||
|
if adb shell settings list secure | grep -q "stylus_handwriting_enabled"; then
|
||||||
|
adb shell settings put secure stylus_handwriting_enabled 0
|
||||||
|
fi
|
||||||
# shellcheck disable=SC2035
|
# shellcheck disable=SC2035
|
||||||
adb logcat *:E -v color &
|
adb logcat *:E -v color &
|
||||||
|
|
||||||
@ -42,6 +46,10 @@ while [ $retry -le 3 ]; do
|
|||||||
# Enable Wi-Fi on the emulator
|
# Enable Wi-Fi on the emulator
|
||||||
adb shell svc wifi enable
|
adb shell svc wifi enable
|
||||||
adb logcat -c
|
adb logcat -c
|
||||||
|
# Check if the stylus_handwriting_enabled setting exists before disabling
|
||||||
|
if adb shell settings list secure | grep -q "stylus_handwriting_enabled"; then
|
||||||
|
adb shell settings put secure stylus_handwriting_enabled 0
|
||||||
|
fi
|
||||||
# shellcheck disable=SC2035
|
# shellcheck disable=SC2035
|
||||||
adb logcat *:E -v color &
|
adb logcat *:E -v color &
|
||||||
|
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
# Enable Wi-Fi on the emulator
|
# Enable Wi-Fi on the emulator
|
||||||
adb shell svc wifi enable
|
adb shell svc wifi enable
|
||||||
adb logcat -c
|
adb logcat -c
|
||||||
|
# Check if the stylus_handwriting_enabled setting exists before disabling
|
||||||
|
if adb shell settings list secure | grep -q "stylus_handwriting_enabled"; then
|
||||||
|
adb shell settings put secure stylus_handwriting_enabled 0
|
||||||
|
fi
|
||||||
# shellcheck disable=SC2035
|
# shellcheck disable=SC2035
|
||||||
adb logcat *:E -v color &
|
adb logcat *:E -v color &
|
||||||
|
|
||||||
@ -42,6 +46,10 @@ while [ $retry -le 3 ]; do
|
|||||||
# Enable Wi-Fi on the emulator
|
# Enable Wi-Fi on the emulator
|
||||||
adb shell svc wifi enable
|
adb shell svc wifi enable
|
||||||
adb logcat -c
|
adb logcat -c
|
||||||
|
# Check if the stylus_handwriting_enabled setting exists before disabling
|
||||||
|
if adb shell settings list secure | grep -q "stylus_handwriting_enabled"; then
|
||||||
|
adb shell settings put secure stylus_handwriting_enabled 0
|
||||||
|
fi
|
||||||
# shellcheck disable=SC2035
|
# shellcheck disable=SC2035
|
||||||
adb logcat *:E -v color &
|
adb logcat *:E -v color &
|
||||||
|
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
# Enable Wi-Fi on the emulator
|
# Enable Wi-Fi on the emulator
|
||||||
adb shell svc wifi enable
|
adb shell svc wifi enable
|
||||||
adb logcat -c
|
adb logcat -c
|
||||||
|
# Check if the stylus_handwriting_enabled setting exists before disabling
|
||||||
|
if adb shell settings list secure | grep -q "stylus_handwriting_enabled"; then
|
||||||
|
adb shell settings put secure stylus_handwriting_enabled 0
|
||||||
|
fi
|
||||||
# shellcheck disable=SC2035
|
# shellcheck disable=SC2035
|
||||||
adb logcat *:E -v color &
|
adb logcat *:E -v color &
|
||||||
|
|
||||||
@ -43,6 +47,10 @@ while [ $retry -le 3 ]; do
|
|||||||
# Enable Wi-Fi on the emulator
|
# Enable Wi-Fi on the emulator
|
||||||
adb shell svc wifi enable
|
adb shell svc wifi enable
|
||||||
adb logcat -c
|
adb logcat -c
|
||||||
|
# Check if the stylus_handwriting_enabled setting exists before disabling
|
||||||
|
if adb shell settings list secure | grep -q "stylus_handwriting_enabled"; then
|
||||||
|
adb shell settings put secure stylus_handwriting_enabled 0
|
||||||
|
fi
|
||||||
# shellcheck disable=SC2035
|
# shellcheck disable=SC2035
|
||||||
adb logcat *:E -v color &
|
adb logcat *:E -v color &
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user