Dnd settings pages redesign (round 1)

Test: make RunSettingsRoboTests -j40
Bug: 111475013
Change-Id: Idb6bbfdfe377b61a8fe1f7e81171bbefe23a4ebf
This commit is contained in:
Beverly
2018-10-26 16:01:17 -04:00
parent 6d2fbea6e5
commit 69d11b2874
28 changed files with 835 additions and 983 deletions

View File

@@ -68,63 +68,6 @@ public class ZenModeSettingsTest {
mBuilder.getBlockedEffectsSummary(policy));
}
@Test
public void testGetMsgEventReminderSettingSummary_none() {
Policy policy = new Policy(0, 0, 0, 0);
assertThat(mBuilder.getMsgEventReminderSettingSummary(policy)).isEqualTo("None");
}
@Test
public void testGetMsgEventReminderSettingSummary_single() {
Policy policy = new Policy(
Policy.PRIORITY_CATEGORY_ALARMS | Policy.PRIORITY_CATEGORY_EVENTS, 0 , 0 , 0);
assertThat(mBuilder.getMsgEventReminderSettingSummary(policy)).isEqualTo("Events");
}
@Test
public void testGetMsgEventReminderSettingSummary_someMsgs() {
Policy policy = new Policy(Policy.PRIORITY_CATEGORY_MESSAGES, 0,
Policy.PRIORITY_SENDERS_CONTACTS , 0);
assertThat(mBuilder.getMsgEventReminderSettingSummary(policy)).isEqualTo("Some messages");
policy = new Policy(Policy.PRIORITY_CATEGORY_MESSAGES, 0,
Policy.PRIORITY_SENDERS_STARRED , 0);
assertThat(mBuilder.getMsgEventReminderSettingSummary(policy)).isEqualTo("Some messages");
}
@Test
public void testGetMsgEventReminderSettingSummary_msgs() {
Policy policy = new Policy(Policy.PRIORITY_CATEGORY_MESSAGES, 0, 0, 0);
assertThat(mBuilder.getMsgEventReminderSettingSummary(policy)).isEqualTo("Messages");
}
@Test
public void testGetMsgEventReminderSettingSummary_someMsgsAndOther() {
Policy policy = new Policy(
Policy.PRIORITY_CATEGORY_MESSAGES | Policy.PRIORITY_CATEGORY_REMINDERS,
0, Policy.PRIORITY_SENDERS_CONTACTS , 0);
assertThat(mBuilder.getMsgEventReminderSettingSummary(policy))
.isEqualTo("Some messages and reminders");
}
@Test
public void testGetMsgEventReminderSettingSummary_someMsgsAndAllOthers() {
Policy policy = new Policy(Policy.PRIORITY_CATEGORY_EVENTS
| Policy.PRIORITY_CATEGORY_MESSAGES | Policy.PRIORITY_CATEGORY_REMINDERS,
0, Policy.PRIORITY_SENDERS_CONTACTS , 0);
assertThat(mBuilder.getMsgEventReminderSettingSummary(policy))
.isEqualTo("Some messages, events, and reminders");
}
@Test
public void testGetMsgEventReminderSettingSummary_noMsgsAndOther() {
Policy policy = new Policy(
Policy.PRIORITY_CATEGORY_EVENTS | Policy.PRIORITY_CATEGORY_REMINDERS,
0,0, 0);
assertThat(mBuilder.getMsgEventReminderSettingSummary(policy))
.isEqualTo("Events and reminders");
}
@Test
public void testGetCallsSettingSummary_none() {
Policy policy = new Policy(0, 0, 0, 0);