Merge lp:~dandrader/unity8/launcherOverGreeter-lp1393447 into lp:unity8

Proposed by Daniel d'Andrada on 2015-01-21
Status: Merged
Approved by: Albert Astals Cid on 2015-02-04
Approved revision: 1563
Merged at revision: 1590
Proposed branch: lp:~dandrader/unity8/launcherOverGreeter-lp1393447
Merge into: lp:unity8
Diff against target: 70 lines (+49/-1)
2 files modified
qml/Shell.qml (+1/-1)
tests/qmltests/tst_ShellWithPin.qml (+48/-0)
To merge this branch: bzr merge lp:~dandrader/unity8/launcherOverGreeter-lp1393447
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing on 2015-02-05
Albert Astals Cid (community) 2015-01-21 Approve on 2015-02-04
Review via email: mp+247183@code.launchpad.net

Commit Message

Don't show() the lockscreen if it's already being shown

As is has the side-effect of hiding the launcher and indicators panel.

Description of the Change

* Are there any related MPs required for this MP to build/function as expected? Please list.
No.

* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes.

* Did you make sure that your branch does not contain spurious tags?
Yes.

* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
Not applicable.

* If you changed the UI, has there been a design review?
Not applicable.

To post a comment you must log in.
Michael Terry (mterry) :
1563. By Daniel d'Andrada on 2015-01-22

Simplify test code

Daniel d'Andrada (dandrader) wrote :

Updated code and replied to all comments.

Albert Astals Cid (aacid) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

 * Did CI run pass? If not, please explain why.
No, lots of failures, i think not related to this branch, i'll retrigger it and top approve if goes back to normal (i.e. they were a problem in master when this branch run)

 * Did you make sure that the branch does not contain spurious tags?
Yes

review: Approve
Albert Astals Cid (aacid) wrote :

autopilot didn't run because of ICE on the arm compiler but there's no autopilot tests for this and the qmluitests are back to the known issues so top approving

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Shell.qml'
2--- qml/Shell.qml 2015-01-21 18:33:00 +0000
3+++ qml/Shell.qml 2015-01-22 07:58:34 +0000
4@@ -411,7 +411,7 @@
5 onShownChanged: if (shown) greeter.lockedApp = ""
6
7 function maybeShow() {
8- if (!shell.forcedUnlock) {
9+ if (!shell.forcedUnlock && !shown) {
10 showNow();
11 }
12 }
13
14=== modified file 'tests/qmltests/tst_ShellWithPin.qml'
15--- tests/qmltests/tst_ShellWithPin.qml 2014-12-09 17:14:35 +0000
16+++ tests/qmltests/tst_ShellWithPin.qml 2015-01-22 07:58:34 +0000
17@@ -503,5 +503,53 @@
18 var lockscreen = findChild(shell, "lockscreen");
19 verify(lockscreen.shown);
20 }
21+
22+ /*
23+ Regression test for https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1393447
24+
25+ Do a left edge drag that is long enough to start displacing the greeter
26+ but short engough so that the greeter comes back into place once the
27+ finger is lifted.
28+
29+ In this situation the launcher should remaing fully shown and hide itself
30+ only after its idle timeout is triggered.
31+ */
32+ function test_shortLeftEdgeSwipeMakesLauncherStayVisible() {
33+ var greeter = testCase.findChild(shell, "greeter")
34+ greeter.show();
35+ tryCompare(greeter, "showProgress", 1);
36+
37+ var launcher = testCase.findChild(shell, "launcher")
38+ {
39+ var dismissTimer = testCase.findInvisibleChild(launcher, "dismissTimer");
40+ // effectively disable the dismiss timer
41+ dismissTimer.interval = 24 * 60 * 60 * 1000 // 24 hours
42+ }
43+ var launcherPanel = testCase.findChild(launcher, "launcherPanel");
44+
45+ var toX = shell.width * 0.45;
46+ touchFlick(shell,
47+ 1 /* fromX */, shell.height * 0.5 /* fromY */,
48+ toX /* toX */, shell.height * 0.5 /* toY */,
49+ true /* beginTouch */, false /* endTouch */,
50+ 50, 100);
51+
52+ // Launcher must be fully shown by now
53+ tryCompare(launcherPanel, "x", 0);
54+
55+ // Greeter should be displaced
56+ tryCompareFunction(function() { return greeter.mapToItem(shell, 0, 0).x > shell.width*0.2; }, true);
57+
58+ touchRelease(shell, toX, shell.height * 0.5);
59+
60+ // Upon release the greeter should have slid back into full view
61+ tryCompareFunction(function() { return greeter.mapToItem(shell, 0, 0).x === 0; }, true);
62+
63+ // And the launcher should stay fully shown
64+ for (var i = 0; i < 10; ++i) {
65+ wait(50);
66+ compare(launcherPanel.x, 0);
67+ }
68+ }
69 }
70 }

Subscribers

People subscribed via source and target branches