Update spacing and background color for condition/suggestion.
- changed suggestion/condition and searchbox background color to #F2F2F2 - changed condition card background color to #F8F8F8 - removed Suggestion header - reduced space above condition header/footer by 9dp Bug: 63393599 Test: make RunSettingsRoboTests Change-Id: I268934e3a573b542480c0b21dbab68b7217295b5
This commit is contained in:
@@ -121,21 +121,17 @@ public class DashboardDataTest {
|
||||
final List<DashboardData.Item> items = mDashboardDataWithOneConditions.getItemList();
|
||||
|
||||
// Header, suggestion, condition, footer, 1 tile
|
||||
assertThat(items).hasSize(5);
|
||||
assertThat(items).hasSize(4);
|
||||
|
||||
assertThat(items.get(0).id).isEqualTo(STABLE_ID_SUGGESTION_CONDITION_TOP_HEADER);
|
||||
assertThat(items.get(1).id).isEqualTo(STABLE_ID_SUGGESTION_CONTAINER);
|
||||
assertThat(items.get(2).id).isEqualTo(STABLE_ID_CONDITION_CONTAINER);
|
||||
assertThat(items.get(3).id).isEqualTo(STABLE_ID_SUGGESTION_CONDITION_FOOTER);
|
||||
assertThat(items.get(4).id).isEqualTo(Objects.hash(mTestCategoryTile.title));
|
||||
assertThat(items.get(0).id).isEqualTo(STABLE_ID_SUGGESTION_CONTAINER);
|
||||
assertThat(items.get(1).id).isEqualTo(STABLE_ID_CONDITION_CONTAINER);
|
||||
assertThat(items.get(2).id).isEqualTo(STABLE_ID_SUGGESTION_CONDITION_FOOTER);
|
||||
assertThat(items.get(3).id).isEqualTo(Objects.hash(mTestCategoryTile.title));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBuildItemsData_containsAllData() {
|
||||
final DashboardData.SuggestionConditionHeaderData data =
|
||||
new DashboardData.SuggestionConditionHeaderData(
|
||||
mDashboardDataWithOneConditions.getConditions(), 0);
|
||||
final Object[] expectedObjects = {data,
|
||||
final Object[] expectedObjects = {
|
||||
mDashboardDataWithOneConditions.getSuggestions(),
|
||||
mDashboardDataWithOneConditions.getConditions(),
|
||||
null, mTestCategoryTile};
|
||||
@@ -206,17 +202,13 @@ public class DashboardDataTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDiffUtil_InsertOneCondition_ResultDataTwoChanged() {
|
||||
public void testDiffUtil_InsertOneCondition_ResultDataOneChanged() {
|
||||
//Build testResultData
|
||||
final List<ListUpdateResult.ResultData> testResultData = new ArrayList<>();
|
||||
// Item in position 1 is the header, which contains the number of conditions, changed from
|
||||
// 1 to 2
|
||||
testResultData.add(new ListUpdateResult.ResultData(
|
||||
ListUpdateResult.ResultData.TYPE_OPERATION_CHANGE, 0, 1));
|
||||
// Item in position 3 is the condition container containing the list of conditions, which
|
||||
// Item in position 2 is the condition container containing the list of conditions, which
|
||||
// gets 1 more item
|
||||
testResultData.add(new ListUpdateResult.ResultData(
|
||||
ListUpdateResult.ResultData.TYPE_OPERATION_CHANGE, 2, 1));
|
||||
ListUpdateResult.ResultData.TYPE_OPERATION_CHANGE, 1, 1));
|
||||
|
||||
testDiffUtil(mDashboardDataWithOneConditions,
|
||||
mDashboardDataWithTwoConditions, testResultData);
|
||||
@@ -227,7 +219,7 @@ public class DashboardDataTest {
|
||||
//Build testResultData
|
||||
final List<ListUpdateResult.ResultData> testResultData = new ArrayList<>();
|
||||
testResultData.add(new ListUpdateResult.ResultData(
|
||||
ListUpdateResult.ResultData.TYPE_OPERATION_REMOVE, 0, 5));
|
||||
ListUpdateResult.ResultData.TYPE_OPERATION_REMOVE, 0, 4));
|
||||
|
||||
testDiffUtil(mDashboardDataWithOneConditions, mDashboardDataWithNoItems, testResultData);
|
||||
}
|
||||
|
Reference in New Issue
Block a user