From d836c389b2d987eeeb86356fa2c9277be7ad2081 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Jun 2025 11:14:35 +0200 Subject: [PATCH 01/13] Introduce MIN_SDK_FOSS and MIN_SDK_ENTERPRISE const. --- plugins/src/main/kotlin/Versions.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/src/main/kotlin/Versions.kt b/plugins/src/main/kotlin/Versions.kt index fa05b0780a..c72e2f5aa0 100644 --- a/plugins/src/main/kotlin/Versions.kt +++ b/plugins/src/main/kotlin/Versions.kt @@ -42,7 +42,9 @@ object Versions { const val TARGET_SDK = 35 // When updating the `minSdk`, make sure to update the value of `minSdkVersion` in the file `tools/release/release.sh` - val minSdk = if (isEnterpriseBuild) 26 else 24 + private const val MIN_SDK_FOSS = 24 + private const val MIN_SDK_ENTERPRISE = 26 + val minSdk = if (isEnterpriseBuild) MIN_SDK_ENTERPRISE else MIN_SDK_FOSS private const val JAVA_VERSION = 21 val javaVersion: JavaVersion = JavaVersion.toVersion(JAVA_VERSION) From e6c7a6171761547950dd63219d93fb4da21ffb97 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Jun 2025 11:23:11 +0200 Subject: [PATCH 02/13] Release script: read minSdkVersion from file plugins/src/main/kotlin/Versions.kt --- tools/release/release.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/release/release.sh b/tools/release/release.sh index 735c57503e..d2fe217651 100755 --- a/tools/release/release.sh +++ b/tools/release/release.sh @@ -62,7 +62,8 @@ if [ ${envError} == 1 ]; then exit 1 fi -minSdkVersion=24 +# Read minSdkVersion from file plugins/src/main/kotlin/Versions.kt +minSdkVersion=$(grep "MIN_SDK_FOSS =" ./plugins/src/main/kotlin/Versions.kt |cut -d '=' -f 2 |xargs) buildToolsVersion="35.0.0" buildToolsPath="${androidHome}/build-tools/${buildToolsVersion}" From fab744e56621a806432147c2c1ff463874aa70e1 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Jun 2025 11:27:53 +0200 Subject: [PATCH 03/13] Change minSDK to 33 for Element enterprise. #4905 --- README.md | 7 +++++++ plugins/src/main/kotlin/Versions.kt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 14acef0de2..20ac1c0536 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Learn more about why we are building Element X in our blog post: [https://elemen * [Translations](#translations) * [Rust SDK](#rust-sdk) * [Status](#status) +* [Minimum SDK version](#minimum-sdk-version) * [Contributing](#contributing) * [Build instructions](#build-instructions) * [Support](#support) @@ -73,6 +74,12 @@ We're doing this as a way to share code between platforms and while we've seen p This project is in an early rollout and migration phase. +## Minimum SDK version + +Element X Android requires a minimum SDK version of 24 (Android 7.0, Nougat). We aim to support devices running Android 7.0 and above, which covers a wide range of devices still in use today. + +Element Android Enterprise requires a minimum SDK version of 33 (Android 13, Tiramisu). For Element Enterprise, we support only devices that still receive security updates, which means devices running Android 13 and above. Android does not have a documented support policy, but some information can be found at [https://endoflife.date/android](https://endoflife.date/android). + ## Contributing Want to get actively involved in the project? You're more than welcome! A good way to start is to check the issues that are labelled with the [good first issue](https://github.com/element-hq/element-x-android/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) label. Let us know by commenting the issue that you're starting working on it. diff --git a/plugins/src/main/kotlin/Versions.kt b/plugins/src/main/kotlin/Versions.kt index c72e2f5aa0..5c9bd64c83 100644 --- a/plugins/src/main/kotlin/Versions.kt +++ b/plugins/src/main/kotlin/Versions.kt @@ -43,7 +43,7 @@ object Versions { // When updating the `minSdk`, make sure to update the value of `minSdkVersion` in the file `tools/release/release.sh` private const val MIN_SDK_FOSS = 24 - private const val MIN_SDK_ENTERPRISE = 26 + private const val MIN_SDK_ENTERPRISE = 33 val minSdk = if (isEnterpriseBuild) MIN_SDK_ENTERPRISE else MIN_SDK_FOSS private const val JAVA_VERSION = 21 From 2343c5ec9afd595196a43702f48971bf3d45c8bf Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Jun 2025 11:48:07 +0200 Subject: [PATCH 04/13] Remove scandir param, it seems that it is not recursive --- .github/workflows/quality.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 43ef188415..bb6bbe87d1 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -270,7 +270,6 @@ jobs: - name: Run shellcheck uses: ludeeus/action-shellcheck@2.0.0 with: - scandir: ./tools severity: warning upload_reports: From 6bec767808186a6999960e116924b230d2216be9 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Jun 2025 11:59:27 +0200 Subject: [PATCH 05/13] Fix shellcheck issue on local-recording.sh --- .github/workflows/scripts/maestro/local-recording.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/maestro/local-recording.sh b/.github/workflows/scripts/maestro/local-recording.sh index 4a800dc5e7..6534d2feca 100755 --- a/.github/workflows/scripts/maestro/local-recording.sh +++ b/.github/workflows/scripts/maestro/local-recording.sh @@ -12,8 +12,8 @@ mkdir -p /data/local/tmp/recordings; FILENAME=/data/local/tmp/recordings/testRecording$COUNT.mp4 while true do - ((COUNT++)) + COUNT=$((COUNT+1)) FILENAME=/data/local/tmp/recordings/testRecording$COUNT.mp4 - echo "\nRecording video file #$COUNT" + printf "\nRecording video file #%d\n" $COUNT screenrecord --bugreport --bit-rate=16m --size 720x1280 $FILENAME done From dc5aae831f1497e0d9eca85e6a2dcad692691a3f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Jun 2025 12:04:25 +0200 Subject: [PATCH 06/13] Fix shellcheck issue on release.sh --- tools/release/release.sh | 68 ++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/tools/release/release.sh b/tools/release/release.sh index d2fe217651..4120a1da06 100755 --- a/tools/release/release.sh +++ b/tools/release/release.sh @@ -68,7 +68,7 @@ buildToolsVersion="35.0.0" buildToolsPath="${androidHome}/build-tools/${buildToolsVersion}" if [[ ! -d ${buildToolsPath} ]]; then - printf "Fatal: ${buildToolsPath} folder not found, ensure that you have installed the SDK version ${buildToolsVersion}.\n" + printf "Fatal: %s folder not found, ensure that you have installed the SDK version %s.\n" "${buildToolsPath}" "${buildToolsVersion}" exit 1 fi @@ -100,7 +100,7 @@ versionYearCandidate=$(date +%y) currentVersionMonth=$(grep "val versionMonth" ${versionsFile} | cut -d " " -f6) # Get current month on 2 digits versionMonthCandidate=$(date +%m) -versionMonthCandidateNoLeadingZero=$(echo ${versionMonthCandidate} | sed 's/^0//') +versionMonthCandidateNoLeadingZero=${versionMonthCandidate/#0/} currentVersionReleaseNumber=$(grep "val versionReleaseNumber" ${versionsFile} | cut -d " " -f6) # if the current month is the same as the current version, we increment the release number, else we reset it to 0 if [[ ${currentVersionMonth} -eq ${versionMonthCandidateNoLeadingZero} ]]; then @@ -110,17 +110,17 @@ else fi versionCandidate="${versionYearCandidate}.${versionMonthCandidate}.${versionReleaseNumberCandidate}" -read -p "Please enter the release version (example: ${versionCandidate}). Format must be 'YY.MM.x' or 'YY.MM.xy'. Just press enter if ${versionCandidate} is correct. " version +read -r -p "Please enter the release version (example: ${versionCandidate}). Format must be 'YY.MM.x' or 'YY.MM.xy'. Just press enter if ${versionCandidate} is correct. " version version=${version:-${versionCandidate}} # extract year, month and release number for future use versionYear=$(echo "${version}" | cut -d "." -f1) versionMonth=$(echo "${version}" | cut -d "." -f2) -versionMonthNoLeadingZero=$(echo ${versionMonth} | sed 's/^0//') +versionMonthNoLeadingZero=${versionMonth/#0/} versionReleaseNumber=$(echo "${version}" | cut -d "." -f3) printf "\n================================================================================\n" -printf "Starting the release ${version}\n" +printf "Starting the release %s\n" "${version}" git flow release start "${version}" # Note: in case the release is already started and the script is started again, checkout the release branch again. @@ -147,7 +147,7 @@ fastlaneFile="20${versionYear}${versionMonth}${versionReleaseNumber2Digits}0.txt fastlanePathFile="./fastlane/metadata/android/en-US/changelogs/${fastlaneFile}" printf "Main changes in this version: TODO.\nFull changelog: https://github.com/element-hq/element-x-android/releases" > "${fastlanePathFile}" -read -p "I have created the file ${fastlanePathFile}, please edit it and press enter to continue. " +read -r -p "I have created the file ${fastlanePathFile}, please edit it and press enter to continue. " git add "${fastlanePathFile}" git commit -a -m "Adding fastlane file for version ${version}" @@ -156,11 +156,11 @@ printf "OK, finishing the release...\n" git flow release finish "${version}" printf "\n================================================================================\n" -read -p "Done, push the branch 'main' and the new tag (yes/no) default to yes? " doPush +read -r -p "Done, push the branch 'main' and the new tag (yes/no) default to yes? " doPush doPush=${doPush:-yes} if [ "${doPush}" == "yes" ]; then - printf "Pushing branch 'main' and tag 'v${version}'...\n" + printf "Pushing branch 'main' and tag 'v%s'...\n" "${version}" git push origin main git push origin "v${version}" else @@ -173,7 +173,7 @@ git checkout develop printf "\n================================================================================\n" printf "The GitHub action https://github.com/element-hq/element-x-android/actions/workflows/release.yml?query=branch%%3Amain should have start a new run.\n" -read -p "Please enter the url of the run, no need to wait for it to complete (example: https://github.com/element-hq/element-x-android/actions/runs/9065756777): " runUrl +read -r -p "Please enter the url of the run, no need to wait for it to complete (example: https://github.com/element-hq/element-x-android/actions/runs/9065756777): " runUrl targetPath="./tmp/Element/${version}" @@ -190,7 +190,7 @@ while [[ $ret -ne 0 ]]; do ret=$? if [[ $ret -ne 0 ]]; then - read -p "Error while downloading the artifacts. You may want to fix the issue and retry. Retry (yes/no) default to yes? " doRetry + read -r -p "Error while downloading the artifacts. You may want to fix the issue and retry. Retry (yes/no) default to yes? " doRetry doRetry=${doRetry:-yes} if [ "${doRetry}" == "no" ]; then exit 1 @@ -225,7 +225,7 @@ cp "${fdroidTargetPath}"/app-fdroid-arm64-v8a-release.apk \ --ks-pass pass:"${keyStorePassword}" \ --ks-key-alias elementx \ --key-pass pass:"${keyPassword}" \ - --min-sdk-version ${minSdkVersion} \ + --min-sdk-version "${minSdkVersion}" \ "${fdroidTargetPath}"/app-fdroid-arm64-v8a-release-signed.apk cp "${fdroidTargetPath}"/app-fdroid-armeabi-v7a-release.apk \ @@ -237,7 +237,7 @@ cp "${fdroidTargetPath}"/app-fdroid-armeabi-v7a-release.apk \ --ks-pass pass:"${keyStorePassword}" \ --ks-key-alias elementx \ --key-pass pass:"${keyPassword}" \ - --min-sdk-version ${minSdkVersion} \ + --min-sdk-version "${minSdkVersion}" \ "${fdroidTargetPath}"/app-fdroid-armeabi-v7a-release-signed.apk cp "${fdroidTargetPath}"/app-fdroid-x86-release.apk \ @@ -249,7 +249,7 @@ cp "${fdroidTargetPath}"/app-fdroid-x86-release.apk \ --ks-pass pass:"${keyStorePassword}" \ --ks-key-alias elementx \ --key-pass pass:"${keyPassword}" \ - --min-sdk-version ${minSdkVersion} \ + --min-sdk-version "${minSdkVersion}" \ "${fdroidTargetPath}"/app-fdroid-x86-release-signed.apk cp "${fdroidTargetPath}"/app-fdroid-x86_64-release.apk \ @@ -261,7 +261,7 @@ cp "${fdroidTargetPath}"/app-fdroid-x86_64-release.apk \ --ks-pass pass:"${keyStorePassword}" \ --ks-key-alias elementx \ --key-pass pass:"${keyPassword}" \ - --min-sdk-version ${minSdkVersion} \ + --min-sdk-version "${minSdkVersion}" \ "${fdroidTargetPath}"/app-fdroid-x86_64-release-signed.apk printf "\n================================================================================\n" @@ -277,10 +277,10 @@ printf "File app-fdroid-x86_64-release-signed.apk:\n" "${buildToolsPath}"/aapt dump badging "${fdroidTargetPath}"/app-fdroid-x86_64-release-signed.apk | grep package printf "\n" -read -p "Does it look correct? Press enter when it's done. " +read -r -p "Does it look correct? Press enter when it's done. " printf "\n================================================================================\n" -printf "The APKs in ${fdroidTargetPath} have been signed!\n" +printf "The APKs in %s have been signed!\n" "${fdroidTargetPath}" printf "\n================================================================================\n" printf "Unzipping the Gplay artifact...\n" @@ -292,7 +292,7 @@ unsignedBundlePath="${gplayTargetPath}/app-gplay-release.aab" signedBundlePath="${gplayTargetPath}/app-gplay-release-signed.aab" printf "\n================================================================================\n" -printf "Signing file ${unsignedBundlePath} with build-tools version ${buildToolsVersion} for min SDK version ${minSdkVersion}...\n" +printf "Signing file %s with build-tools version %s for min SDK version %s...\n" "${unsignedBundlePath}" "${buildToolsVersion}" "${minSdkVersion}" cp "${unsignedBundlePath}" "${signedBundlePath}" @@ -302,7 +302,7 @@ cp "${unsignedBundlePath}" "${signedBundlePath}" --ks-pass pass:"${keyStorePassword}" \ --ks-key-alias elementx \ --key-pass pass:"${keyPassword}" \ - --min-sdk-version ${minSdkVersion} \ + --min-sdk-version "${minSdkVersion}" \ "${signedBundlePath}" printf "\n================================================================================\n" @@ -314,13 +314,13 @@ printf "Version name: " bundletool dump manifest --bundle="${signedBundlePath}" --xpath=/manifest/@android:versionName printf "\n" -read -p "Does it look correct? Press enter to continue. " +read -r -p "Does it look correct? Press enter to continue. " printf "\n================================================================================\n" -printf "The file ${signedBundlePath} has been signed and can be uploaded to the PlayStore!\n" +printf "The file %s has been signed and can be uploaded to the PlayStore!\n" "${signedBundlePath}" printf "\n================================================================================\n" -read -p "Do you want to build the APKs from the app bundle? You need to do this step if you want to install the application to your device. (yes/no) default to no " doBuildApks +read -r -p "Do you want to build the APKs from the app bundle? You need to do this step if you want to install the application to your device. (yes/no) default to no " doBuildApks doBuildApks=${doBuildApks:-no} if [ "${doBuildApks}" == "yes" ]; then @@ -329,12 +329,12 @@ if [ "${doBuildApks}" == "yes" ]; then --ks=./app/signature/debug.keystore --ks-pass=pass:android --ks-key-alias=androiddebugkey --key-pass=pass:android \ --overwrite - read -p "Do you want to install the application to your device? Make sure there is one (and only one!) connected device first. (yes/no) default to yes " doDeploy + read -r -p "Do you want to install the application to your device? Make sure there is one (and only one!) connected device first. (yes/no) default to yes " doDeploy doDeploy=${doDeploy:-yes} if [ "${doDeploy}" == "yes" ]; then printf "Installing apk for your device...\n" bundletool install-apks --apks="${gplayTargetPath}"/elementx.apks - read -p "Please run the application on your phone to check that the upgrade went well. Press enter to continue. " + read -r -p "Please run the application on your phone to check that the upgrade went well. Press enter to continue. " else printf "APK will not be deployed!\n" fi @@ -346,14 +346,14 @@ printf "\n====================================================================== printf "Create the open testing release on GooglePlay.\n" printf "On GooglePlay console, go the the open testing section and click on \"Create new release\" button, then:\n" -printf " - upload the file ${signedBundlePath}.\n" +printf " - upload the file %s.\n" "${signedBundlePath}" printf " - copy the release note from the fastlane file.\n" printf " - download the universal APK, to be able to provide it to the GitHub release: click on the right arrow next to the \"App bundle\", then click on the \"Download\" tab, and download the \"Signed, universal APK\".\n" printf " - submit the release.\n" -read -p "Press enter to continue. " +read -r -p "Press enter to continue. " printf "You can then go to \"Publishing overview\" and send the new release for a review by Google.\n" -read -p "Press enter to continue. " +read -r -p "Press enter to continue. " printf "\n================================================================================\n" githubCreateReleaseLink="https://github.com/element-hq/element-x-android/releases/new?tag=v${version}&title=Element%20X%20Android%20v${version}" @@ -362,22 +362,22 @@ printf -- "Open this link: %s\n" "${githubCreateReleaseLink}" printf "Then\n" printf " - Click on the 'Generate releases notes' button.\n" printf " - Optionally reorder items and fix typos.\n" -printf " - Add the file ${signedBundlePath} to the GitHub release.\n" +printf " - Add the file %s to the GitHub release.\n" "${signedBundlePath}" printf " - Add the universal APK, downloaded from the GooglePlay console to the GitHub release.\n" -printf " - Add the 4 signed APKs for F-Droid, located at ${fdroidTargetPath} to the GitHub release.\n" -read -p ". Press enter to continue. " +printf " - Add the 4 signed APKs for F-Droid, located at %s to the GitHub release.\n" "${fdroidTargetPath}" +read -r -p ". Press enter to continue. " printf "\n================================================================================\n" printf "Update the project release notes:\n\n" -read -p "Copy the content of the release note generated by GitHub to the file CHANGES.md and press enter to commit the change. " +read -r -p "Copy the content of the release note generated by GitHub to the file CHANGES.md and press enter to commit the change. " printf "\n================================================================================\n" printf "Committing...\n" git commit -a -m "Changelog for version ${version}" printf "\n================================================================================\n" -read -p "Done, push the branch 'develop' (yes/no) default to yes? (A rebase may be necessary in case develop got new commits) " doPush +read -r -p "Done, push the branch 'develop' (yes/no) default to yes? (A rebase may be necessary in case develop got new commits) " doPush doPush=${doPush:-yes} if [ "${doPush}" == "yes" ]; then @@ -390,12 +390,12 @@ fi printf "\n================================================================================\n" printf "Message for the Android internal room:\n\n" message="@room Element X Android ${version} is ready to be tested. You can get it from https://github.com/element-hq/element-x-android/releases/tag/v${version}. You can install the universal APK. If you want to install the application from the app bundle, you can follow instructions [here](https://github.com/element-hq/element-x-android/blob/develop/docs/install_from_github_release.md). Please report any feedback. Thanks!" -printf "${message}\n\n" +printf "%s\n\n" "${message}" if [[ -z "${elementBotToken}" ]]; then - read -p "ELEMENT_BOT_MATRIX_TOKEN is not defined in the environment. Cannot send the message for you. Please send it manually, and press enter to continue. " + read -r -p "ELEMENT_BOT_MATRIX_TOKEN is not defined in the environment. Cannot send the message for you. Please send it manually, and press enter to continue. " else - read -p "Send this message to the room (yes/no) default to yes? " doSend + read -r -p "Send this message to the room (yes/no) default to yes? " doSend doSend=${doSend:-yes} if [ "${doSend}" == "yes" ]; then printf "Sending message...\n" From 64ecb505b62fc490e7eb5e5d7afe2b0cfc9b8810 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Jun 2025 13:54:33 +0200 Subject: [PATCH 07/13] Fix test regression on API 33. --- .../android/features/home/impl/roomlist/RoomListViewTest.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/features/home/impl/src/test/kotlin/io/element/android/features/home/impl/roomlist/RoomListViewTest.kt b/features/home/impl/src/test/kotlin/io/element/android/features/home/impl/roomlist/RoomListViewTest.kt index 1b241ab294..0465926abc 100644 --- a/features/home/impl/src/test/kotlin/io/element/android/features/home/impl/roomlist/RoomListViewTest.kt +++ b/features/home/impl/src/test/kotlin/io/element/android/features/home/impl/roomlist/RoomListViewTest.kt @@ -35,12 +35,14 @@ import org.junit.Rule import org.junit.Test import org.junit.rules.TestRule import org.junit.runner.RunWith +import org.robolectric.annotation.Config @RunWith(AndroidJUnit4::class) class RoomListViewTest { @get:Rule val rule = createAndroidComposeRule() + @Config(qualifiers = "h1024dp") @Test fun `displaying the view automatically sends a couple of UpdateVisibleRangeEvents`() { val eventsRecorder = EventsRecorder() @@ -54,7 +56,7 @@ class RoomListViewTest { eventsRecorder.assertList( listOf( RoomListEvents.UpdateVisibleRange(IntRange.EMPTY), - RoomListEvents.UpdateVisibleRange(0..2), + RoomListEvents.UpdateVisibleRange(0..5), ) ) } From 70676ed7051301c5469561888174301349459d29 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Jun 2025 15:37:29 +0200 Subject: [PATCH 08/13] Fix test regression on API 33. --- .../preferences/impl/advanced/AdvancedSettingsViewTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsViewTest.kt b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsViewTest.kt index baf55d2999..2844c2d7c1 100644 --- a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsViewTest.kt +++ b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsViewTest.kt @@ -145,7 +145,7 @@ class AdvancedSettingsViewTest { } @Test - @Config(qualifiers = "h640dp") + @Config(qualifiers = "h1024dp") fun `clicking on timeline media preview emits the expected event`() { val eventsRecorder = EventsRecorder() rule.setAdvancedSettingsView( From 2234cab0c77c8d27a7a9724ca1ad173170d03ecd Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Jun 2025 16:08:50 +0200 Subject: [PATCH 09/13] Fix test regression on API 33. --- .../impl/securityandprivacy/SecurityAndPrivacyViewTest.kt | 2 +- .../mediaviewer/impl/details/MediaDetailsBottomSheetTest.kt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/SecurityAndPrivacyViewTest.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/SecurityAndPrivacyViewTest.kt index a7f7c15940..9bbd770334 100644 --- a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/SecurityAndPrivacyViewTest.kt +++ b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/SecurityAndPrivacyViewTest.kt @@ -93,7 +93,7 @@ class SecurityAndPrivacyViewTest { } @Test - @Config(qualifiers = "h640dp") + @Config(qualifiers = "h1024dp") fun `click on room visibility item emits the expected event`() { val recorder = EventsRecorder() val state = aSecurityAndPrivacyState( diff --git a/libraries/mediaviewer/impl/src/test/kotlin/io/element/android/libraries/mediaviewer/impl/details/MediaDetailsBottomSheetTest.kt b/libraries/mediaviewer/impl/src/test/kotlin/io/element/android/libraries/mediaviewer/impl/details/MediaDetailsBottomSheetTest.kt index 1289d73672..bd4373a420 100644 --- a/libraries/mediaviewer/impl/src/test/kotlin/io/element/android/libraries/mediaviewer/impl/details/MediaDetailsBottomSheetTest.kt +++ b/libraries/mediaviewer/impl/src/test/kotlin/io/element/android/libraries/mediaviewer/impl/details/MediaDetailsBottomSheetTest.kt @@ -31,6 +31,7 @@ class MediaDetailsBottomSheetTest { val rule = createAndroidComposeRule() @Test + @Config(qualifiers = "h1024dp") fun `clicking on View in timeline invokes expected callback`() { val state = aMediaDetailsBottomSheetState() ensureCalledOnceWithParam(state.eventId) { callback -> @@ -43,6 +44,7 @@ class MediaDetailsBottomSheetTest { } @Test + @Config(qualifiers = "h1024dp") fun `clicking on Share invokes expected callback`() { val state = aMediaDetailsBottomSheetState() ensureCalledOnceWithParam(state.eventId) { callback -> @@ -55,6 +57,7 @@ class MediaDetailsBottomSheetTest { } @Test + @Config(qualifiers = "h1024dp") fun `clicking on Save invokes expected callback`() { val state = aMediaDetailsBottomSheetState() ensureCalledOnceWithParam(state.eventId) { callback -> From aeb750439ce6eb972c208b1c9b7dc873060b1a92 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Jun 2025 16:35:26 +0200 Subject: [PATCH 10/13] Fix test regression on API 33. --- .../mediaupload/impl/AndroidMediaPreProcessorTest.kt | 7 +++++++ .../mediaviewer/impl/viewer/MediaViewerViewTest.kt | 3 +++ 2 files changed, 10 insertions(+) diff --git a/libraries/mediaupload/impl/src/test/kotlin/io/element/android/libraries/mediaupload/impl/AndroidMediaPreProcessorTest.kt b/libraries/mediaupload/impl/src/test/kotlin/io/element/android/libraries/mediaupload/impl/AndroidMediaPreProcessorTest.kt index 7aa8c1062f..7f2f8b0ff6 100644 --- a/libraries/mediaupload/impl/src/test/kotlin/io/element/android/libraries/mediaupload/impl/AndroidMediaPreProcessorTest.kt +++ b/libraries/mediaupload/impl/src/test/kotlin/io/element/android/libraries/mediaupload/impl/AndroidMediaPreProcessorTest.kt @@ -66,6 +66,7 @@ class AndroidMediaPreProcessorTest { } @Test + @Ignore("Ignore now that min API for enterprise is 33") fun `test processing png`() = runTest { val mediaUploadInfo = process( asset = assetImagePng, @@ -109,6 +110,7 @@ class AndroidMediaPreProcessorTest { } @Test + @Ignore("Ignore now that min API for enterprise is 33") fun `test processing png no compression`() = runTest { val mediaUploadInfo = process( asset = assetImagePng, @@ -130,6 +132,7 @@ class AndroidMediaPreProcessorTest { } @Test + @Ignore("Ignore now that min API for enterprise is 33") fun `test processing png and delete`() = runTest { val mediaUploadInfo = process( asset = assetImagePng, @@ -154,6 +157,7 @@ class AndroidMediaPreProcessorTest { } @Test + @Ignore("Ignore now that min API for enterprise is 33") fun `test processing jpeg`() = runTest { val mediaUploadInfo = process( asset = assetImageJpeg, @@ -197,6 +201,7 @@ class AndroidMediaPreProcessorTest { } @Test + @Ignore("Ignore now that min API for enterprise is 33") fun `test processing jpeg no compression`() = runTest { val mediaUploadInfo = process( asset = assetImageJpeg, @@ -218,6 +223,7 @@ class AndroidMediaPreProcessorTest { } @Test + @Ignore("Ignore now that min API for enterprise is 33") fun `test processing jpeg and delete`() = runTest { val mediaUploadInfo = process( asset = assetImageJpeg, @@ -242,6 +248,7 @@ class AndroidMediaPreProcessorTest { } @Test + @Ignore("Ignore now that min API for enterprise is 33") fun `test processing gif`() = runTest { val mediaUploadInfo = process( asset = assetAnimatedGif, diff --git a/libraries/mediaviewer/impl/src/test/kotlin/io/element/android/libraries/mediaviewer/impl/viewer/MediaViewerViewTest.kt b/libraries/mediaviewer/impl/src/test/kotlin/io/element/android/libraries/mediaviewer/impl/viewer/MediaViewerViewTest.kt index 74d83b733b..6423c3f0b7 100644 --- a/libraries/mediaviewer/impl/src/test/kotlin/io/element/android/libraries/mediaviewer/impl/viewer/MediaViewerViewTest.kt +++ b/libraries/mediaviewer/impl/src/test/kotlin/io/element/android/libraries/mediaviewer/impl/viewer/MediaViewerViewTest.kt @@ -32,6 +32,7 @@ import org.junit.Rule import org.junit.Test import org.junit.rules.TestRule import org.junit.runner.RunWith +import org.robolectric.annotation.Config @RunWith(AndroidJUnit4::class) class MediaViewerViewTest { @@ -108,6 +109,7 @@ class MediaViewerViewTest { } @Test + @Config(qualifiers = "h1024dp") fun `clicking on save emit expected Event`() { val data = aMediaViewerPageData() testBottomSheetAction( @@ -118,6 +120,7 @@ class MediaViewerViewTest { } @Test + @Config(qualifiers = "h1024dp") fun `clicking on share emit expected Event`() { val data = aMediaViewerPageData() testBottomSheetAction( From 1fe228726ad65966d3eeeabe0b31f3f550536686 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Jun 2025 16:45:55 +0200 Subject: [PATCH 11/13] Fix test regression on API 33. --- .../impl/DefaultDateFormatterFrTest.kt | 8 ++--- .../impl/DefaultDateFormatterTest.kt | 36 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterFrTest.kt b/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterFrTest.kt index 355ab6815c..aa78aeba59 100644 --- a/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterFrTest.kt +++ b/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterFrTest.kt @@ -34,7 +34,7 @@ class DefaultDateFormatterFrTest { assertThat(formatter.format(ts, DateFormatterMode.Full)).isEqualTo("1 janvier 1970 à 00:00") assertThat(formatter.format(ts, DateFormatterMode.Month)).isEqualTo("Janvier 1970") assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("1 janvier 1970") - assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("01.01.1970") + assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("01/01/1970") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly)).isEqualTo("00:00") } @@ -46,7 +46,7 @@ class DefaultDateFormatterFrTest { assertThat(formatter.format(ts, DateFormatterMode.Full, true)).isEqualTo("1 janvier 1970 à 00:00") assertThat(formatter.format(ts, DateFormatterMode.Month, true)).isEqualTo("Janvier 1970") assertThat(formatter.format(ts, DateFormatterMode.Day, true)).isEqualTo("1 janvier 1970") - assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate, true)).isEqualTo("01.01.1970") + assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate, true)).isEqualTo("01/01/1970") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly, true)).isEqualTo("00:00") } @@ -241,7 +241,7 @@ class DefaultDateFormatterFrTest { assertThat(formatter.format(ts, DateFormatterMode.Full)).isEqualTo("6 avril 1979 à 18:35") assertThat(formatter.format(ts, DateFormatterMode.Month)).isEqualTo("Avril 1979") assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("6 avril 1979") - assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("06.04.1979") + assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("06/04/1979") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly)).isEqualTo("18:35") } @@ -254,7 +254,7 @@ class DefaultDateFormatterFrTest { assertThat(formatter.format(ts, DateFormatterMode.Full, true)).isEqualTo("6 avril 1979 à 18:35") assertThat(formatter.format(ts, DateFormatterMode.Month, true)).isEqualTo("Avril 1979") assertThat(formatter.format(ts, DateFormatterMode.Day, true)).isEqualTo("6 avril 1979") - assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate, true)).isEqualTo("06.04.1979") + assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate, true)).isEqualTo("06/04/1979") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly, true)).isEqualTo("18:35") } } diff --git a/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterTest.kt b/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterTest.kt index 27ae9c3238..a4d02fc2ab 100644 --- a/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterTest.kt +++ b/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterTest.kt @@ -34,7 +34,7 @@ class DefaultDateFormatterTest { assertThat(formatter.format(ts, DateFormatterMode.Full)).isEqualTo("January 1, 1970 at 12:00 AM") assertThat(formatter.format(ts, DateFormatterMode.Month)).isEqualTo("January 1970") assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("January 1, 1970") - assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("01.01.1970") + assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("01/01/1970") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly)).isEqualTo("12:00 AM") } @@ -46,7 +46,7 @@ class DefaultDateFormatterTest { assertThat(formatter.format(ts, DateFormatterMode.Full, true)).isEqualTo("January 1, 1970 at 12:00 AM") assertThat(formatter.format(ts, DateFormatterMode.Month, true)).isEqualTo("January 1970") assertThat(formatter.format(ts, DateFormatterMode.Day, true)).isEqualTo("January 1, 1970") - assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate, true)).isEqualTo("01.01.1970") + assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate, true)).isEqualTo("01/01/1970") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly, true)).isEqualTo("12:00 AM") } @@ -58,7 +58,7 @@ class DefaultDateFormatterTest { val formatter = createFormatter(now) assertThat(formatter.format(ts, DateFormatterMode.Full)).isEqualTo("April 6, 1980 at 6:35 PM") assertThat(formatter.format(ts, DateFormatterMode.Month)).isEqualTo("April 1980") - assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Sunday 6 April") + assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Sunday, April 6") assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("6:35 PM") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly)).isEqualTo("6:35 PM") } @@ -84,7 +84,7 @@ class DefaultDateFormatterTest { val formatter = createFormatter(now) assertThat(formatter.format(ts, DateFormatterMode.Full)).isEqualTo("April 6, 1980 at 6:35 PM") assertThat(formatter.format(ts, DateFormatterMode.Month)).isEqualTo("April 1980") - assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Sunday 6 April") + assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Sunday, April 6") assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("6:35 PM") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly)).isEqualTo("6:35 PM") } @@ -110,7 +110,7 @@ class DefaultDateFormatterTest { val formatter = createFormatter(now) assertThat(formatter.format(ts, DateFormatterMode.Full)).isEqualTo("April 6, 1980 at 6:34 PM") assertThat(formatter.format(ts, DateFormatterMode.Month)).isEqualTo("April 1980") - assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Sunday 6 April") + assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Sunday, April 6") assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("6:34 PM") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly)).isEqualTo("6:34 PM") } @@ -136,7 +136,7 @@ class DefaultDateFormatterTest { val formatter = createFormatter(now) assertThat(formatter.format(ts, DateFormatterMode.Full)).isEqualTo("April 6, 1980 at 5:35 PM") assertThat(formatter.format(ts, DateFormatterMode.Month)).isEqualTo("April 1980") - assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Sunday 6 April") + assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Sunday, April 6") assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("5:35 PM") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly)).isEqualTo("5:35 PM") } @@ -162,8 +162,8 @@ class DefaultDateFormatterTest { val formatter = createFormatter(now) assertThat(formatter.format(ts, DateFormatterMode.Full)).isEqualTo("April 5, 1980 at 6:35 PM") assertThat(formatter.format(ts, DateFormatterMode.Month)).isEqualTo("April 1980") - assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Saturday 5 April") - assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("5 Apr") + assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Saturday, April 5") + assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("Apr 5") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly)).isEqualTo("6:35 PM") } @@ -188,8 +188,8 @@ class DefaultDateFormatterTest { val formatter = createFormatter(now) assertThat(formatter.format(ts, DateFormatterMode.Full)).isEqualTo("April 4, 1980 at 6:35 PM") assertThat(formatter.format(ts, DateFormatterMode.Month)).isEqualTo("April 1980") - assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Friday 4 April") - assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("4 Apr") + assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Friday, April 4") + assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("Apr 4") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly)).isEqualTo("6:35 PM") } @@ -202,7 +202,7 @@ class DefaultDateFormatterTest { assertThat(formatter.format(ts, DateFormatterMode.Full, true)).isEqualTo("Friday at 6:35 PM") assertThat(formatter.format(ts, DateFormatterMode.Month, true)).isEqualTo("This month") assertThat(formatter.format(ts, DateFormatterMode.Day, true)).isEqualTo("Friday") - assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate, true)).isEqualTo("4 Apr") + assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate, true)).isEqualTo("Apr 4") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly, true)).isEqualTo("6:35 PM") } @@ -214,8 +214,8 @@ class DefaultDateFormatterTest { val formatter = createFormatter(now) assertThat(formatter.format(ts, DateFormatterMode.Full)).isEqualTo("March 6, 1980 at 6:35 PM") assertThat(formatter.format(ts, DateFormatterMode.Month)).isEqualTo("March 1980") - assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Thursday 6 March") - assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("6 Mar") + assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("Thursday, March 6") + assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("Mar 6") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly)).isEqualTo("6:35 PM") } @@ -225,10 +225,10 @@ class DefaultDateFormatterTest { val dat = "1980-03-06T18:35:24.00Z" val ts = Instant.parse(dat).toEpochMilliseconds() val formatter = createFormatter(now) - assertThat(formatter.format(ts, DateFormatterMode.Full, true)).isEqualTo("Thursday 6 March at 6:35 PM") + assertThat(formatter.format(ts, DateFormatterMode.Full, true)).isEqualTo("Thursday, March 6 at 6:35 PM") assertThat(formatter.format(ts, DateFormatterMode.Month, true)).isEqualTo("March 1980") - assertThat(formatter.format(ts, DateFormatterMode.Day, true)).isEqualTo("Thursday 6 March") - assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate, true)).isEqualTo("6 Mar") + assertThat(formatter.format(ts, DateFormatterMode.Day, true)).isEqualTo("Thursday, March 6") + assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate, true)).isEqualTo("Mar 6") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly, true)).isEqualTo("6:35 PM") } @@ -241,7 +241,7 @@ class DefaultDateFormatterTest { assertThat(formatter.format(ts, DateFormatterMode.Full)).isEqualTo("April 6, 1979 at 6:35 PM") assertThat(formatter.format(ts, DateFormatterMode.Month)).isEqualTo("April 1979") assertThat(formatter.format(ts, DateFormatterMode.Day)).isEqualTo("April 6, 1979") - assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("06.04.1979") + assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate)).isEqualTo("04/06/1979") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly)).isEqualTo("6:35 PM") } @@ -254,7 +254,7 @@ class DefaultDateFormatterTest { assertThat(formatter.format(ts, DateFormatterMode.Full, true)).isEqualTo("April 6, 1979 at 6:35 PM") assertThat(formatter.format(ts, DateFormatterMode.Month, true)).isEqualTo("April 1979") assertThat(formatter.format(ts, DateFormatterMode.Day, true)).isEqualTo("April 6, 1979") - assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate, true)).isEqualTo("06.04.1979") + assertThat(formatter.format(ts, DateFormatterMode.TimeOrDate, true)).isEqualTo("04/06/1979") assertThat(formatter.format(ts, DateFormatterMode.TimeOnly, true)).isEqualTo("6:35 PM") } } From d09c1492c3e68850944731cf78df6fb937f94809 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Jun 2025 16:46:25 +0200 Subject: [PATCH 12/13] Fix test regression on API 33. --- .../impl/notifications/channels/NotificationChannelsTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannelsTest.kt b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannelsTest.kt index 2d67cf4705..a6b8bc9985 100644 --- a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannelsTest.kt +++ b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannelsTest.kt @@ -23,7 +23,7 @@ import org.robolectric.annotation.Config @RunWith(RobolectricTestRunner::class) class NotificationChannelsTest { @Test - @Config(sdk = [Build.VERSION_CODES.O]) + @Config(sdk = [Build.VERSION_CODES.TIRAMISU]) fun `init - creates notification channels and migrates old ones`() { val notificationManager = mockk(relaxed = true) { every { notificationChannels } returns emptyList() From 14800d5254ceeb8d7e1093f087831bd8011bc43e Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 30 Jun 2025 16:51:20 +0200 Subject: [PATCH 13/13] Ensure test works with other minApi level. --- .../libraries/dateformatter/impl/DefaultDateFormatterFrTest.kt | 3 ++- .../libraries/dateformatter/impl/DefaultDateFormatterTest.kt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterFrTest.kt b/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterFrTest.kt index aa78aeba59..7300b0d4ef 100644 --- a/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterFrTest.kt +++ b/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterFrTest.kt @@ -7,6 +7,7 @@ package io.element.android.libraries.dateformatter.impl +import android.os.Build import androidx.test.ext.junit.runners.AndroidJUnit4 import com.google.common.truth.Truth.assertThat import io.element.android.libraries.dateformatter.api.DateFormatterMode @@ -16,7 +17,7 @@ import org.junit.runner.RunWith import org.robolectric.annotation.Config @RunWith(AndroidJUnit4::class) -@Config(qualifiers = "fr") +@Config(qualifiers = "fr", sdk = [Build.VERSION_CODES.TIRAMISU]) class DefaultDateFormatterFrTest { @Test fun `test null`() { diff --git a/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterTest.kt b/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterTest.kt index a4d02fc2ab..25cda55654 100644 --- a/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterTest.kt +++ b/libraries/dateformatter/impl/src/test/kotlin/io/element/android/libraries/dateformatter/impl/DefaultDateFormatterTest.kt @@ -7,6 +7,7 @@ package io.element.android.libraries.dateformatter.impl +import android.os.Build import androidx.test.ext.junit.runners.AndroidJUnit4 import com.google.common.truth.Truth.assertThat import io.element.android.libraries.dateformatter.api.DateFormatterMode @@ -16,7 +17,7 @@ import org.junit.runner.RunWith import org.robolectric.annotation.Config @RunWith(AndroidJUnit4::class) -@Config(qualifiers = "en") +@Config(qualifiers = "en", sdk = [Build.VERSION_CODES.TIRAMISU]) class DefaultDateFormatterTest { @Test fun `test null`() {