on xenial help sign in
Fix tst_Panel
9f1dbb6Daniel d'Andrada
tests/qmltests/Panel/tst_Panel.qml+8−1
@@ -33,6 +33,8 @@ IndicatorTest {
33
33
34 Component.onCompleted: theme.name = "Ubuntu.Components.Themes.SuruDark"
34 Component.onCompleted: theme.name = "Ubuntu.Components.Themes.SuruDark"
35
35
36+ SurfaceManager {}
37+
36 Binding {
38 Binding {
37 target: mouseEmulation
39 target: mouseEmulation
38 property: "checked"
40 property: "checked"
@@ -470,7 +472,9 @@ IndicatorTest {
470
472
471 callManager.foregroundCall = phoneCall;
473 callManager.foregroundCall = phoneCall;
472
474
473− MirFocusController.focusedSurface = ApplicationManager.findApplication("unity8-dash").surfaceList.get(0);
475+ var dashApp = ApplicationManager.startApplication("unity8-dash");
476+ tryCompare(dashApp.surfaceList, "count", 1);
477+ dashApp.surfaceList.get(0).activate();
474 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
478 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
475
479
476 mouseClick(panel.indicators,
480 mouseClick(panel.indicators,
@@ -479,6 +483,9 @@ IndicatorTest {
479
483
480 compare(panel.indicators.shown, false);
484 compare(panel.indicators.shown, false);
481 verify(panel.indicators.fullyClosed);
485 verify(panel.indicators.fullyClosed);
486+
487+ // clean up
488+ ApplicationManager.stopApplication("unity8-dash");
482 }
489 }
483
490
484 function test_openAndClosePanelWithMouseClicks() {
491 function test_openAndClosePanelWithMouseClicks() {