on xenial help sign in
fixed tests
b2d121aNick Dedekind
qml/Panel/ActiveCallHint.qml+1−6
@@ -33,12 +33,7 @@ Item {
33 }
33 }
34
34
35 function activate() {
35 function activate() {
36− ApplicationManager.requestFocusApplication("dialer-app");
36+ Qt.openUrlExternally("dialer:///?view=liveCall");
37− }
38−
39− MouseArea {
40− anchors.fill: parent
41− onClicked: activate()
42 }
37 }
43
38
44 Component {
39 Component {
qml/Panel/Panel.qml+11
@@ -128,6 +128,17 @@ Item {
128 saturation: 1 - indicators.unitProgress
128 saturation: 1 - indicators.unitProgress
129 }
129 }
130
130
131+ MouseArea {
132+ anchors {
133+ top: parent.top
134+ left: parent.left
135+ right: indicators.left
136+ }
137+ height: indicators.panelHeight
138+ enabled: callHint.visible
139+ onClicked: callHint.activate()
140+ }
141+
131 Indicators {
142 Indicators {
132 id: __indicators
143 id: __indicators
133 objectName: "indicators"
144 objectName: "indicators"
tests/qmltests/Panel/tst_ActiveCallHint.qml+2−2
@@ -48,7 +48,7 @@ Item {
48 right:parent.right
48 right:parent.right
49 }
49 }
50 height: units.gu(3)
50 height: units.gu(3)
51− alternateLabelInterval: 2000
51+ labelSwitchInterval: 2000
52 }
52 }
53
53
54 Component.onCompleted: {
54 Component.onCompleted: {
@@ -67,7 +67,7 @@ Item {
67 function init() {
67 function init() {
68 callManager.foregroundCall = null;
68 callManager.foregroundCall = null;
69 callManager.backgroundCall = null;
69 callManager.backgroundCall = null;
70− callHint.alternateLabelInterval = 300;
70+ callHint.labelSwitchInterval = 300;
71 }
71 }
72
72
73 function test_activeHint_data() {
73 function test_activeHint_data() {
tests/qmltests/Panel/tst_Panel.qml+19−20
@@ -59,6 +59,10 @@ Item {
59 onSearchClicked: console.log("Search Clicked")
59 onSearchClicked: console.log("Search Clicked")
60
60
61 property real panelAndSeparatorHeight: panel.indicators.panelHeight + units.dp(2)
61 property real panelAndSeparatorHeight: panel.indicators.panelHeight + units.dp(2)
62+
63+ Component.onCompleted: {
64+ callManager.foregroundCall = phoneCall;
65+ }
62 }
66 }
63
67
64
68
@@ -108,11 +112,10 @@ Item {
108 width: parent.width/3
112 width: parent.width/3
109
113
110 onClicked: {
114 onClicked: {
111− if (callManager.hasCalls) {
115+ if (callManager.callIndicatorVisible) {
112− callManager.foregroundCall = null;
116+ callManager.callIndicatorVisible = false;
113− callManager.backgroundCall = null;
114 } else {
117 } else {
115− callManager.foregroundCall = phoneCall;
118+ callManager.callIndicatorVisible = true;
116 }
119 }
117 }
120 }
118 }
121 }
@@ -135,7 +138,7 @@ Item {
135 panel.indicators.hide();
138 panel.indicators.hide();
136 // Wait for animation to complete
139 // Wait for animation to complete
137 tryCompare(panel.indicators.hideAnimation, "running", false);
140 tryCompare(panel.indicators.hideAnimation, "running", false);
138− callManager.foregroundCall = null;
141+ callManager.callIndicatorVisible = false;
139
142
140 // Wait for the indicators to get into position.
143 // Wait for the indicators to get into position.
141 // (switches between normal and fullscreen modes are animated)
144 // (switches between normal and fullscreen modes are animated)
@@ -206,11 +209,7 @@ Item {
206 // Pressing on the top edge of the indicator should have no effect if the panel
209 // Pressing on the top edge of the indicator should have no effect if the panel
207 // has an active call
210 // has an active call
208 function test_noHintOnActiveCall() {
211 function test_noHintOnActiveCall() {
209− callManager.foregroundCall = phoneCall;
212+ callManager.callIndicatorVisible = true;
210− // Wait for the indicators to get into position.
211− // (switches between normal and fullscreen modes are animated)
212− var indicatorArea = findChild(panel, "indicatorArea");
213− tryCompare(indicatorArea, "y", panel.callHint.height);
214
213
215 var indicatorItemCoord = get_indicator_item_position(0);
214 var indicatorItemCoord = get_indicator_item_position(0);
216
215
@@ -231,18 +230,18 @@ Item {
231
230
232 function test_drag_show_data() {
231 function test_drag_show_data() {
233 return [
232 return [
234− { tag: "pinned", fullscreenFlag: false, alreadyOpen: false, call: null,
233+ { tag: "pinned", fullscreenFlag: false, alreadyOpen: false, call: false,
235 indicatorY: function() { return 0 } },
234 indicatorY: function() { return 0 } },
236− { tag: "fullscreen", fullscreenFlag: true, alreadyOpen: false, call: null,
235+ { tag: "fullscreen", fullscreenFlag: true, alreadyOpen: false, call: false,
237 indicatorY: function() {return -panel.panelAndSeparatorHeight } },
236 indicatorY: function() {return -panel.panelAndSeparatorHeight } },
238− { tag: "pinned-alreadyOpen", fullscreenFlag: false, alreadyOpen: true, call: null,
237+ { tag: "pinned-alreadyOpen", fullscreenFlag: false, alreadyOpen: true, call: false,
239 indicatorY: function() { return 0 } },
238 indicatorY: function() { return 0 } },
240− { tag: "fullscreen-alreadyOpen", fullscreenFlag: true, alreadyOpen: true, call: null,
239+ { tag: "fullscreen-alreadyOpen", fullscreenFlag: true, alreadyOpen: true, call: false,
241− indicatorY: function() {return -panel.panelAndSeparatorHeight } },
240+ indicatorY: function() {return 0 } },
242− { tag: "pinned-callActive", fullscreenFlag: false, alreadyOpen: false, call: phoneCall,
241+ { tag: "pinned-callActive", fullscreenFlag: false, alreadyOpen: false, call: true,
243− indicatorY: function() { return panel.callHint.height } },
242+ indicatorY: function() { return 0 } },
244− { tag: "fullscreen-callActive", fullscreenFlag: true, alreadyOpen: false, call: phoneCall,
243+ { tag: "fullscreen-callActive", fullscreenFlag: true, alreadyOpen: false, call: true,
245− indicatorY: function() { return panel.callHint.height - panel.panelAndSeparatorHeight } }
244+ indicatorY: function() { return -panel.panelAndSeparatorHeight } }
246 ];
245 ];
247 }
246 }
248
247
@@ -251,7 +250,7 @@ Item {
251 // expose more of the panel, binding it to the selected indicator and opening it's menu.
250 // expose more of the panel, binding it to the selected indicator and opening it's menu.
252 function test_drag_show(data) {
251 function test_drag_show(data) {
253 panel.fullscreenMode = data.fullscreenFlag;
252 panel.fullscreenMode = data.fullscreenFlag;
254− callManager.foregroundCall = data.call;
253+ callManager.callIndicatorVisible = data.call;
255
254
256 if (data.alreadyOpen) {
255 if (data.alreadyOpen) {
257 panel.indicators.show();
256 panel.indicators.show();