mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-07 01:19:17 +00:00
Move io.element.android.tests.uitests.ScreenshotTest to ui.T to generate much shorter name for screenshot files.
This commit is contained in:
committed by
Benoit Marty
parent
6f91be7923
commit
ecc7ba0089
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.element.android.tests.uitests
|
||||
package ui
|
||||
|
||||
import app.cash.paparazzi.DeviceConfig
|
||||
|
||||
+1
-1
@@ -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
|
||||
+1
-1
@@ -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
|
||||
+11
-6
@@ -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<TestPreview> {
|
||||
@@ -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,
|
||||
+1
-1
@@ -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
|
||||
+1
-1
@@ -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
|
||||
Reference in New Issue
Block a user