on xenial help sign in
Regression test for bug LP #1193419
3dbe6abDaniel d'Andrada
Dash/Apps/RunningApplicationsGrid.qml+1
@@ -20,6 +20,7 @@ import "../../Components"
20ResponsiveFlowView {
20ResponsiveFlowView {
21 id: root
21 id: root
22 clip: true
22 clip: true
23+ objectName: "runningApplicationsGrid"
23
24
24 signal updateScreenshots
25 signal updateScreenshots
25
26
Dash/DashApps.qml+1
@@ -24,6 +24,7 @@ import "Apps"
24
24
25GenericScopeView {
25GenericScopeView {
26 id: scopeView
26 id: scopeView
27+ objectName: "DashApps"
27
28
28 // FIXME: a way to aggregate these models would be ideal
29 // FIXME: a way to aggregate these models would be ideal
29 property var mainStageApplicationsModel: shell.applicationManager.mainStageApplications
30 property var mainStageApplicationsModel: shell.applicationManager.mainStageApplications
Dash/GenericScopeView.qml+1
@@ -45,6 +45,7 @@ ScopeView {
45
45
46 ScopeListView {
46 ScopeListView {
47 id: categoryView
47 id: categoryView
48+ objectName: "categoryListView"
48 anchors.fill: parent
49 anchors.fill: parent
49 model: scopeView.categories
50 model: scopeView.categories
50 forceNoClip: previewLoader.onScreen
51 forceNoClip: previewLoader.onScreen
tests/qmltests/tst_Shell.qml+53
@@ -213,6 +213,59 @@ Item {
213 tryCompare(dash, "visible", false);
213 tryCompare(dash, "visible", false);
214 }
214 }
215
215
216+ /*
217+ Regression test for bug https://bugs.launchpad.net/touch-preview-images/+bug/1193419
218+
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.
221+
222+ Steps:
223+ - go to apps lens
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.
227+
228+ Expected Results
229+ - apps lens shown and Running Apps visible on screen
230+ */
231+ function test_minimizingAppTakesToRunningApps() {
232+ var dashApps = findChild(shell, "DashApps");
233+
234+ swipeUntilScopeViewIsReached(dashApps);
235+
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);
242+ }
243+
244+ // Switch away from the Applications scope.
245+ swipeRightFromCenter();
246+ waitUntilItemStopsMoving(dashApps);
247+ verify(!itemIsOnScreen(dashApps));
248+
249+ dragLauncherIntoView();
250+
251+ // Launch an app from the launcher
252+ tapOnAppIconInLauncher();
253+
254+ waitUntilApplicationWindowIsFullyVisible();
255+
256+ // Minimize the application we just launched
257+ swipeFromLeftEdge();
258+
259+ // Wait for the whole UI to settle down
260+ waitUntilApplicationWindowIsFullyHidden();
261+ waitUntilItemStopsMoving(dashApps);
262+ tryCompare(appsCategoryListView, "moving", false);
263+
264+ verify(itemIsOnScreen(dashApps));
265+ var runningApplicationsGrid = findChild(dashApps, "runningApplicationsGrid");
266+ verify(itemIsOnScreen(runningApplicationsGrid));
267+ }
268+
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();