on xenial help sign in
update some tests
3493707Michael Zanetti
tests/qmltests/Dash/tst_DashShell.qml−29
@@ -112,34 +112,5 @@ Item {
112 mouseClick(buttonShowDashHome);
112 mouseClick(buttonShowDashHome);
113 tryCompare(dashContentList, "currentIndex", 0);
113 tryCompare(dashContentList, "currentIndex", 0);
114 }
114 }
115−
116− function test_setShortLauncherMoveResetNonActiveDash() {
117− var dashContentList = findChild(dash, "dashContentList");
118− var startX = dash.width - units.gu(1);
119− var startY = dash.height / 2;
120− var stopX = units.gu(1)
121− var stopY = startY;
122− waitForRendering(dashContentList);
123− touchFlick(dash, startX, startY, stopX, stopY);
124− touchFlick(dash, startX, startY, stopX, stopY);
125− compare(dashContentList.currentIndex, 2, "Could not flick to scope id 2");
126−
127− // Pretend the dash is not active
128− dash.windowActive = false;
129−
130− // Flick the greeter away
131− var startX = shell.width - units.gu(1);
132− var startY = shell.height / 2;
133− var stopX = units.gu(1)
134− var stopY = startY;
135− touchFlick(shell, startX, startY, stopX, stopY);
136−
137− var greeter = findChild(shell, "greeter");
138− tryCompare(greeter, "shown", false);
139−
140− // Now do a small launcher movement
141− touchFlick(shell, stopX, startY, startX, stopY);
142− compare(dashContentList.currentIndex, 0, "Small launcher move did not reset dash on non active window");
143− }
144 }
115 }
145}
116}
tests/qmltests/Stage/tst_PhoneStage.qml−26
@@ -334,32 +334,6 @@ Item {
334 tryCompare(firstApp, "focused", true);
334 tryCompare(firstApp, "focused", true);
335 }
335 }
336
336
337− function test_leftEdge_data() {
338− return [
339− { tag: "normal", inSpread: false, leftEdgeDragWidth: units.gu(20), shouldMoveApp: true },
340− { tag: "inSpread", inSpread: true, leftEdgeDragWidth: units.gu(5), shouldMoveApp: false }
341− ]
342− }
343−
344− function test_leftEdge(data) {
345− addApps(2);
346−
347− if (data.inSpread) {
348− performEdgeSwipeToShowAppSpread();
349− }
350−
351− var focusedDelegate = findChild(stage, "appDelegate_" + topLevelSurfaceList.idAt(0));
352− var currentX = focusedDelegate.x;
353−
354− stage.leftEdgeDragProgress = data.leftEdgeDragWidth;
355−
356− tryCompare(focusedDelegate, "x", data.shouldMoveApp ? data.leftEdgeDragWidth : currentX);
357−
358− stage.leftEdgeDragProgress = 0;
359−
360− tryCompare(focusedDelegate, "x", currentX);
361− }
362−
363 function test_focusedAppIsTheOnlyRunningApp() {
337 function test_focusedAppIsTheOnlyRunningApp() {
364 addApps(2);
338 addApps(2);
365
339
tests/qmltests/tst_OrientedShell.qml+1−13
@@ -999,7 +999,7 @@ Rectangle {
999 var rotationStates = findInvisibleChild(orientedShell, "rotationStates");
999 var rotationStates = findInvisibleChild(orientedShell, "rotationStates");
1000 waitUntilTransitionsEnd(rotationStates);
1000 waitUntilTransitionsEnd(rotationStates);
1001
1001
1002− performLeftEdgeSwipeToSwitchToDash();
1002+ ApplicationManager.requestFocusApplication("unity8-dash");
1003
1003
1004 // Should be back to portrait
1004 // Should be back to portrait
1005 tryCompare(shell, "transformRotationAngle", 0);
1005 tryCompare(shell, "transformRotationAngle", 0);
@@ -1391,18 +1391,6 @@ Rectangle {
1391 waitUntilTransitionsEnd(rotationStates);
1391 waitUntilTransitionsEnd(rotationStates);
1392 }
1392 }
1393
1393
1394− function performLeftEdgeSwipeToSwitchToDash() {
1395− var swipeLength = shell.width * 0.7;
1396−
1397− var touchStartX = 1;
1398− var touchStartY = shell.height / 2;
1399− touchFlick(shell,
1400− touchStartX, touchStartY,
1401− touchStartX + swipeLength, touchStartY);
1402−
1403− tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
1404− }
1405−
1406 function performEdgeSwipeToSwitchToPreviousApp() {
1394 function performEdgeSwipeToSwitchToPreviousApp() {
1407 // swipe just enough to ensure an app switch action.
1395 // swipe just enough to ensure an app switch action.
1408 // If we swipe too much we will trigger the spread mode
1396 // If we swipe too much we will trigger the spread mode