Add content description to suggestion card close button.

Change-Id: I2354dd5a4b092ac24bbc0c197bd228b73d8ede64
Fixes: 72958040
Test: talkback, make RunSettingsRoboTests
This commit is contained in:
Doris Ling
2018-02-12 11:40:03 -08:00
parent 131363884b
commit 98a6b74291
3 changed files with 15 additions and 0 deletions

View File

@@ -294,6 +294,19 @@ public class SuggestionAdapterTest {
verify(drawable).setTint(colorAccent);
}
@Test
public void onBindViewHolder_closeButtonShouldHaveContentDescription()
throws PendingIntent.CanceledException {
final List<Suggestion> suggestions = makeSuggestions("pkg1");
setupSuggestions(mActivity, suggestions);
mSuggestionAdapter.onBindViewHolder(mSuggestionHolder, 0);
assertThat(
mSuggestionHolder.itemView.findViewById(R.id.close_button).getContentDescription())
.isNotNull();
}
@Test
public void setCardLayout_oneCard_shouldSetCardWidthToMatchParent() {
final List<Suggestion> suggestions = makeSuggestions("pkg1");