on xenial help sign in
Fixed Panel tests
3e5d92aNick Dedekind
qml/Panel/Panel.qml+1−3
@@ -194,9 +194,7 @@ Item {
194 }
194 }
195 height: indicators.panelHeight
195 height: indicators.panelHeight
196
196
197− mouseArea {
198− onClicked: root.searchClicked()
197+ onClicked: root.searchClicked()
199− }
200 }
198 }
201
199
202 ActiveCallHint {
200 ActiveCallHint {
qml/Panel/SearchIndicator.qml+3−2
@@ -25,12 +25,13 @@ Item {
25 height: units.gu(3)
25 height: units.gu(3)
26
26
27 property string headerText: i18n.tr("Search")
27 property string headerText: i18n.tr("Search")
28− readonly property alias mouseArea: __mouseArea
28+
29+ signal clicked
29
30
30 // eater
31 // eater
31 MouseArea {
32 MouseArea {
32− id: __mouseArea
33 anchors.fill: parent
33 anchors.fill: parent
34+ onClicked: search.clicked()
34 }
35 }
35
36
36 Row {
37 Row {
tests/qmltests/Panel/tst_Panel.qml+12−16
@@ -57,10 +57,6 @@ Item {
57 }
57 }
58
58
59 property real panelAndSeparatorHeight: panel.indicators.panelHeight + units.dp(2)
59 property real panelAndSeparatorHeight: panel.indicators.panelHeight + units.dp(2)
60−
61− Component.onCompleted: {
62− callManager.foregroundCall = phoneCall;
63− }
64 }
60 }
65
61
66
62
@@ -110,10 +106,10 @@ Item {
110 width: parent.width/3
106 width: parent.width/3
111
107
112 onClicked: {
108 onClicked: {
113− if (callManager.callIndicatorVisible) {
109+ if (callManager.foregroundCall) {
114− callManager.callIndicatorVisible = false;
110+ callManager.foregroundCall = null;
115 } else {
111 } else {
116− callManager.callIndicatorVisible = true;
112+ callManager.foregroundCall = phoneCall;
117 }
113 }
118 }
114 }
119 }
115 }
@@ -136,7 +132,7 @@ Item {
136 panel.indicators.hide();
132 panel.indicators.hide();
137 // Wait for animation to complete
133 // Wait for animation to complete
138 tryCompare(panel.indicators.hideAnimation, "running", false);
134 tryCompare(panel.indicators.hideAnimation, "running", false);
139− callManager.callIndicatorVisible = false;
135+ callManager.foregroundCall = null;
140
136
141 // Wait for the indicators to get into position.
137 // Wait for the indicators to get into position.
142 // (switches between normal and fullscreen modes are animated)
138 // (switches between normal and fullscreen modes are animated)
@@ -207,7 +203,7 @@ Item {
207 // Pressing on the top edge of the indicator should have no effect if the panel
203 // Pressing on the top edge of the indicator should have no effect if the panel
208 // has an active call
204 // has an active call
209 function test_noHintOnActiveCall() {
205 function test_noHintOnActiveCall() {
210− callManager.callIndicatorVisible = true;
206+ callManager.foregroundCall = phoneCall;
211
207
212 var indicatorItemCoord = get_indicator_item_position(0);
208 var indicatorItemCoord = get_indicator_item_position(0);
213
209
@@ -228,17 +224,17 @@ Item {
228
224
229 function test_drag_show_data() {
225 function test_drag_show_data() {
230 return [
226 return [
231− { tag: "pinned", fullscreenFlag: false, alreadyOpen: false, call: false,
227+ { tag: "pinned", fullscreenFlag: false, alreadyOpen: false, call: null,
232 indicatorY: 0 },
228 indicatorY: 0 },
233− { tag: "fullscreen", fullscreenFlag: true, alreadyOpen: false, call: false,
229+ { tag: "fullscreen", fullscreenFlag: true, alreadyOpen: false, call: null,
234 indicatorY: -panel.panelAndSeparatorHeight },
230 indicatorY: -panel.panelAndSeparatorHeight },
235− { tag: "pinned-alreadyOpen", fullscreenFlag: false, alreadyOpen: true, call: false,
231+ { tag: "pinned-alreadyOpen", fullscreenFlag: false, alreadyOpen: true, call: null,
236 indicatorY: 0 },
232 indicatorY: 0 },
237− { tag: "fullscreen-alreadyOpen", fullscreenFlag: true, alreadyOpen: true, call: false,
233+ { tag: "fullscreen-alreadyOpen", fullscreenFlag: true, alreadyOpen: true, call: null,
238 indicatorY: 0 },
234 indicatorY: 0 },
239− { tag: "pinned-callActive", fullscreenFlag: false, alreadyOpen: false, call: true,
235+ { tag: "pinned-callActive", fullscreenFlag: false, alreadyOpen: false, call: phoneCall,
240 indicatorY: 0},
236 indicatorY: 0},
241− { tag: "fullscreen-callActive", fullscreenFlag: true, alreadyOpen: false, call: true,
237+ { tag: "fullscreen-callActive", fullscreenFlag: true, alreadyOpen: false, call: phoneCall,
242 indicatorY: -panel.panelAndSeparatorHeight }
238 indicatorY: -panel.panelAndSeparatorHeight }
243 ];
239 ];
244 }
240 }
@@ -248,7 +244,7 @@ Item {
248 // expose more of the panel, binding it to the selected indicator and opening it's menu.
244 // expose more of the panel, binding it to the selected indicator and opening it's menu.
249 function test_drag_show(data) {
245 function test_drag_show(data) {
250 panel.fullscreenMode = data.fullscreenFlag;
246 panel.fullscreenMode = data.fullscreenFlag;
251− callManager.callIndicatorVisible = data.call;
247+ callManager.foregroundCall = data.call;
252
248
253 if (data.alreadyOpen) {
249 if (data.alreadyOpen) {
254 panel.indicators.show();
250 panel.indicators.show();