Merge "Leverage the behavior of showing the searching message in wifi slice"

This commit is contained in:
Jason Chiu
2019-02-27 10:03:28 +00:00
committed by Android (Google) Code Review
3 changed files with 149 additions and 5 deletions

View File

@@ -253,6 +253,18 @@ public class SliceTester {
assertThat(hasText(sliceItems, subtitle, null /* hints */)).isTrue();
}
/**
* Assert no slice item contains subtitle.
*
* @param sliceItems All slice items of a Slice.
* @param subtitle Subtitle for asserting.
*/
public static void assertNoSliceItemContainsSubtitle(List<SliceItem> sliceItems,
String subtitle) {
// Subtitle has no hints
assertThat(hasText(sliceItems, subtitle, null /* hints */)).isFalse();
}
private static boolean hasText(List<SliceItem> sliceItems, String text, String hints) {
boolean hasText = false;
for (SliceItem item : sliceItems) {