commit dd3898de414c04f17346fcf27f7a67a26d9efe3f parent 525bf6472e5944679d8783ccdd59ac176af43214 Author: MTRNord <MTRNord@users.noreply.github.com> Date: Sat, 2 Aug 2025 18:48:25 +0200 Fix test Diffstat:
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/app/build.gradle.kts b/app/build.gradle.kts @@ -73,6 +73,7 @@ dependencies { implementation(libs.androidx.work.runtime.ktx) implementation(libs.androidx.hilt.common) implementation(libs.androidx.hilt.work) + implementation(libs.androidx.uiautomator) ksp(libs.google.hilt.compiler) ksp(libs.hilt.android.compiler) implementation(libs.hilt.navigation.compose) diff --git a/app/src/androidTest/AndroidManifest.xml b/app/src/androidTest/AndroidManifest.xml @@ -2,9 +2,11 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Grant permissions automatically for tests --> - <uses-permission android:name="android.permission.READ_CALENDAR" + <uses-permission + android:name="android.permission.READ_CALENDAR" android:protectionLevel="dangerous" /> - <uses-permission android:name="android.permission.WRITE_CALENDAR" + <uses-permission + android:name="android.permission.WRITE_CALENDAR" android:protectionLevel="dangerous" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> diff --git a/app/src/androidTest/java/space/midnightthoughts/nordiccalendar/AccessibilityTest.kt b/app/src/androidTest/java/space/midnightthoughts/nordiccalendar/AccessibilityTest.kt @@ -62,6 +62,7 @@ class AccessibilityTest { Thread.sleep(1000) } catch (e: Exception) { // If navigation fails, just test the current screen + e.printStackTrace() } // Perform accessibility checks diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml @@ -23,6 +23,7 @@ testRulesVersion = "1.7.0" workRuntimeKtxVersion = "2.10.3" hiltCommonVersion = "1.2.0" hiltWorkVersion = "1.2.0" +uiautomatorVersion = "2.3.0" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } @@ -60,6 +61,7 @@ androidx-work-runtime-ktx = { group = "androidx.work", name = "work-runtime-ktx" androidx-hilt-common = { group = "androidx.hilt", name = "hilt-common", version.ref = "hiltCommonVersion" } androidx-hilt-work = { group = "androidx.hilt", name = "hilt-work", version.ref = "hiltWorkVersion" } google-hilt-compiler = { group = "com.google.dagger", name = "hilt-compiler", version.ref = "hilt" } +androidx-uiautomator = { group = "androidx.test.uiautomator", name = "uiautomator", version.ref = "uiautomatorVersion" } [plugins] android-application = { id = "com.android.application", version.ref = "agp" }