mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Merge branch 'develop' into feat/skin-tone-picker
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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 ui
|
||||
|
||||
import org.junit.rules.TestRule
|
||||
import org.junit.runner.Description
|
||||
import org.junit.runners.model.Statement
|
||||
|
||||
/**
|
||||
* Workaround for Paparazzi 2.0.0-alpha05 / LayoutLib 16.2.1 bug where
|
||||
* HandlerThread_Delegate calls Thread.setPosixNicenessInternal which doesn't exist on JVM.
|
||||
* Tracked in https://github.com/cashapp/paparazzi/issues/2342 — fixed in layoutlib 16.2.3.
|
||||
* Remove this workaround once Paparazzi ships with layoutlib >= 16.2.3.
|
||||
*
|
||||
* Paparazzi's PaparazziLogger collects background thread errors and re-throws them via
|
||||
* assertNoErrors(). This Statement wrapper catches the known NoSuchMethodError so the test
|
||||
* can pass despite the LayoutLib bug.
|
||||
*/
|
||||
class LayoutLibErrorFilterStatement : TestRule {
|
||||
override fun apply(base: Statement, description: Description): Statement {
|
||||
return object : Statement() {
|
||||
@Throws(Throwable::class)
|
||||
override fun evaluate() {
|
||||
try {
|
||||
base.evaluate()
|
||||
} catch (e: NoSuchMethodError) {
|
||||
if (e.message?.contains("setPosixNicenessInternal") != true) throw e
|
||||
} catch (npe: NullPointerException) {
|
||||
// Also catch this error on `HorizontalFloatingToolbarPreview` and `HorizontalFloatingToolbarNoFabPreview`
|
||||
if (npe.message?.contains("""Cannot invoke "java.util.ArrayList.size()" because "childrenList" is null""") != true) throw npe
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,10 @@ class PreviewA11yTest(
|
||||
@TestParameter(valuesProvider = ComposableA11yPreviewProvider::class)
|
||||
val preview: ComposablePreview<AndroidPreviewInfo>,
|
||||
) {
|
||||
@get:Rule
|
||||
@get:Rule(order = 0)
|
||||
val layoutLibErrorFilterStatement = LayoutLibErrorFilterStatement()
|
||||
|
||||
@get:Rule(order = 1)
|
||||
val paparazziRule = PaparazziPreviewRule.createFor(
|
||||
preview = preview,
|
||||
locale = "en",
|
||||
|
||||
@@ -28,7 +28,10 @@ class PreviewShard1Test(
|
||||
@TestParameter(valuesProvider = Shard1ComposablePreviewProvider::class)
|
||||
val preview: ComposablePreview<AndroidPreviewInfo>,
|
||||
) {
|
||||
@get:Rule
|
||||
@get:Rule(order = 0)
|
||||
val layoutLibErrorFilterStatement = LayoutLibErrorFilterStatement()
|
||||
|
||||
@get:Rule(order = 1)
|
||||
val paparazziRule = PaparazziPreviewRule.createFor(preview, locale = "en")
|
||||
|
||||
@Test
|
||||
|
||||
@@ -28,7 +28,10 @@ class PreviewShard2Test(
|
||||
@TestParameter(valuesProvider = Shard2ComposablePreviewProvider::class)
|
||||
val preview: ComposablePreview<AndroidPreviewInfo>,
|
||||
) {
|
||||
@get:Rule
|
||||
@get:Rule(order = 0)
|
||||
val layoutLibErrorFilterStatement = LayoutLibErrorFilterStatement()
|
||||
|
||||
@get:Rule(order = 1)
|
||||
val paparazziRule = PaparazziPreviewRule.createFor(preview, locale = "en")
|
||||
|
||||
@Test
|
||||
|
||||
@@ -28,7 +28,10 @@ class PreviewShard3Test(
|
||||
@TestParameter(valuesProvider = Shard3ComposablePreviewProvider::class)
|
||||
val preview: ComposablePreview<AndroidPreviewInfo>,
|
||||
) {
|
||||
@get:Rule
|
||||
@get:Rule(order = 0)
|
||||
val layoutLibErrorFilterStatement = LayoutLibErrorFilterStatement()
|
||||
|
||||
@get:Rule(order = 1)
|
||||
val paparazziRule = PaparazziPreviewRule.createFor(preview, locale = "en")
|
||||
|
||||
@Test
|
||||
|
||||
@@ -28,7 +28,10 @@ class PreviewShard4Test(
|
||||
@TestParameter(valuesProvider = Shard4ComposablePreviewProvider::class)
|
||||
val preview: ComposablePreview<AndroidPreviewInfo>,
|
||||
) {
|
||||
@get:Rule
|
||||
@get:Rule(order = 0)
|
||||
val layoutLibErrorFilterStatement = LayoutLibErrorFilterStatement()
|
||||
|
||||
@get:Rule(order = 1)
|
||||
val paparazziRule = PaparazziPreviewRule.createFor(preview, locale = "en")
|
||||
|
||||
@Test
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6c755a7dcfc2c9f48d449e570a3f1af1cde299fd90ddd4478e9a4c315cf03128
|
||||
size 23810
|
||||
oid sha256:6f199ef24dbc9d8c89b5b28503a887f489a6970355d591aa05d08968f25ddfce
|
||||
size 23900
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:efa5408c3af0fcd39659b8d30b21ace43be46d2876815ad592f802a7887b5eb9
|
||||
size 23678
|
||||
oid sha256:002bb9faa2d3222cf1b5ef4adb44e9a711ff778a6b6c9f7480620a3c3e69bd21
|
||||
size 23822
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1fc512e71e168473e0e976be3e3e6cd24b455273257ad0adf970fc2641da43bb
|
||||
size 25679
|
||||
oid sha256:47accbc1fbd8a7d238cd540036bacc5233d9feb5499a1a1f0c9d0cb48ec6748c
|
||||
size 25862
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:de71af50bba66a285b5ef44e1a4fe76ce6dc2e094c4c09ddf701deb9a5db898d
|
||||
size 22025
|
||||
oid sha256:afdd57a26c55f80a987c6d1e1b7c0f19728fcf99613630897e92ba29423f9f87
|
||||
size 22212
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:88b3583d55c6855027f13a152a6fc414f6b9e11d65e5b5403463b84fafe38c3f
|
||||
size 21891
|
||||
oid sha256:1c91577d10dfa10f11c2fed1781559c513b5b376ce7636a6ce3dfab73933b6d2
|
||||
size 22095
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e64367832735139b68269a8c679b9c6f2b929b906124a0ee93735cbdd9202d6d
|
||||
size 23826
|
||||
oid sha256:20c44f88a9b347569b4f8ced10b29104541637661134c1a82e2746fa00bd1a25
|
||||
size 23968
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
LFS
BIN
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user