Leverage the behavior of showing the searching message in wifi slice

Fixes: 124823973
Test: robotest
Change-Id: Id89ec5ef09f05f83e019a6f4488cacf2ab4e635b
This commit is contained in:
Jason Chiu
2019-02-26 18:01:00 +08:00
parent cabe72cf7b
commit 6bbe6e2362
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) {