Skip to content

Commit 6e360d6

Browse files
committed
Add content description to allow automated testing
1 parent 796808b commit 6e360d6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/src/main/java/tech/httptoolkit/pinning_demo/MainActivity.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class MainActivity : AppCompatActivity() {
8787
R.drawable.baseline_check_circle_24
8888
)!!
8989
button.setCompoundDrawablesWithIntrinsicBounds(img, null, null, null)
90+
button.contentDescription = "${button.text} - Success"
9091
}
9192
}
9293

@@ -101,6 +102,7 @@ class MainActivity : AppCompatActivity() {
101102
R.drawable.baseline_cancel_24
102103
)!!
103104
button.setCompoundDrawablesWithIntrinsicBounds(img, null, null, null)
105+
button.contentDescription = "${button.text} - Failed with error: $message"
104106

105107
val duration = Toast.LENGTH_LONG
106108
val toast = Toast.makeText(this@MainActivity, message, duration)

0 commit comments

Comments
 (0)