diff --git a/build.gradle b/build.gradle index e3b31d2b8..4f8925777 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { accompanist_version = "0.32.0" coil_version = '2.5.0' constraintComposeVersion = '1.0.1' - roborazzi_version = "1.10.1" + roborazzi_version = "1.11.0" } repositories { google() @@ -29,7 +29,7 @@ buildscript { plugins { id 'org.jetbrains.kotlin.android' version '1.5.21' apply false id 'io.github.gradle-nexus.publish-plugin' version '1.1.0' apply false - id "io.github.takahirom.roborazzi" version '1.10.1' apply false + id "io.github.takahirom.roborazzi" version '1.11.0' apply false } allprojects { diff --git a/library/src/test/java/com/telefonica/mistica/button/ButtonTest.kt b/library/src/test/java/com/telefonica/mistica/button/ButtonTest.kt index bc5bdc569..4aee6ad84 100644 --- a/library/src/test/java/com/telefonica/mistica/button/ButtonTest.kt +++ b/library/src/test/java/com/telefonica/mistica/button/ButtonTest.kt @@ -10,10 +10,14 @@ import com.telefonica.mistica.DummyActivity import com.telefonica.mistica.DummyActivity.Companion.EXTRA_THEME import com.telefonica.mistica.R import com.telefonica.mistica.compose.button.ButtonStyle +import com.telefonica.mistica.compose.theme.brand.BlauBrand import com.telefonica.mistica.compose.theme.brand.Brand import com.telefonica.mistica.compose.theme.brand.MovistarBrand +import com.telefonica.mistica.compose.theme.brand.O2Brand +import com.telefonica.mistica.compose.theme.brand.TelefonicaBrand import com.telefonica.mistica.compose.theme.brand.TuBrand import com.telefonica.mistica.compose.theme.brand.VivoBrand +import com.telefonica.mistica.compose.theme.brand.VivoNewBrand import com.telefonica.mistica.testutils.ScreenshotsTest import com.telefonica.mistica.testutils.TestUtils.getAllBrands import com.telefonica.mistica.testutils.TestUtils.isInverse @@ -83,7 +87,7 @@ internal class ButtonTest( @ParameterizedRobolectricTestRunner.Parameters(name = "ButtonXML {1} {0} icon={2}") fun brands(): List> { val allBrands = getAllBrands() - val buttonStyles = ButtonStyle.values().toList() + val buttonStyles = ButtonStyle.entries val icons = listOf(false, true) return allBrands.flatMap { brand -> buttonStyles.flatMap { buttonStyle -> @@ -97,12 +101,14 @@ internal class ButtonTest( } fun Brand.getBaseThemeForBrand(): Int = when (this) { - MovistarBrand -> R.style.MisticaTheme_Movistar_test - VivoBrand -> R.style.MisticaTheme_Vivo_test - VivoBrand -> R.style.MisticaTheme_O2_test - VivoBrand -> R.style.MisticaTheme_Blau_test - TuBrand -> R.style.MisticaTheme_Tu_test - else -> R.style.MisticaTheme_Telefonica_test + MovistarBrand -> R.style.MisticaTheme_Movistar + VivoBrand -> R.style.MisticaTheme_Vivo + VivoNewBrand -> R.style.MisticaTheme_VivoNew + O2Brand -> R.style.MisticaTheme_O2 + TelefonicaBrand -> R.style.MisticaTheme_Telefonica + TuBrand -> R.style.MisticaTheme_Tu + BlauBrand -> R.style.MisticaTheme_Blau + else -> { throw IllegalArgumentException("Unexpected brand $this") } } fun ButtonStyle.getButtonStyleRef() = when (this) { diff --git a/library/src/test/res/values/styles.xml b/library/src/test/res/values/styles.xml index 184ab3ef7..66328c571 100644 --- a/library/src/test/res/values/styles.xml +++ b/library/src/test/res/values/styles.xml @@ -14,109 +14,4 @@ - - - - - - - - - - - - - - \ No newline at end of file