on xenial help sign in
Fix up Shell AP test to use new AppMan API
98f1c54Gerry Boland
tests/qmltests/tst_Shell.qml+7−7
@@ -66,16 +66,16 @@ Item {
66 }
66 }
67
67
68 // kill all (fake) running apps
68 // kill all (fake) running apps
69− killApps(ApplicationManager.mainStageApplications);
69+ killApps(ApplicationManager.applications);
70− killApps(ApplicationManager.sideStageApplications);
71
70
72 var dashHome = findChild(shell, "DashHome");
71 var dashHome = findChild(shell, "DashHome");
73 swipeUntilScopeViewIsReached(dashHome);
72 swipeUntilScopeViewIsReached(dashHome);
74 }
73 }
75
74
76 function killApps(apps) {
75 function killApps(apps) {
76+ if (!apps) return;
77 while (apps.count > 0) {
77 while (apps.count > 0) {
78− ApplicationManager.stopProcess(apps.get(0));
78+ ApplicationManager.stopApplication(apps.get(0));
79 }
79 }
80 }
80 }
81
81
@@ -122,8 +122,8 @@ Item {
122 tapOnAppIconInLauncher();
122 tapOnAppIconInLauncher();
123 waitUntilApplicationWindowIsFullyVisible();
123 waitUntilApplicationWindowIsFullyVisible();
124
124
125− var mainApp = ApplicationManager.mainStageFocusedApplication;
125+ var mainApp = ApplicationManager.focusedApplicationId;
126− tryCompareFunction(function() { return mainApp != null; }, true);
126+ tryCompareFunction(function() { return mainApp != ""; }, true);
127
127
128 // Try to suspend while proximity is engaged...
128 // Try to suspend while proximity is engaged...
129 Powerd.displayPowerStateChange(Powerd.Off, Powerd.UseProximity);
129 Powerd.displayPowerStateChange(Powerd.Off, Powerd.UseProximity);
@@ -132,11 +132,11 @@ Item {
132 // Now really suspend
132 // Now really suspend
133 Powerd.displayPowerStateChange(Powerd.Off, 0);
133 Powerd.displayPowerStateChange(Powerd.Off, 0);
134 tryCompare(greeter, "showProgress", 1);
134 tryCompare(greeter, "showProgress", 1);
135− tryCompare(ApplicationManager, "mainStageFocusedApplication", null);
135+ tryCompare(ApplicationManager, "focusedApplicationId", "");
136
136
137 // And wake up
137 // And wake up
138 Powerd.displayPowerStateChange(Powerd.On, 0);
138 Powerd.displayPowerStateChange(Powerd.On, 0);
139− tryCompare(ApplicationManager, "mainStageFocusedApplication", mainApp);
139+ tryCompare(ApplicationManager, "focusedApplicationId", mainApp);
140 tryCompare(greeter, "showProgress", 1);
140 tryCompare(greeter, "showProgress", 1);
141 }
141 }
142
142