From 2d7a8a5c5f7e6732cd45cd3284ebf7f925ffcb7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Mon, 27 May 2024 16:25:06 -0400 Subject: [PATCH] tests: fix tests on API<30 Change-Id: I99c393e048cba24304afbe31c7308ab03b015503 --- .../java/cx/ring/client/wizard/AccountCreation.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jami-android/app/src/androidTest/java/cx/ring/client/wizard/AccountCreation.kt b/jami-android/app/src/androidTest/java/cx/ring/client/wizard/AccountCreation.kt index 0f767b3d4..53ee6fa6a 100644 --- a/jami-android/app/src/androidTest/java/cx/ring/client/wizard/AccountCreation.kt +++ b/jami-android/app/src/androidTest/java/cx/ring/client/wizard/AccountCreation.kt @@ -321,8 +321,11 @@ class AccountCreation { } private fun skipBiometrics() { // Skip biometrics popup - val noThanksSrc = InstrumentationRegistry - .getInstrumentation().targetContext.getString(R.string.no_thanks) - onView(allOf(withText(noThanksSrc), isDisplayed())).perform(click()) + // only on P+ + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) { + val noThanksSrc = InstrumentationRegistry + .getInstrumentation().targetContext.getString(R.string.no_thanks) + onView(allOf(withText(noThanksSrc), isDisplayed())).perform(click()) + } } } -- GitLab