Merge branch 'develop' into feature/bma/scroll-to-unread-messages

This commit is contained in:
Benoit Marty
2026-07-03 14:30:14 +02:00
committed by GitHub
1562 changed files with 11824 additions and 6140 deletions
@@ -140,7 +140,10 @@ class KonsistClassNameTest {
Konsist.scopeFromProject()
.classes()
.withNameEndingWith("Impl")
.withoutName("MediaUploadHandlerImpl")
.withoutName(
"MediaUploadHandlerImpl",
"GalleryMediaUploadHandlerImpl",
)
.assertEmpty(additionalMessage = "Class implementing interface should have name not end with 'Impl' but start with 'Default'")
}
@@ -149,6 +149,7 @@ class KonsistPreviewTest {
"TimelineItemEventRowShieldPreview",
"TimelineItemEventRowTimestampPreview",
"TimelineItemEventRowUtdPreview",
"TimelineItemEventRowWithGalleryPreview",
"TimelineItemEventRowWithManyReactionsPreview",
"TimelineItemEventRowWithRRPreview",
"TimelineItemEventRowWithReplyPreview",
+1
View File
@@ -20,6 +20,7 @@ android {
dependencies {
implementation(libs.test.junit)
implementation(libs.test.truth)
implementation(libs.test.robolectric)
implementation(libs.coroutines.test)
implementation(projects.libraries.androidutils)
implementation(projects.libraries.architecture)
@@ -45,3 +45,9 @@ class EnsureNeverCalledWithThreeParams<T, U, V> : (T, U, V) -> Unit {
lambdaError("Should not be called and is called with $p1, $p2 and $p3")
}
}
class EnsureNeverCalledWithThreeParamsAndResult<T, U, V, R> : (T, U, V) -> R {
override fun invoke(p1: T, p2: U, p3: V): R {
lambdaError("Should not be called and is called with $p1, $p2 and $p3")
}
}
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2026 Element Creations Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
* Please see LICENSE files in the repository root for full details.
*/
package io.element.android.tests.testutils.robolectric
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
/**
* Base class for all Robolectric tests.
*
* It is now configured to run by default on Android API 36,
* waiting for Robolectric to support API 37.
*/
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [36])
open class RobolectricTest
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2026 Element Creations Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
* Please see LICENSE files in the repository root for full details.
*/
package io.element.android.tests.testutils.robolectric
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestParameterInjector
import org.robolectric.annotation.Config
/**
* Base class for all Robolectric tests with parameter injector.
*
* It is now configured to run by default on Android API 36,
* waiting for Robolectric to support API 37.
*/
@RunWith(RobolectricTestParameterInjector::class)
@Config(sdk = [36])
open class RobolectricTestParameter

Some files were not shown because too many files have changed in this diff Show More