diff --git a/sample/src/androidTest/kotlin/io/github/kakaocup/sample/EmptyDrawableMatcherTest.kt b/sample/src/androidTest/kotlin/io/github/kakaocup/sample/EmptyDrawableMatcherTest.kt new file mode 100644 index 000000000..f73041a45 --- /dev/null +++ b/sample/src/androidTest/kotlin/io/github/kakaocup/sample/EmptyDrawableMatcherTest.kt @@ -0,0 +1,26 @@ +package io.github.kakaocup.sample + +import androidx.test.ext.junit.rules.ActivityScenarioRule +import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner +import io.github.kakaocup.kakao.screen.Screen +import io.github.kakaocup.sample.screen.EmptyImageViewScreen +import org.junit.Ignore +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith + +@RunWith(AndroidJUnit4ClassRunner::class) +class EmptyDrawableMatcherTest { + + @Rule + @JvmField + val rule = ActivityScenarioRule(EmptyImageViewActivity::class.java) + + @Test + @Ignore("DrawableMatcher needs to be fixed") + fun test() { + Screen.onScreen { + imageViewWithDrawable.isVisible() + } + } +} diff --git a/sample/src/androidTest/kotlin/io/github/kakaocup/sample/screen/EmptyImageViewScreen.kt b/sample/src/androidTest/kotlin/io/github/kakaocup/sample/screen/EmptyImageViewScreen.kt new file mode 100644 index 000000000..172e8cbd2 --- /dev/null +++ b/sample/src/androidTest/kotlin/io/github/kakaocup/sample/screen/EmptyImageViewScreen.kt @@ -0,0 +1,11 @@ +package io.github.kakaocup.sample.screen + +import io.github.kakaocup.kakao.image.KImageView +import io.github.kakaocup.kakao.screen.Screen +import io.github.kakaocup.sample.R + +open class EmptyImageViewScreen : Screen() { + val imageViewWithDrawable = KImageView { + withDrawable(R.drawable.ic_sentiment_very_satisfied_black_24dp) + } +} diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index 036bac892..1e59860e1 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -132,6 +132,10 @@ android:name="io.github.kakaocup.sample.ChipsActivity" android:label="Chips Activity" android:theme="@style/MaterialAppTheme" /> + diff --git a/sample/src/main/kotlin/io/github/kakaocup/sample/EmptyImageViewActivity.kt b/sample/src/main/kotlin/io/github/kakaocup/sample/EmptyImageViewActivity.kt new file mode 100644 index 000000000..e5e642421 --- /dev/null +++ b/sample/src/main/kotlin/io/github/kakaocup/sample/EmptyImageViewActivity.kt @@ -0,0 +1,5 @@ +package io.github.kakaocup.sample + +import androidx.appcompat.app.AppCompatActivity + +class EmptyImageViewActivity: AppCompatActivity(R.layout.activity_empty_image_view) diff --git a/sample/src/main/res/layout/activity_empty_image_view.xml b/sample/src/main/res/layout/activity_empty_image_view.xml new file mode 100644 index 000000000..b21af6a1d --- /dev/null +++ b/sample/src/main/res/layout/activity_empty_image_view.xml @@ -0,0 +1,19 @@ + + + + + + + + +