on xenial help sign in
Fix some tests
d14f9b1Albert Astals Cid
qml/Dash/DashPageHeader.qml+6−18
@@ -24,7 +24,7 @@ import "../Components"
24Item {
24Item {
25 id: root
25 id: root
26 objectName: "pageHeader"
26 objectName: "pageHeader"
27− implicitHeight: headerContainer.height + bottomContainer.height + signatureLineHeight
27+ implicitHeight: headerContainer.height + signatureLineHeight
28 readonly property real signatureLineHeight: showSignatureLine ? units.gu(2) : 0
28 readonly property real signatureLineHeight: showSignatureLine ? units.gu(2) : 0
29
29
30 property bool showBackButton: false
30 property bool showBackButton: false
@@ -43,7 +43,6 @@ Item {
43 property alias searchHint: searchTextField.placeholderText
43 property alias searchHint: searchTextField.placeholderText
44 property bool showSignatureLine: true
44 property bool showSignatureLine: true
45
45
46− property alias bottomItem: bottomContainer.children
47 property int paginationCount: 0
46 property int paginationCount: 0
48 property int paginationIndex: -1
47 property int paginationIndex: -1
49
48
@@ -127,9 +126,10 @@ Item {
127 }
126 }
128
127
129 InverseMouseArea {
128 InverseMouseArea {
130− anchors { fill: parent; margins: units.gu(1); bottomMargin: units.gu(3) + bottomContainer.height }
129+ anchors { fill: parent; margins: units.gu(1); bottomMargin: units.gu(3) + (extraPanel ? extraPanel.height : 0) }
131 visible: headerContainer.showSearch
130 visible: headerContainer.showSearch
132 onPressed: {
131 onPressed: {
132+ extraPanel.visible = false;
133 closePopup(/* keepFocus */false);
133 closePopup(/* keepFocus */false);
134 mouse.accepted = false;
134 mouse.accepted = false;
135 }
135 }
@@ -276,7 +276,6 @@ Item {
276 property color panelColor: background.topColor
276 property color panelColor: background.topColor
277 panelForegroundColor: config.foregroundColor
277 panelForegroundColor: config.foregroundColor
278 config: PageHeadConfiguration {
278 config: PageHeadConfiguration {
279− title: root.title
280 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
279 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
281 backAction: Action {
280 backAction: Action {
282 iconName: backIsClose ? "close" : "back"
281 iconName: backIsClose ? "close" : "back"
@@ -326,7 +325,7 @@ Item {
326 right: parent.right
325 right: parent.right
327 verticalCenter: parent.verticalCenter
326 verticalCenter: parent.verticalCenter
328 }
327 }
329− text: header.title
328+ text: root.title
330 font.weight: header.fontWeight
329 font.weight: header.fontWeight
331 fontSize: header.fontSize
330 fontSize: header.fontSize
332 color: header.panelForegroundColor
331 color: header.panelForegroundColor
@@ -372,7 +371,7 @@ Item {
372 top: headerContainer.bottom
371 top: headerContainer.bottom
373 left: parent.left
372 left: parent.left
374 right: parent.right
373 right: parent.right
375− bottom: bottomContainer.top
374+ bottom: parent.bottom
376 }
375 }
377
376
378 color: root.scopeStyle ? root.scopeStyle.headerDividerColor : "#e0e0e0"
377 color: root.scopeStyle ? root.scopeStyle.headerDividerColor : "#e0e0e0"
@@ -413,7 +412,7 @@ Item {
413 id: bottomHighlight
412 id: bottomHighlight
414 visible: bottomBorder.visible
413 visible: bottomBorder.visible
415 anchors {
414 anchors {
416− top: bottomContainer.top
415+ top: parent.bottom
417 left: parent.left
416 left: parent.left
418 right: parent.right
417 right: parent.right
419 }
418 }
@@ -436,15 +435,4 @@ Item {
436 } else "#CCFFFFFF"
435 } else "#CCFFFFFF"
437 }
436 }
438 }
437 }
439−
440− Item {
441− id: bottomContainer
442−
443− anchors {
444− left: parent.left
445− right: parent.right
446− bottom: parent.bottom
447− }
448− height: childrenRect.height
449− }
450}
438}
qml/Dash/GenericScopeView.qml+2−1
@@ -626,7 +626,7 @@ FocusScope {
626 settingsEnabled: scopeView.scope && scopeView.scope.settings && scopeView.scope.settings.count > 0 || false
626 settingsEnabled: scopeView.scope && scopeView.scope.settings && scopeView.scope.settings.count > 0 || false
627 favoriteEnabled: scopeView.scope && scopeView.scope.id !== "clickscope"
627 favoriteEnabled: scopeView.scope && scopeView.scope.id !== "clickscope"
628 favorite: scopeView.scope && scopeView.scope.favorite
628 favorite: scopeView.scope && scopeView.scope.favorite
629− navigationTag: scopeView.scope && scopeView.scope.primaryNavigationTag
629+ navigationTag: scopeView.scope ? scopeView.scope.primaryNavigationTag : ""
630 scopeStyle: scopeView.scopeStyle
630 scopeStyle: scopeView.scopeStyle
631 paginationCount: scopeView.paginationCount
631 paginationCount: scopeView.paginationCount
632 paginationIndex: scopeView.paginationIndex
632 paginationIndex: scopeView.paginationIndex
@@ -669,6 +669,7 @@ FocusScope {
669
669
670 onDashNavigationLeafClicked: {
670 onDashNavigationLeafClicked: {
671 categoryView.pageHeader.closePopup();
671 categoryView.pageHeader.closePopup();
672+ categoryView.pageHeader.unfocus();
672 }
673 }
673 }
674 }
674 }
675 }
tests/qmltests/Dash/tst_DashContent.qml+4−4
@@ -215,7 +215,7 @@ Item {
215 verify(pageHeader, "Could not find the scope page header.");
215 verify(pageHeader, "Could not find the scope page header.");
216 var innerHeader = findChild(pageHeader, "innerPageHeader");
216 var innerHeader = findChild(pageHeader, "innerPageHeader");
217 verify(innerHeader, "Could not find the scope page header.");
217 verify(innerHeader, "Could not find the scope page header.");
218− compare(innerHeader.config.title, scopesModel.getScope(data.index).name);
218+ compare(innerHeader.config.contents.text, scopesModel.getScope(data.index).name);
219 }
219 }
220
220
221 function test_is_active_data() {
221 function test_is_active_data() {
@@ -285,7 +285,7 @@ Item {
285 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
285 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
286 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
286 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
287 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
287 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
288− var searchButton = findChild(dashContentList.currentItem, "search_header_button");
288+ var searchButton = findChild(dashContentList.currentItem, "search_action_button");
289 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
289 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
290 compare(peExtraPanel.visible, false);
290 compare(peExtraPanel.visible, false);
291 mouseClick(searchButton);
291 mouseClick(searchButton);
@@ -405,7 +405,7 @@ Item {
405 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
405 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
406 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
406 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
407 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
407 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
408− var searchButton = findChild(dashContentList.currentItem, "search_header_button");
408+ var searchButton = findChild(dashContentList.currentItem, "search_action_button");
409 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
409 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
410 compare(peExtraPanel.visible, false);
410 compare(peExtraPanel.visible, false);
411 mouseClick(searchButton);
411 mouseClick(searchButton);
@@ -497,7 +497,7 @@ Item {
497
497
498 function test_clearSearchWithNavigationClosed() {
498 function test_clearSearchWithNavigationClosed() {
499 var dashContentList = findChild(dashContent, "dashContentList");
499 var dashContentList = findChild(dashContent, "dashContentList");
500− var searchButton = findChild(dashContentList.currentItem, "search_header_button");
500+ var searchButton = findChild(dashContentList.currentItem, "search_action_button");
501 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
501 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
502 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
502 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
503
503
tests/qmltests/Dash/tst_GenericScopeView.qml+1−1
@@ -500,7 +500,7 @@ Item {
500 mouseClick(seeAll0);
500 mouseClick(seeAll0);
501 verify(category0.expanded);
501 verify(category0.expanded);
502 tryCompare(category0, "height", category0.item.expandedHeight + seeAll0.height);
502 tryCompare(category0, "height", category0.item.expandedHeight + seeAll0.height);
503− tryCompare(genericScopeView.categoryView, "contentY", units.gu(9));
503+ tryCompare(genericScopeView.categoryView, "contentY", units.gu(8));
504
504
505 scrollToEnd();
505 scrollToEnd();
506
506
tests/qmltests/Dash/tst_PreviewListView.qml+1−1
@@ -91,7 +91,7 @@ Rectangle {
91 var header = findChild(listView, "innerPageHeader");
91 var header = findChild(listView, "innerPageHeader");
92 verify(header, "Could not find the preview header");
92 verify(header, "Could not find the preview header");
93
93
94− compare(header.config.title, "Mock Scope");
94+ compare(header.config.contents.text, "Mock Scope");
95 }
95 }
96
96
97 function test_header_style() {
97 function test_header_style() {