Merge lp:~unity-team/unity8/notify-authenticated into lp:unity8

Proposed by Michał Sawicz
Status: Merged
Approved by: Michał Sawicz
Approved revision: 1165
Merged at revision: 1191
Proposed branch: lp:~unity-team/unity8/notify-authenticated
Merge into: lp:unity8
Prerequisite: lp:~unity-team/unity8/sim-unlock-on-boot
Diff against target: 61 lines (+15/-1)
3 files modified
plugins/LightDM/Greeter.cpp (+2/-0)
plugins/LightDM/Greeter.h (+2/-1)
tests/qmltests/tst_Shell.qml (+11/-0)
To merge this branch: bzr merge lp:~unity-team/unity8/notify-authenticated
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Albert Astals Cid Pending
Review via email: mp+231846@code.launchpad.net

This proposal supersedes a proposal from 2014-08-21.

Commit message

Always keep indicator/launcher locked state in sync with whether the user is authenticated. (LP:# 1357230)

Description of the change

Always keep indicator/launcher locked state in sync with whether the user is authenticated. (LP:# 1357230)

One of the properties used to determine whether the shell is locked was not notifiable for qml. This branch fixes that.

== Checklist ==

 * 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?
 - NA

 * If you changed the UI, has there been a design review?
 - NA

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Test and fixes the issue.

Do you think an auto test for this makes sense?

review: Needs Information
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

> Do you think an auto test for this makes sense?

I didn't think so, because it felt like testing too small a piece. Like, we don't generally have tests to make sure a NOTIFY call works for other properties.

That said, I'd be happy to add one.

Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Sure, i didn't mean testing the signal works, that we know, i mean something like testing that the swiping of the greeter works.

Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

There is a test added in https://code.launchpad.net/~mterry/unity8/interactive-while-locked/+merge/231253 for checking whether the indicators and/or launcher are enabled by default and respond to changes.

Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

OK, added a test to check the unlocked property and whether the edges are enabled as they should be.

Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

* 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.
Yes

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

Resubmitting to rebase on sim-unlock-on-boot. I'll carry the top-approval over.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/LightDM/Greeter.cpp'
2--- plugins/LightDM/Greeter.cpp 2014-08-01 13:42:18 +0000
3+++ plugins/LightDM/Greeter.cpp 2014-08-22 09:20:28 +0000
4@@ -106,6 +106,7 @@
5 }
6
7 d->m_greeter->authenticate(username);
8+ Q_EMIT isAuthenticatedChanged();
9 Q_EMIT authenticationUserChanged(username);
10 }
11
12@@ -150,5 +151,6 @@
13 Q_EMIT promptlessChanged();
14 }
15
16+ Q_EMIT isAuthenticatedChanged();
17 Q_EMIT authenticationComplete();
18 }
19
20=== modified file 'plugins/LightDM/Greeter.h'
21--- plugins/LightDM/Greeter.h 2014-08-01 13:42:18 +0000
22+++ plugins/LightDM/Greeter.h 2014-08-22 09:20:28 +0000
23@@ -35,7 +35,7 @@
24 Q_OBJECT
25
26 Q_PROPERTY(bool active READ isActive WRITE setIsActive NOTIFY isActiveChanged)
27- Q_PROPERTY(bool authenticated READ isAuthenticated)
28+ Q_PROPERTY(bool authenticated READ isAuthenticated NOTIFY isAuthenticatedChanged)
29 Q_PROPERTY(QString authenticationUser READ authenticationUser NOTIFY authenticationUserChanged)
30 Q_PROPERTY(bool promptless READ promptless NOTIFY promptlessChanged)
31
32@@ -59,6 +59,7 @@
33 void authenticationComplete();
34 void authenticationUserChanged(const QString &user);
35 void isActiveChanged();
36+ void isAuthenticatedChanged();
37 void promptlessChanged();
38 void showGreeter();
39
40
41=== modified file 'tests/qmltests/tst_Shell.qml'
42--- tests/qmltests/tst_Shell.qml 2014-08-22 09:20:28 +0000
43+++ tests/qmltests/tst_Shell.qml 2014-08-22 09:20:28 +0000
44@@ -445,6 +445,17 @@
45 touchRelease(shell);
46 }
47
48+ function test_unlockedProperties() {
49+ // Confirm that various properties have the correct values when unlocked
50+ tryCompare(shell, "locked", false)
51+
52+ var launcher = findChild(shell, "launcher")
53+ tryCompare(launcher, "available", true)
54+
55+ var indicators = findChild(shell, "indicators")
56+ tryCompare(indicators, "available", true)
57+ }
58+
59 function test_unlockAllModemsOnBoot() {
60 unlockAllModemsSpy.clear()
61 // actually create an object so we notice the onCompleted signal

Subscribers

People subscribed via source and target branches