Merge lp:~aacid/unity8/greeter_update_current_session_on_user_change into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michał Sawicz
Approved revision: 2748
Merged at revision: 2780
Proposed branch: lp:~aacid/unity8/greeter_update_current_session_on_user_change
Merge into: lp:unity8
Diff against target: 77 lines (+12/-9)
3 files modified
qml/Greeter/LoginList.qml (+6/-3)
qml/Greeter/WideView.qml (+1/-4)
tests/qmltests/Greeter/tst_WideView.qml (+5/-2)
To merge this branch: bzr merge lp:~aacid/unity8/greeter_update_current_session_on_user_change
Reviewer Review Type Date Requested Status
Michał Sawicz Abstain
Josh Arenson Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+313544@code.launchpad.net

Commit message

Update current session after changing the user

This matches unity7 greeter behaviour, i.e. if you change the session and then change the user, the session that shows up is the last session that new user logged in and not the new session you selected in the previous user

Description of the change

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

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

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2746
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2740/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3596
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2054
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2054
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3624
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3470
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3470/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3470
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3470/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3470
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3470/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3470
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3470/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3470
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3470/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3470
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3470/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2740/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Josh Arenson (josharenson) wrote :

Since my test branch relies on this change as well as mterry's branch, would you mind if I just included this change in my test branch lp:~josharenson/unity8/ported-session-test instead since this change is so small?

Revision history for this message
Albert Astals Cid (aacid) wrote :

I don't mind if it gets in as part of another branch, what i don't want it is to get not merged in because those branches are heavy and change lots of stuff and hard to review/approve.

Revision history for this message
Josh Arenson (josharenson) wrote :

While not caused by your branch, the following issue is exacerbated by it.

QWARN : qmltestrunner::WideView::test_loginListMovement(up) file:///home/josh/Documents/unity8/greeter_update_current_session_on_user_change/qml/Greeter/WideView.qml:145: Error: Cannot assign [undefined] to QString

Since the issue is, most likely, my fault, I can include a fix in one of my upcoming greeter branches if you would like. It seems to only affect the mock, so pretty low priority.

review: Needs Information
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2747
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2834/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3711
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2134
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2134
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3739
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3583
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3583/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3583
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3583/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3583
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3583/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3583
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3583/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3583
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3583/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3583
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3583/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2834/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

> While not caused by your branch, the following issue is exacerbated by it.
>
> QWARN : qmltestrunner::WideView::test_loginListMovement(up) file:///home/josh
> /Documents/unity8/greeter_update_current_session_on_user_change/qml/Greeter/Wi
> deView.qml:145: Error: Cannot assign [undefined] to QString
>
>
> Since the issue is, most likely, my fault, I can include a fix in one of my
> upcoming greeter branches if you would like. It seems to only affect the mock,
> so pretty low priority.

Last commit should fix that, can you have a look?

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2748
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2862/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3740
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2158
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2158
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3768
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3612
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3612/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3612
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3612/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3612
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3612/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3612
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3612/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3612
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3612/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3612
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3612/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2862/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2748
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2886/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3769
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2181
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2181
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3797
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3641
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3641/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3641
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3641/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3641
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3641/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3641
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3641/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3641
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3641/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3641
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3641/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2886/rebuild

review: Approve (continuous-integration)
Revision history for this message
Josh Arenson (josharenson) wrote :

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

 * Did CI run pass?
Yes

review: Approve
Revision history for this message
Michał Sawicz (saviq) wrote :

This seems to be the closest one, so reporting here:

While testing silo 2272, I noticed the first user's icon wasn't correct on boot - blank instead of the previously used session.

See https://drive.google.com/file/d/0B32jwBcbaPloVHhmcFhLd2RyQ1U/view for a video of the issue.

Also related, the following test failed in britney:

FAIL! : qmltestrunner::WideView::test_selected() Compared values are not the same
   Actual (): 3
   Expected (): 2
   Loc: [/usr/share/unity8/tests/qmltests/Greeter/tst_WideView.qml(503)]

review: Needs Fixing
Revision history for this message
Michael Terry (mterry) wrote :

I fixed the blank icon in my greeter-prompt-model branch. Looking at the test failure... (I don't see it in my greeter-prompt-model branch alone, and it sits atop this branch -- so must be an integration issue with other branches)

Revision history for this message
Michał Sawicz (saviq) wrote :

Thanks, re-approving, then.

review: Abstain

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Greeter/LoginList.qml'
2--- qml/Greeter/LoginList.qml 2016-11-29 00:13:45 +0000
3+++ qml/Greeter/LoginList.qml 2017-01-10 09:31:50 +0000
4@@ -36,7 +36,6 @@
5 readonly property int cellHeight: units.gu(5)
6 readonly property int highlightedHeight: units.gu(15)
7 readonly property int moveDuration: UbuntuAnimation.FastDuration
8- property string selectedSession
9 property string currentSession
10 readonly property string currentUser: userList.currentItem.username
11 property bool wasPrompted: false
12@@ -109,11 +108,15 @@
13 }
14
15 Keys.onUpPressed: {
16- selected(currentIndex - 1);
17+ if (currentIndex > 0) {
18+ selected(currentIndex - 1);
19+ }
20 event.accepted = true;
21 }
22 Keys.onDownPressed: {
23- selected(currentIndex + 1);
24+ if (currentIndex + 1 < model.count) {
25+ selected(currentIndex + 1);
26+ }
27 event.accepted = true;
28 }
29 Keys.onEscapePressed: {
30
31=== modified file 'qml/Greeter/WideView.qml'
32--- qml/Greeter/WideView.qml 2016-11-29 00:13:45 +0000
33+++ qml/Greeter/WideView.qml 2017-01-10 09:31:50 +0000
34@@ -125,8 +125,6 @@
35 id: loginList
36 objectName: "loginList"
37
38- property int selectedUserIndex: 0
39-
40 width: units.gu(40)
41 anchors {
42 left: parent.left
43@@ -141,11 +139,10 @@
44 Behavior on boxVerticalOffset { UbuntuNumberAnimation {} }
45
46 model: root.userModel
47- currentSession: LightDMService.users.data(selectedUserIndex, LightDMService.userRoles.SessionRole);
48 onResponded: root.responded(response)
49 onSelected: {
50 root.selected(index)
51- loginList.selectedUserIndex = index;
52+ currentSession = LightDMService.users.data(index, LightDMService.userRoles.SessionRole);
53 }
54 onSessionChooserButtonClicked: parent.state = "SessionsList"
55
56
57=== modified file 'tests/qmltests/Greeter/tst_WideView.qml'
58--- tests/qmltests/Greeter/tst_WideView.qml 2016-08-30 14:06:47 +0000
59+++ tests/qmltests/Greeter/tst_WideView.qml 2017-01-10 09:31:50 +0000
60@@ -704,12 +704,15 @@
61
62 function test_loginListMovement_data() {
63 return [
64- {tag: "up", key: Qt.Key_Up, result: -1},
65- {tag: "down", key: Qt.Key_Down, result: 1},
66+ {tag: "up", key: Qt.Key_Up, result: 1},
67+ {tag: "down", key: Qt.Key_Down, result: 3},
68 ]
69 }
70
71 function test_loginListMovement(data) {
72+ selectIndex(2);
73+ selectedSpy.clear();
74+
75 keyClick(data.key);
76 compare(selectedSpy.count, 1);
77 compare(selectedSpy.signalArguments[0][0], data.result);

Subscribers

People subscribed via source and target branches