on xenial help sign in
Fix tst_Panel
commit9f1dbb6e0e9da748389d789d7d08989b63930ed0 authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateFri 2 Dec 2016, 11:25 (10 years ago) parentb74d6f6
1 file changed+8−1
tests/qmltests/Panel/tst_Panel.qml+8−1
tests/qmltests/Panel/tst_Panel.qml+8−1
@@ -33,6 +33,8 @@ IndicatorTest {
3333
3434 Component.onCompleted: theme.name = "Ubuntu.Components.Themes.SuruDark"
3535
36+ SurfaceManager {}
37+
3638 Binding {
3739 target: mouseEmulation
3840 property: "checked"
@@ -470,7 +472,9 @@ IndicatorTest {
470472
471473 callManager.foregroundCall = phoneCall;
472474
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();
474478 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
475479
476480 mouseClick(panel.indicators,
@@ -479,6 +483,9 @@ IndicatorTest {
479483
480484 compare(panel.indicators.shown, false);
481485 verify(panel.indicators.fullyClosed);
486+
487+ // clean up
488+ ApplicationManager.stopApplication("unity8-dash");
482489 }
483490
484491 function test_openAndClosePanelWithMouseClicks() {