diff --git a/tests/uitests/build.gradle.kts b/tests/uitests/build.gradle.kts
index 1881822691..ffa3e50aff 100644
--- a/tests/uitests/build.gradle.kts
+++ b/tests/uitests/build.gradle.kts
@@ -25,7 +25,8 @@ plugins {
}
android {
- namespace = "io.element.android.tests.uitests"
+ // Keep it as short as possible
+ namespace = "ui"
}
// Workaround: `kover` tasks somehow trigger the screenshot tests with a broken configuration, removing
diff --git a/tests/uitests/src/main/AndroidManifest.xml b/tests/uitests/src/main/AndroidManifest.xml
deleted file mode 100644
index 122869829c..0000000000
--- a/tests/uitests/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
diff --git a/tests/uitests/src/main/kotlin/io/element/android/tests/uitests/ElementXShowkaseRootModule.kt b/tests/uitests/src/main/kotlin/ui/ElementXShowkaseRootModule.kt
similarity index 95%
rename from tests/uitests/src/main/kotlin/io/element/android/tests/uitests/ElementXShowkaseRootModule.kt
rename to tests/uitests/src/main/kotlin/ui/ElementXShowkaseRootModule.kt
index 0c3fab67eb..6e162a0d37 100644
--- a/tests/uitests/src/main/kotlin/io/element/android/tests/uitests/ElementXShowkaseRootModule.kt
+++ b/tests/uitests/src/main/kotlin/ui/ElementXShowkaseRootModule.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.element.android.tests.uitests
+package ui
import com.airbnb.android.showkase.annotation.ShowkaseRoot
import com.airbnb.android.showkase.annotation.ShowkaseRootModule
diff --git a/tests/uitests/src/main/kotlin/io/element/android/tests/uitests/ShowkaseNavigation.kt b/tests/uitests/src/main/kotlin/ui/ShowkaseNavigation.kt
similarity index 96%
rename from tests/uitests/src/main/kotlin/io/element/android/tests/uitests/ShowkaseNavigation.kt
rename to tests/uitests/src/main/kotlin/ui/ShowkaseNavigation.kt
index cb7795c05a..0ffe30f5cd 100644
--- a/tests/uitests/src/main/kotlin/io/element/android/tests/uitests/ShowkaseNavigation.kt
+++ b/tests/uitests/src/main/kotlin/ui/ShowkaseNavigation.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.element.android.tests.uitests
+package ui
import android.app.Activity
import android.content.Intent
diff --git a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/BaseDeviceConfig.kt b/tests/uitests/src/test/kotlin/ui/BaseDeviceConfig.kt
similarity index 95%
rename from tests/uitests/src/test/kotlin/io/element/android/tests/uitests/BaseDeviceConfig.kt
rename to tests/uitests/src/test/kotlin/ui/BaseDeviceConfig.kt
index 3732ca66cc..8e9fd9879e 100644
--- a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/BaseDeviceConfig.kt
+++ b/tests/uitests/src/test/kotlin/ui/BaseDeviceConfig.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.element.android.tests.uitests
+package ui
import app.cash.paparazzi.DeviceConfig
diff --git a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/ColorTestPreview.kt b/tests/uitests/src/test/kotlin/ui/ColorTestPreview.kt
similarity index 97%
rename from tests/uitests/src/test/kotlin/io/element/android/tests/uitests/ColorTestPreview.kt
rename to tests/uitests/src/test/kotlin/ui/ColorTestPreview.kt
index 97276e0987..31bd79fd31 100644
--- a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/ColorTestPreview.kt
+++ b/tests/uitests/src/test/kotlin/ui/ColorTestPreview.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.element.android.tests.uitests
+package ui
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
diff --git a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/ComponentTestPreview.kt b/tests/uitests/src/test/kotlin/ui/ComponentTestPreview.kt
similarity index 96%
rename from tests/uitests/src/test/kotlin/io/element/android/tests/uitests/ComponentTestPreview.kt
rename to tests/uitests/src/test/kotlin/ui/ComponentTestPreview.kt
index 8be21ba1ee..d8fca9f574 100644
--- a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/ComponentTestPreview.kt
+++ b/tests/uitests/src/test/kotlin/ui/ComponentTestPreview.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.element.android.tests.uitests
+package ui
import androidx.compose.runtime.Composable
import com.airbnb.android.showkase.models.ShowkaseBrowserComponent
diff --git a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/ScreenshotTest.kt b/tests/uitests/src/test/kotlin/ui/S.kt
similarity index 94%
rename from tests/uitests/src/test/kotlin/io/element/android/tests/uitests/ScreenshotTest.kt
rename to tests/uitests/src/test/kotlin/ui/S.kt
index 544f68c4b7..33c7260e7f 100644
--- a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/ScreenshotTest.kt
+++ b/tests/uitests/src/test/kotlin/ui/S.kt
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package io.element.android.tests.uitests
+package ui
import android.content.res.Configuration
import android.os.LocaleList
@@ -48,15 +48,16 @@ import java.util.Locale
/**
* BMA: Inspired from https://github.com/airbnb/Showkase/blob/master/showkase-screenshot-testing-paparazzi-sample/src/test/java/com/airbnb/android/showkase/screenshot/testing/paparazzi/sample/PaparazziSampleScreenshotTest.kt
- */
-
-/*
+ *
* Credit to Alex Vanyo for creating this sample in the Now In Android app by Google.
* PR here - https://github.com/android/nowinandroid/pull/101. Modified the test from that PR to
* my own needs for this sample.
+ *
+ * *Note*: keep the class name as short as possible to get shorter filename for generated screenshot.
+ * Long name was ScreenshotTest.
*/
@RunWith(TestParameterInjector::class)
-class ScreenshotTest {
+class S {
object PreviewProvider : TestParameter.TestParameterValuesProvider {
override fun provideValues(): List {
@@ -79,8 +80,12 @@ class ScreenshotTest {
renderingMode = SessionParams.RenderingMode.NORMAL,
)
+ /**
+ * *Note*: keep the method name as short as possible to get shorter filename for generated screenshot.
+ * Long name was preview_test.
+ */
@Test
- fun preview_tests(
+ fun t(
@TestParameter(valuesProvider = PreviewProvider::class) componentTestPreview: TestPreview,
@TestParameter baseDeviceConfig: BaseDeviceConfig,
@TestParameter(value = ["1.0"/*, "1.5"*/]) fontScale: Float,
diff --git a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/TestPreview.kt b/tests/uitests/src/test/kotlin/ui/TestPreview.kt
similarity index 96%
rename from tests/uitests/src/test/kotlin/io/element/android/tests/uitests/TestPreview.kt
rename to tests/uitests/src/test/kotlin/ui/TestPreview.kt
index fa0ea2daa0..868b310b55 100644
--- a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/TestPreview.kt
+++ b/tests/uitests/src/test/kotlin/ui/TestPreview.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.element.android.tests.uitests
+package ui
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
diff --git a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/TypographyTestPreview.kt b/tests/uitests/src/test/kotlin/ui/TypographyTestPreview.kt
similarity index 97%
rename from tests/uitests/src/test/kotlin/io/element/android/tests/uitests/TypographyTestPreview.kt
rename to tests/uitests/src/test/kotlin/ui/TypographyTestPreview.kt
index c723f990b1..461e4aeb81 100644
--- a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/TypographyTestPreview.kt
+++ b/tests/uitests/src/test/kotlin/ui/TypographyTestPreview.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.element.android.tests.uitests
+package ui
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding