on xenial help sign in
more test fixes
7fcc1fbNick Dedekind
tests/qmltests/Panel/tst_Panel.qml+6−5
@@ -249,6 +249,7 @@ PanelTest {
249 }
249 }
250
250
251 function init() {
251 function init() {
252+ panel.mode = "staged";
252 panel.fullscreenMode = false;
253 panel.fullscreenMode = false;
253 callManager.foregroundCall = null;
254 callManager.foregroundCall = null;
254
255
@@ -501,12 +502,10 @@ PanelTest {
501 function test_tapNearTopEdgeWithPanelInFullscreenMode() {
502 function test_tapNearTopEdgeWithPanelInFullscreenMode() {
502 var indicatorArea = findChild(panel, "indicatorArea");
503 var indicatorArea = findChild(panel, "indicatorArea");
503 verify(indicatorArea);
504 verify(indicatorArea);
504− var panelPriv = findInvisibleChild(panel, "panelPriv");
505− verify(panelPriv);
506
505
507 panel.fullscreenMode = true;
506 panel.fullscreenMode = true;
508 // wait until if finishes hiding itself
507 // wait until if finishes hiding itself
509− tryCompare(indicatorArea, "y", -panelPriv.indicatorHeight);
508+ tryCompare(indicatorArea, "y", -panel.minimizedPanelHeight);
510
509
511 compare(panel.indicators.shown, false);
510 compare(panel.indicators.shown, false);
512 verify(panel.indicators.fullyClosed);
511 verify(panel.indicators.fullyClosed);
@@ -563,13 +562,15 @@ PanelTest {
563
562
564 // https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1611959
563 // https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1611959
565 function test_windowControlButtonsFittsLaw() {
564 function test_windowControlButtonsFittsLaw() {
565+ panel.mode = "windowed";
566+ var windowControlArea = findChild(panel, "windowControlArea");
567+ verify(windowControlArea, "Window control area should have been created in windowed mode")
568+
566 var buttonsVisible = PanelState.decorationsVisible;
569 var buttonsVisible = PanelState.decorationsVisible;
567 PanelState.decorationsVisible = true;
570 PanelState.decorationsVisible = true;
568 // click in very topleft corner and verify the close button got clicked too
571 // click in very topleft corner and verify the close button got clicked too
569− wait(1000)
570 mouseMove(panel, 0, 0);
572 mouseMove(panel, 0, 0);
571 mouseClick(panel, 0, 0, undefined /*button*/, undefined /*modifiers*/, 100 /*short delay*/);
573 mouseClick(panel, 0, 0, undefined /*button*/, undefined /*modifiers*/, 100 /*short delay*/);
572− wait(1000)
573 compare(windowControlButtonsSpy.count, 1);
574 compare(windowControlButtonsSpy.count, 1);
574 PanelState.decorationsVisible = buttonsVisible;
575 PanelState.decorationsVisible = buttonsVisible;
575 }
576 }