diff --git a/library/screenshots/check_TextInputDisabled_dark.png b/library/screenshots/check_TextInputDisabled_dark.png new file mode 100644 index 000000000..6a0907d09 Binary files /dev/null and b/library/screenshots/check_TextInputDisabled_dark.png differ diff --git a/library/screenshots/check_TextInputWithError_dark.png b/library/screenshots/check_TextInputWithError_dark.png new file mode 100644 index 000000000..648dc145f Binary files /dev/null and b/library/screenshots/check_TextInputWithError_dark.png differ diff --git a/library/screenshots/check_TextInput_dark.png b/library/screenshots/check_TextInput_dark.png new file mode 100644 index 000000000..353f090b0 Binary files /dev/null and b/library/screenshots/check_TextInput_dark.png differ diff --git a/library/src/test/java/com/telefonica/mistica/input/TextInputTest.kt b/library/src/test/java/com/telefonica/mistica/input/TextInputTest.kt index 52c394aca..7454dedd2 100644 --- a/library/src/test/java/com/telefonica/mistica/input/TextInputTest.kt +++ b/library/src/test/java/com/telefonica/mistica/input/TextInputTest.kt @@ -11,6 +11,7 @@ import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config @RunWith(RobolectricTestRunner::class) internal class TextInputTest: ScreenshotsTest() { @@ -22,6 +23,12 @@ internal class TextInputTest: ScreenshotsTest() { checkTextInput() } + @Config(qualifiers = "+night") + @Test + fun `check TextInput dark`() { + checkTextInput() + } + @Test fun `check TextInputWithError`() { checkTextInput { @@ -29,6 +36,14 @@ internal class TextInputTest: ScreenshotsTest() { } } + @Config(qualifiers = "+night") + @Test + fun `check TextInputWithError dark`() { + checkTextInput { + error = "Whatever error" + } + } + @Test fun `check TextInputDisabled`() { checkTextInput { @@ -36,6 +51,14 @@ internal class TextInputTest: ScreenshotsTest() { } } + @Config(qualifiers = "+night") + @Test + fun `check TextInputDisabled dark`() { + checkTextInput { + isEnabled = false + } + } + private fun checkTextInput(onTextInput: TextInput.() -> Unit = {}) { rule.scenario.onActivity { activity -> val wrapper: FrameLayout = activity.findViewById(R.id.dummy_activity_wrapper)