on xenial help sign in
add a test
commit3b24aad8a38234385679dae97925447cda5791e1 authorMichael Zanetti <michael.zanetti@canonical.com> dateMon 8 Dec 2014, 12:07 (12 years ago) parent99bb8c4
1 file changed+24
tests/qmltests/Stages/tst_PhoneStage.qml+24
tests/qmltests/Stages/tst_PhoneStage.qml+24
@@ -387,5 +387,29 @@ Item {
387387 compare(dragArea1.enabled, false);
388388 compare(dragArea2.enabled, false);
389389 }
390+
391+ function test_leftEdge_data() {
392+ return [
393+ { tag: "normal", inSpread: false, leftEdgeDragWidth: units.gu(5), shouldMoveApp: true },
394+ { tag: "inSpread", inSpread: true, leftEdgeDragWidth: units.gu(5), shouldMoveApp: false }
395+ ]
396+ }
397+
398+ function test_leftEdge(data) {
399+ addApps(2);
400+
401+ if (data.inSpread) {
402+ goToSpread();
403+ }
404+
405+ var focusedDelegate = findChild(phoneStage, "appDelegate0");
406+ phoneStage.inverseProgress = data.leftEdgeDragWidth;
407+
408+ tryCompare(focusedDelegate, "x", data.shouldMoveApp ? data.leftEdgeDragWidth : 0);
409+
410+ phoneStage.inverseProgress = 0;
411+
412+ tryCompare(focusedDelegate, "x", units.gu(0));
413+ }
390414 }
391415}