mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 16:22:49 +00:00
Ensure Robolectric test are run using API 36 until the library support API 37.
This commit is contained in:
committed by
Benoit Marty
parent
51c3ee0eae
commit
c430877d87
+2
-4
@@ -8,19 +8,17 @@
|
||||
|
||||
package io.element.android.compound.screenshot
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.github.takahirom.roborazzi.captureRoboImage
|
||||
import io.element.android.compound.screenshot.utils.screenshotFile
|
||||
import io.element.android.compound.theme.AvatarColorsPreviewDark
|
||||
import io.element.android.compound.theme.AvatarColorsPreviewLight
|
||||
import io.element.android.tests.testutils.robolectric.RobolectricTest
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.annotation.GraphicsMode
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
class AvatarColorsTest {
|
||||
class AvatarColorsTest : RobolectricTest() {
|
||||
@Test
|
||||
@Config(sdk = [35], qualifiers = "xxhdpi")
|
||||
fun screenshots() {
|
||||
|
||||
+2
-4
@@ -11,7 +11,6 @@ package io.element.android.compound.screenshot
|
||||
import androidx.compose.foundation.layout.ColumnScope
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.github.takahirom.roborazzi.captureRoboImage
|
||||
import io.element.android.compound.previews.IconsCompoundPreviewDark
|
||||
import io.element.android.compound.previews.IconsCompoundPreviewLight
|
||||
@@ -21,15 +20,14 @@ import io.element.android.compound.screenshot.utils.screenshotFile
|
||||
import io.element.android.compound.theme.ElementTheme
|
||||
import io.element.android.compound.theme.Theme
|
||||
import io.element.android.compound.tokens.generated.CompoundIcons
|
||||
import io.element.android.tests.testutils.robolectric.RobolectricTest
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.annotation.GraphicsMode
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
class CompoundIconTest {
|
||||
class CompoundIconTest : RobolectricTest() {
|
||||
@Test
|
||||
@Config(sdk = [35], qualifiers = "w1024dp-h2048dp")
|
||||
fun screenshots() {
|
||||
|
||||
+2
-4
@@ -8,18 +8,16 @@
|
||||
|
||||
package io.element.android.compound.screenshot
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.github.takahirom.roborazzi.captureRoboImage
|
||||
import io.element.android.compound.previews.CompoundTypographyPreview
|
||||
import io.element.android.compound.screenshot.utils.screenshotFile
|
||||
import io.element.android.tests.testutils.robolectric.RobolectricTest
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.annotation.GraphicsMode
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
class CompoundTypographyTest {
|
||||
class CompoundTypographyTest : RobolectricTest() {
|
||||
@Test
|
||||
@Config(sdk = [35], qualifiers = "h2048dp-xxhdpi")
|
||||
fun screenshots() {
|
||||
|
||||
+2
-4
@@ -18,20 +18,18 @@ import androidx.compose.material3.Text
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.github.takahirom.roborazzi.captureRoboImage
|
||||
import io.element.android.compound.colors.SemanticColorsLightDark
|
||||
import io.element.android.compound.screenshot.utils.screenshotFile
|
||||
import io.element.android.compound.theme.ElementTheme
|
||||
import io.element.android.compound.theme.ForcedDarkElementTheme
|
||||
import io.element.android.tests.testutils.robolectric.RobolectricTest
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.annotation.GraphicsMode
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
class ForcedDarkElementThemeTest {
|
||||
class ForcedDarkElementThemeTest : RobolectricTest() {
|
||||
@Test
|
||||
@Config(sdk = [35], qualifiers = "xxhdpi")
|
||||
fun screenshots() {
|
||||
|
||||
+2
-4
@@ -18,7 +18,6 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.github.takahirom.roborazzi.captureRoboImage
|
||||
import io.element.android.compound.previews.ColorPreview
|
||||
import io.element.android.compound.screenshot.utils.screenshotFile
|
||||
@@ -26,14 +25,13 @@ import io.element.android.compound.theme.ElementTheme
|
||||
import io.element.android.compound.theme.LinkColor
|
||||
import io.element.android.compound.theme.SnackBarLabelColorDark
|
||||
import io.element.android.compound.theme.SnackBarLabelColorLight
|
||||
import io.element.android.tests.testutils.robolectric.RobolectricTest
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.annotation.GraphicsMode
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
class LegacyColorsTest {
|
||||
class LegacyColorsTest : RobolectricTest() {
|
||||
@Test
|
||||
@Config(sdk = [35], qualifiers = "xxhdpi")
|
||||
fun screenshots() {
|
||||
|
||||
+2
-4
@@ -18,7 +18,6 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.github.takahirom.roborazzi.captureRoboImage
|
||||
import io.element.android.compound.screenshot.utils.screenshotFile
|
||||
import io.element.android.compound.theme.ColorsSchemeDarkHcPreview
|
||||
@@ -26,14 +25,13 @@ import io.element.android.compound.theme.ColorsSchemeDarkPreview
|
||||
import io.element.android.compound.theme.ColorsSchemeLightHcPreview
|
||||
import io.element.android.compound.theme.ColorsSchemeLightPreview
|
||||
import io.element.android.compound.theme.ElementTheme
|
||||
import io.element.android.tests.testutils.robolectric.RobolectricTest
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.annotation.GraphicsMode
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
class MaterialColorSchemeTest {
|
||||
class MaterialColorSchemeTest : RobolectricTest() {
|
||||
@Test
|
||||
@Config(sdk = [35], qualifiers = "h2048dp-xhdpi")
|
||||
fun screenshots() {
|
||||
|
||||
+2
-4
@@ -8,18 +8,16 @@
|
||||
|
||||
package io.element.android.compound.screenshot
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.github.takahirom.roborazzi.captureRoboImage
|
||||
import io.element.android.compound.screenshot.utils.screenshotFile
|
||||
import io.element.android.compound.theme.MaterialTextPreview
|
||||
import io.element.android.tests.testutils.robolectric.RobolectricTest
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.annotation.GraphicsMode
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
class MaterialTextTest {
|
||||
class MaterialTextTest : RobolectricTest() {
|
||||
@Test
|
||||
@Config(sdk = [35], qualifiers = "w480dp-h1200dp-xxhdpi")
|
||||
fun screenshots() {
|
||||
|
||||
+2
-4
@@ -8,18 +8,16 @@
|
||||
|
||||
package io.element.android.compound.screenshot
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.github.takahirom.roborazzi.captureRoboImage
|
||||
import io.element.android.compound.previews.TypographyPreview
|
||||
import io.element.android.compound.screenshot.utils.screenshotFile
|
||||
import io.element.android.tests.testutils.robolectric.RobolectricTest
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.annotation.GraphicsMode
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
class MaterialTypographyTest {
|
||||
class MaterialTypographyTest : RobolectricTest() {
|
||||
@Test
|
||||
@Config(sdk = [35], qualifiers = "h2048dp-xxhdpi")
|
||||
fun screenshots() {
|
||||
|
||||
+2
-4
@@ -19,20 +19,18 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.github.takahirom.roborazzi.captureRoboImage
|
||||
import io.element.android.compound.previews.ColorsSchemePreview
|
||||
import io.element.android.compound.screenshot.utils.screenshotFile
|
||||
import io.element.android.compound.theme.ElementTheme
|
||||
import io.element.android.compound.theme.Theme
|
||||
import io.element.android.tests.testutils.robolectric.RobolectricTest
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.annotation.GraphicsMode
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
class MaterialYouThemeTest {
|
||||
class MaterialYouThemeTest : RobolectricTest() {
|
||||
@Test
|
||||
@Config(sdk = [35], qualifiers = "h2048dp-xhdpi")
|
||||
fun screenshots() {
|
||||
|
||||
+2
-4
@@ -8,21 +8,19 @@
|
||||
|
||||
package io.element.android.compound.screenshot
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.github.takahirom.roborazzi.captureRoboImage
|
||||
import io.element.android.compound.previews.CompoundSemanticColorsDark
|
||||
import io.element.android.compound.previews.CompoundSemanticColorsDarkHc
|
||||
import io.element.android.compound.previews.CompoundSemanticColorsLight
|
||||
import io.element.android.compound.previews.CompoundSemanticColorsLightHc
|
||||
import io.element.android.compound.screenshot.utils.screenshotFile
|
||||
import io.element.android.tests.testutils.robolectric.RobolectricTest
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.annotation.GraphicsMode
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
class SemanticColorsTest {
|
||||
class SemanticColorsTest : RobolectricTest() {
|
||||
@Config(sdk = [35], qualifiers = "h2000dp-xhdpi")
|
||||
@Test
|
||||
fun screenshots() {
|
||||
|
||||
Reference in New Issue
Block a user