Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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<EmptyImageViewScreen> {
imageViewWithDrawable.isVisible()
}
}
}
Original file line number Diff line number Diff line change
@@ -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<EmptyImageViewScreen>() {
val imageViewWithDrawable = KImageView {
withDrawable(R.drawable.ic_sentiment_very_satisfied_black_24dp)
}
}
4 changes: 4 additions & 0 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@
android:name="io.github.kakaocup.sample.ChipsActivity"
android:label="Chips Activity"
android:theme="@style/MaterialAppTheme" />
<activity android:name=".EmptyImageViewActivity"
android:label="Empty ImageView Activity"
android:theme="@style/MaterialAppTheme"
/>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package io.github.kakaocup.sample

import androidx.appcompat.app.AppCompatActivity

class EmptyImageViewActivity: AppCompatActivity(R.layout.activity_empty_image_view)
19 changes: 19 additions & 0 deletions sample/src/main/res/layout/activity_empty_image_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">


<ImageView
android:id="@+id/empty_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_sentiment_very_satisfied_black_24dp" />

</LinearLayout>