@@ -213,6 +213,59 @@ Item {
213 tryCompare(dash, "visible", false);
213 tryCompare(dash, "visible", false);
217+ Regression test for bug https://bugs.launchpad.net/touch-preview-images/+bug/1193419
219+ When the user minimizes an application (left-edge swipe) he should always end up in the "Running Apps"
220+ category of the "Applications" scope view.
224+ - scroll to the bottom
225+ - reveal launcher and launch an app
226+ - perform long left edge swipe to go minimize the app and go back to the dash.
229+ - apps lens shown and Running Apps visible on screen
231+ function test_minimizingAppTakesToRunningApps() {
232+ var dashApps = findChild(shell, "DashApps");
234+ swipeUntilScopeViewIsReached(dashApps);
236+ // swipe finger up until the running/recent apps section (which we assume
237+ // it's the first one) is as far from view as possible.
238+ var appsCategoryListView = findChild(dashApps, "categoryListView");
239+ while (!appsCategoryListView.atYEnd) {
240+ swipeUpFromCenter();
241+ tryCompare(appsCategoryListView, "moving", false);
244+ // Switch away from the Applications scope.
245+ swipeRightFromCenter();
246+ waitUntilItemStopsMoving(dashApps);
247+ verify(!itemIsOnScreen(dashApps));
249+ dragLauncherIntoView();
251+ // Launch an app from the launcher
252+ tapOnAppIconInLauncher();
254+ waitUntilApplicationWindowIsFullyVisible();
256+ // Minimize the application we just launched
257+ swipeFromLeftEdge();
259+ // Wait for the whole UI to settle down
260+ waitUntilApplicationWindowIsFullyHidden();
261+ waitUntilItemStopsMoving(dashApps);
262+ tryCompare(appsCategoryListView, "moving", false);
264+ verify(itemIsOnScreen(dashApps));
265+ var runningApplicationsGrid = findChild(dashApps, "runningApplicationsGrid");
266+ verify(itemIsOnScreen(runningApplicationsGrid));
216 // Wait for the whole UI to settle down
269 // Wait for the whole UI to settle down
217 function waitForUIToSettle() {
270 function waitForUIToSettle() {
218 waitUntilApplicationWindowIsFullyHidden();
271 waitUntilApplicationWindowIsFullyHidden();