on xenial help sign in
Fix up Shell AP test to use new AppMan API
commit98f1c54a41ede157e119b586754298eb0cbd7e68 authorGerry Boland <gerry.boland@canonical.com> dateThu 5 Sep 2013, 16:45 (13 years ago) parentfebd475
1 file changed+7−7
tests/qmltests/tst_Shell.qml+7−7
tests/qmltests/tst_Shell.qml+7−7
@@ -66,16 +66,16 @@ Item {
6666 }
6767
6868 // kill all (fake) running apps
69− killApps(ApplicationManager.mainStageApplications);
70− killApps(ApplicationManager.sideStageApplications);
69+ killApps(ApplicationManager.applications);
7170
7271 var dashHome = findChild(shell, "DashHome");
7372 swipeUntilScopeViewIsReached(dashHome);
7473 }
7574
7675 function killApps(apps) {
76+ if (!apps) return;
7777 while (apps.count > 0) {
78− ApplicationManager.stopProcess(apps.get(0));
78+ ApplicationManager.stopApplication(apps.get(0));
7979 }
8080 }
8181
@@ -122,8 +122,8 @@ Item {
122122 tapOnAppIconInLauncher();
123123 waitUntilApplicationWindowIsFullyVisible();
124124
125− var mainApp = ApplicationManager.mainStageFocusedApplication;
126− tryCompareFunction(function() { return mainApp != null; }, true);
125+ var mainApp = ApplicationManager.focusedApplicationId;
126+ tryCompareFunction(function() { return mainApp != ""; }, true);
127127
128128 // Try to suspend while proximity is engaged...
129129 Powerd.displayPowerStateChange(Powerd.Off, Powerd.UseProximity);
@@ -132,11 +132,11 @@ Item {
132132 // Now really suspend
133133 Powerd.displayPowerStateChange(Powerd.Off, 0);
134134 tryCompare(greeter, "showProgress", 1);
135− tryCompare(ApplicationManager, "mainStageFocusedApplication", null);
135+ tryCompare(ApplicationManager, "focusedApplicationId", "");
136136
137137 // And wake up
138138 Powerd.displayPowerStateChange(Powerd.On, 0);
139− tryCompare(ApplicationManager, "mainStageFocusedApplication", mainApp);
139+ tryCompare(ApplicationManager, "focusedApplicationId", mainApp);
140140 tryCompare(greeter, "showProgress", 1);
141141 }
142142