Merge lp:~macslow/unity8/snap-decisions-states into lp:unity8

Proposed by Mirco Müller
Status: Merged
Approved by: Michael Zanetti
Approved revision: 556
Merged at revision: 787
Proposed branch: lp:~macslow/unity8/snap-decisions-states
Merge into: lp:unity8
Prerequisite: lp:~macslow/unity8/fix-object-name-of-notification-ap-test
Diff against target: 491 lines (+330/-17)
5 files modified
qml/Notifications/Notification.qml (+61/-4)
qml/Notifications/Notifications.qml (+4/-0)
tests/qmltests/CMakeLists.txt (+1/-0)
tests/qmltests/Notifications/tst_Notifications.qml (+27/-13)
tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml (+237/-0)
To merge this branch: bzr merge lp:~macslow/unity8/snap-decisions-states
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Michael Zanetti (community) Approve
Andrea Cimitan Pending
Review via email: mp+210618@code.launchpad.net

This proposal supersedes a proposal from 2013-11-15.

Commit message

Make visual queue of (up to five) snap-decisions contract and expand according to visual design-spec.

Description of the change

Make visual queue of (up to five) snap-decisions contract and expand according to visual design-spec.

* Are there any related MPs required for this MP to build/function as expected?
There are two prerequiste branches needed for this to work. lp:~macslow/unity8/fix-object-name-of-notification-ap-test for lp:unity8 and lp:~macslow/unity-notifications/dont-ignore-placeholder for lp:unity-notifications

* 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?
Not applicable.

* If you changed the UI, has there been a design review?
Showed http://www.youtube.com/watch?v=LVryb_-gRR0 to Design and they are ok with it.

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

FAILED: Continuous integration, rev:535
http://jenkins.qa.ubuntu.com/job/unity8-ci/2289/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3105
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2805
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1160
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/811
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/813
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/813/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/811
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2728
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3107
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3107/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2807
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2807/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5219
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/3828

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2289/rebuild

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

FAILED: Continuous integration, rev:535
http://jenkins.qa.ubuntu.com/job/unity8-ci/2341/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3290
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2956
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1211
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/862
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/866
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/866/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/862
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2896
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3292
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3292/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2958
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2958/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5360
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4050

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2341/rebuild

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

FAILED: Continuous integration, rev:536
http://jenkins.qa.ubuntu.com/job/unity8-ci/2348/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3314
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2978
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1218/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/869
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/873
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/873/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/869
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2918
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3316
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3316/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2980
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2980/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5382
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4087

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2348/rebuild

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

FAILED: Continuous integration, rev:537
http://jenkins.qa.ubuntu.com/job/unity8-ci/2349/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3315
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2979/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1219
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/870
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/874
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/874/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/870
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2919
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3317
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3317/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2981
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2981/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5384/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4089

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2349/rebuild

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

FAILED: Continuous integration, rev:538
http://jenkins.qa.ubuntu.com/job/unity8-ci/2350/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3326
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2990/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1220
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/871
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/875
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/875/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/871/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2927
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3328
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3328/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2992
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2992/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5391/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4098

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2350/rebuild

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

FAILED: Continuous integration, rev:538
http://jenkins.qa.ubuntu.com/job/unity8-ci/2355/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3345/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3004
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1225
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/876
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/880
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/880/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/876
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2950/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3347
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3347/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3006
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3006/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5406
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4123

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2355/rebuild

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: 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

FAILED: Continuous integration, rev:538
http://jenkins.qa.ubuntu.com/job/unity8-ci/2371/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3387
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3041
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1241
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/892
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/896
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/896/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/892
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2983
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3389
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3389/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3043
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3043/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5438
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4169

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2371/rebuild

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

FAILED: Continuous integration, rev:539
http://jenkins.qa.ubuntu.com/job/unity8-ci/2377/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3393
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3047
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1247
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/898
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/902
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/902/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/898
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2989
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3395
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3395/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3049
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3049/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5444
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4179

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2377/rebuild

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

PASSED: Continuous integration, rev:540
http://jenkins.qa.ubuntu.com/job/unity8-ci/2378/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3397
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3051
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1248
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/899
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/903
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/903/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/899
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2993
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3399
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3399/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3053
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3053/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5448
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4186

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2378/rebuild

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

FAILED: Continuous integration, rev:541
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~macslow/unity8/snap-decisions-states/+merge/210618/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity8-ci/2474/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3854
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3439/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1344
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/995
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/999
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/999/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/995
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3379
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3880
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3880/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3441
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3441/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5797/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4716

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2474/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

15 + var result = "undefined";

I think this should be "" instead of "undefined" otherwise leaving a state might not reset stuff correctly.

===

18 + if (notificationList.currentIndex == index) {
and following lines...

You shouldn't reach out of scope here (Can break if someone. Please either user ListView.view instead of notificationList or move the logic out into the containing ListView.

===
 small coding style nitpick

70 anchors.fill: parent
71 - anchors.margins: notification.margins
72 + anchors.leftMargin: notification.margins
73 + anchors.rightMargin: notification.margins

anchors { fill: parent; ... }

===

117 + Component.onCompleted: {
118 + if (fullscreen) {
119 + notificationList.spacing = 0
120 + } else {
121 + notificationList.spacing = units.gu(.5)
122 + }
123 + }

Why can't this be a binding in the ListView? Not sure why this needs to be called every time a new delegate is created.
===

Not sure if related to this branch (and if its a real issue after all), but if I trigger sd-example-incoming-call.py and then decline the incoming call the notification doesn't go away (it works fine if I accept the call)

===

I'm calling this in a script:

./sd-example-incoming-call-canceled.py &
./sd-example-incoming-call.py &
./sd-example-incoming-file.py &
./sd-example-morning-alarm.py &
./sd-example-much-body-text.py &
./sd-example-password-entry.py &
./sd-example-simunlock.py &
./sd-example-user-auth.py &
./sd-example-using-button-tint-hint.py &

=> unity crashes.

After that I added a sleep 1 in between the lines, it still causes issues and at some point an empty rectangle appears.

===

If the first notification is expanded, and a new one comes in at position 0, the new one shows up expanded and then quickly collapses. I think that might be related to this:

125 + ListView.onAdd: {
126 + if (notificationList.currentIndex < 1 && notificationList.count > 1) {
127 + notificationList.currentIndex = 1
128 + }

The problem here is that you only correct the currentIndex after everything is built up. If you make it a binding it should work better.

===

207 + wait(500);

Is that a leftover from testing?

===

tests look good. Maybe rename them to give it a more meaningful name? make testVisualQueue does not really tell its notifications.

review: Needs Fixing
Revision history for this message
Mirco Müller (macslow) wrote :

"15 + var result = "undefined";"
fixed

" small coding style nitpick"
fixed

"Why can't this be a binding in the ListView?..."
fixed

"Not sure if related to this branch (and if its a real issue after all), but if I trigger sd-example-incoming-call.py and then decline the incoming call the notification doesn't go away (it works fine if I accept the call)"
In that example "Decline" is really only for expanding the fake ComboButton to reveal the several real declining options. This will be less confusing once we finally can use the real ComboButton-element from the SDK.

Still working on the other bits.

542. By Mirco Müller

Fixed the first set of issues from the MP-comments.

543. By Mirco Müller

More MP-comment fixes.

544. By Mirco Müller

Fixing more MP-comments... moving more control to bindings.

545. By Mirco Müller

Rename qml-test for visual snap-decision queue to make it more obvious what it is about.

546. By Mirco Müller

Typo

Revision history for this message
Mirco Müller (macslow) wrote :

"If the first notification is expanded, and a new one comes in at position 0..."
fixed

"make testVisualQueue does not really tell its notifications."
fixed

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

FAILED: Continuous integration, rev:546
http://jenkins.qa.ubuntu.com/job/unity8-ci/2522/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3986
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3571/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1392
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1043
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1047
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1047/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1043
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3480
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4021
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4021/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3573
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3573/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5905/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4862

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2522/rebuild

review: Needs Fixing (continuous-integration)
547. By Mirco Müller

Merged mzanetti's wait()-crushing power :)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:547
http://jenkins.qa.ubuntu.com/job/unity8-ci/2523/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3988
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3573/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1393
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1044
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1048
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1048/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1044
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3482
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4023
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4023/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3575
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3575/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5907/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4867

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2523/rebuild

review: Needs Fixing (continuous-integration)
548. By Mirco Müller

Got rid of the last wait(), but now have to fight the initialHeight assertion again... :/

549. By Mirco Müller

Added another WaitForRendering() to make the test pass again... most of the time :/

550. By Mirco Müller

This second waitForRendering() seems to help fix the issue.

551. By Mirco Müller

That didn't really help either.

552. By Mirco Müller

Rather use implicitHeight then height to get the correct value.

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

FAILED: Continuous integration, rev:549
http://jenkins.qa.ubuntu.com/job/unity8-ci/2530/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4007
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3592/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1400
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1051
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1055
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1055/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1051
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3498
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4048
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4048/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3594
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3594/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5923/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4896

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2530/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Mirco Müller (macslow) wrote :

Wait() are all gone and the qml-test passes again. Now it's time to look into the crash.

Revision history for this message
Mirco Müller (macslow) wrote :

The crash no longer happens. But the edge-case of the fullscreen sim-unlock snap-decision needs to be handled in special way. Since there's no UX-design for this, I will suppress it if there are already snap-decisions in queue or avoid new snap-decisions getting displayed, if there's still a fullscreen snap-decision displayed. That has to happen on the backend though.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:552
http://jenkins.qa.ubuntu.com/job/unity8-ci/2534/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4012
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3597/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1404
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1055
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1059
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1059/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1055
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3503
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4053
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4053/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3599
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3599/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5928/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4903

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2534/rebuild

review: Needs Fixing (continuous-integration)
553. By Mirco Müller

Forgot to also use the renamed test in the cmakefile.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:552
http://jenkins.qa.ubuntu.com/job/unity8-ci/2539/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4025
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3610/console
    None: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1409/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1060
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1064
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1064/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1060
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3515
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4066
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4066/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3612
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3612/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5940/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4916

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2539/rebuild

review: Needs Fixing (continuous-integration)
554. By Mirco Müller

Possible fix for segfault in notification-qmltest

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:553
http://jenkins.qa.ubuntu.com/job/unity8-ci/2544/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4033
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3618
    None: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1414/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1065
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1069
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1069/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1065
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3520
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4076
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4076/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3620
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3620/artifact/work/output/*zip*/output.zip
    None: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5946/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4923

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2544/rebuild

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

FAILED: Continuous integration, rev:554
http://jenkins.qa.ubuntu.com/job/unity8-ci/2546/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4037
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3622
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1416
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1067
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1071
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1071/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1067
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3524
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4080
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4080/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3624
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3624/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5950
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4930

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2546/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

> The crash no longer happens. But the edge-case of the fullscreen sim-unlock
> snap-decision needs to be handled in special way. Since there's no UX-design
> for this, I will suppress it if there are already snap-decisions in queue or
> avoid new snap-decisions getting displayed, if there's still a fullscreen
> snap-decision displayed. That has to happen on the backend though.

Not sure I understand correctly, what do you mean with suppressing it? Does that mean delaying it or dropping it? I'm not sure we should just drop it while I guess I'm fine with delaying it until the other notifications have been handled.

review: Needs Information
Revision history for this message
Mirco Müller (macslow) wrote :

With suppressing I mean "avoid the fullscreen/pinpad notification move from the internal snap-decisions queue into the displayed queue" until the displayed queue is empty again, thus the fullscreen/pinpad notification would be the only notification being shown.

The other case would apply as well... "don't let any notification move from an internal queue to the displayed-queue until the the fullscreen/pinpad notification is no longer displayed".

Revision history for this message
Michael Zanetti (mzanetti) wrote :

518 + if (mockModel.count > 5) {
537 + if (mockModel.count > 5) {
551 + if (mockModel.count > 5) {

Why is this? You basically disable the whole test for the first 4 runs. Can't just initialize the model with 5+ notifications if you really require them for the test?

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> With suppressing I mean "avoid the fullscreen/pinpad notification move from
> the internal snap-decisions queue into the displayed queue" until the
> displayed queue is empty again, thus the fullscreen/pinpad notification would
> be the only notification being shown.
>
> The other case would apply as well... "don't let any notification move from an
> internal queue to the displayed-queue until the the fullscreen/pinpad
> notification is no longer displayed".

ack, so effectively delaying it. works for me.

555. By Mirco Müller

Add the five test Snap-Decisions for the visual-queue test in one go.

Revision history for this message
Mirco Müller (macslow) wrote :

As discussed on IRC, the initial idea was to add all five snap-decisions in one go, but I didn't know how QML-test's data-concept worked with this. So now the test snap-decisions are added in one step and the data-concept is not used at all.

556. By Mirco Müller

Using the fill-model function from the interactive test.

Revision history for this message
Michael Zanetti (mzanetti) 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.

unrelated mediumtests fail

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:555
http://jenkins.qa.ubuntu.com/job/unity8-ci/2554/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4063/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3648
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1424
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1075
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1079
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1079/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1075
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3547/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4115
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4115/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3650
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3650/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5974
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4977

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2554/rebuild

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

FAILED: Continuous integration, rev:556
http://jenkins.qa.ubuntu.com/job/unity8-ci/2560/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4073/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3658
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1430/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1081
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1085
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1085/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1081
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3556/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4125
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4125/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3660
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3660/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5982
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4987

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2560/rebuild

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/Notifications/Notification.qml'
--- qml/Notifications/Notification.qml 2014-01-03 10:29:25 +0000
+++ qml/Notifications/Notification.qml 2014-03-19 11:24:40 +0000
@@ -39,20 +39,72 @@
3939
40 fullscreen: false40 fullscreen: false
41 objectName: "background"41 objectName: "background"
42 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 4) : 042 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
4343
44 color: Qt.rgba(0.132, 0.117, 0.109, 0.97)44 color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
45 opacity: 045 opacity: 0
4646
47 state: {
48 var result = "";
49
50 if (type == Notification.SnapDecision) {
51 if (ListView.view.currentIndex == index) {
52 result = "expanded";
53 } else {
54 if (ListView.view.count > 2) {
55 if (ListView.view.currentIndex == -1 && index == 1) {
56 result = "expanded";
57 } else {
58 result = "contracted";
59 }
60 } else {
61 result = "expanded";
62 }
63 }
64 }
65
66 return result;
67 }
68
69 Behavior on height {
70 id: normalHeightBehavior
71
72 //enabled: menuItemFactory.progress == 1
73 enabled: true
74 SequentialAnimation {
75 PauseAnimation {
76 duration: UbuntuAnimation.SnapDuration
77 }
78 UbuntuNumberAnimation {
79 duration: UbuntuAnimation.SnapDuration
80 }
81 }
82 }
83
84 states:[
85 State {
86 name: "contracted"
87 PropertyChanges {target: notification; height: units.gu(8)}
88 },
89 State {
90 name: "expanded"
91 PropertyChanges {target: notification; height: implicitHeight}
92 }
93 ]
94
47 clip: fullscreen ? false : true95 clip: fullscreen ? false : true
96
48 visible: type != Notification.PlaceHolder97 visible: type != Notification.PlaceHolder
4998
50 UbuntuShape {99 UbuntuShape {
51 id: shapedBack100 id: shapedBack
52101
53 visible: !fullscreen102 visible: !fullscreen
54 anchors.fill: parent103 anchors {
55 anchors.margins: notification.margins104 fill: parent
105 leftMargin: notification.margins
106 rightMargin: notification.margins
107 }
56 color: parent.color108 color: parent.color
57 opacity: parent.opacity109 opacity: parent.opacity
58 radius: "medium"110 radius: "medium"
@@ -104,17 +156,20 @@
104 MouseArea {156 MouseArea {
105 id: interactiveArea157 id: interactiveArea
106158
107 anchors.fill: contentColumn159 anchors.fill: parent
108 objectName: "interactiveArea"160 objectName: "interactiveArea"
109 onClicked: {161 onClicked: {
110 if (notification.type == Notification.Interactive) {162 if (notification.type == Notification.Interactive) {
111 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)163 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
164 } else {
165 notificationList.currentIndex = index;
112 }166 }
113 }167 }
114 }168 }
115169
116 Column {170 Column {
117 id: contentColumn171 id: contentColumn
172 objectName: "contentColumn"
118173
119 anchors {174 anchors {
120 left: parent.left175 left: parent.left
@@ -207,6 +262,8 @@
207 model: unityMenuModel262 model: unityMenuModel
208263
209 NotificationMenuItemFactory {264 NotificationMenuItemFactory {
265 id: menuItemFactory
266
210 anchors.left: parent.left; anchors.right: parent.right267 anchors.left: parent.left; anchors.right: parent.right
211268
212 menuModel: unityMenuModel269 menuModel: unityMenuModel
213270
=== modified file 'qml/Notifications/Notifications.qml'
--- qml/Notifications/Notifications.qml 2013-12-18 12:50:55 +0000
+++ qml/Notifications/Notifications.qml 2014-03-19 11:24:40 +0000
@@ -25,6 +25,9 @@
25 interactive: false25 interactive: false
2626
27 property real margin27 property real margin
28 spacing: delegate.fullscreen ? 0 : units.gu(.5)
29
30 currentIndex: (currentIndex < 1 && count > 1) ? 1 : -1
2831
29 delegate: Notification {32 delegate: Notification {
30 objectName: "notification" + index33 objectName: "notification" + index
@@ -75,6 +78,7 @@
75 displaced: Transition {78 displaced: Transition {
76 UbuntuNumberAnimation {79 UbuntuNumberAnimation {
77 properties: "x,y"80 properties: "x,y"
81 duration: UbuntuAnimation.SnapDuration
78 }82 }
79 }83 }
80}84}
8185
=== modified file 'tests/qmltests/CMakeLists.txt'
--- tests/qmltests/CMakeLists.txt 2014-03-14 12:08:44 +0000
+++ tests/qmltests/CMakeLists.txt 2014-03-19 11:24:40 +0000
@@ -82,6 +82,7 @@
82add_qml_test(Hud Result)82add_qml_test(Hud Result)
83add_qml_test(Launcher Launcher IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})83add_qml_test(Launcher Launcher IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
84add_qml_test(Notifications Notifications IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins)84add_qml_test(Notifications Notifications IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins)
85add_qml_test(Notifications VisualSnapDecisionsQueue IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins)
85add_qml_test(Panel IndicatorRow)86add_qml_test(Panel IndicatorRow)
86add_qml_test(Panel Indicators IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})87add_qml_test(Panel Indicators IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
87add_qml_test(Panel MenuContent IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})88add_qml_test(Panel MenuContent IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
8889
=== modified file 'tests/qmltests/Notifications/tst_Notifications.qml'
--- tests/qmltests/Notifications/tst_Notifications.qml 2014-01-03 10:29:25 +0000
+++ tests/qmltests/Notifications/tst_Notifications.qml 2014-03-19 11:24:40 +0000
@@ -43,6 +43,21 @@
43 function getRaw(id) {43 function getRaw(id) {
44 return mockNotification.createObject(mockModel)44 return mockNotification.createObject(mockModel)
45 }45 }
46
47 // add the default/PlaceHolder notification to the model
48 Component.onCompleted: {
49 var n = {
50 type: Notification.PlaceHolder,
51 hints: {},
52 summary: "",
53 body: "",
54 icon: "",
55 secondaryIcon: "",
56 actions: []
57 }
58
59 append(n)
60 }
46 }61 }
4762
48 function addSnapDecisionNotification() {63 function addSnapDecisionNotification() {
@@ -376,6 +391,8 @@
376 var notification = findChild(notifications, "notification" + (mockModel.count - 1))391 var notification = findChild(notifications, "notification" + (mockModel.count - 1))
377 verify(notification !== undefined, "notification wasn't found");392 verify(notification !== undefined, "notification wasn't found");
378393
394 waitForRendering(notification);
395
379 var icon = findChild(notification, "icon")396 var icon = findChild(notification, "icon")
380 var shapedIcon = findChild(notification, "shapedIcon")397 var shapedIcon = findChild(notification, "shapedIcon")
381 var nonShapedIcon = findChild(notification, "nonShapedIcon")398 var nonShapedIcon = findChild(notification, "nonShapedIcon")
@@ -384,7 +401,6 @@
384 var summaryLabel = findChild(notification, "summaryLabel")401 var summaryLabel = findChild(notification, "summaryLabel")
385 var bodyLabel = findChild(notification, "bodyLabel")402 var bodyLabel = findChild(notification, "bodyLabel")
386 var buttonRow = findChild(notification, "buttonRow")403 var buttonRow = findChild(notification, "buttonRow")
387 waitForRendering(buttonRow)
388404
389 compare(icon.visible, data.iconVisible, "avatar-icon visibility is incorrect")405 compare(icon.visible, data.iconVisible, "avatar-icon visibility is incorrect")
390 compare(shapedIcon.visible, data.shapedIcon, "shaped-icon visibility is incorrect")406 compare(shapedIcon.visible, data.shapedIcon, "shaped-icon visibility is incorrect")
@@ -407,12 +423,9 @@
407 var buttonCancel = findChild(buttonRow, "button1")423 var buttonCancel = findChild(buttonRow, "button1")
408 var buttonAccept = findChild(buttonRow, "button0")424 var buttonAccept = findChild(buttonRow, "button0")
409425
410 waitForRendering(notification)
411
412 // only test the left/cancel-button if two actions have been passed in426 // only test the left/cancel-button if two actions have been passed in
413 if (data.actions.length == 2) {427 if (data.actions.length == 2) {
414 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)428 tryCompareFunction(function() { mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2); return actionSpy.signalArguments.length > 0; }, true);
415 actionSpy.wait()
416 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")429 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
417 actionSpy.clear()430 actionSpy.clear()
418 }431 }
@@ -421,38 +434,39 @@
421 verify(buttonAccept.gradient === data.buttonTinted ? UbuntuColors.orangeGradient : UbuntuColors.greyGradient, "button has the wrong color-tint")434 verify(buttonAccept.gradient === data.buttonTinted ? UbuntuColors.orangeGradient : UbuntuColors.greyGradient, "button has the wrong color-tint")
422435
423 // click the positive/right button436 // click the positive/right button
424 mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2)437 tryCompareFunction(function() { mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2); return actionSpy.signalArguments.length > 0; }, true);
425 actionSpy.wait()
426 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id positive action")438 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id positive action")
427 actionSpy.clear()439 actionSpy.clear()
440 waitForRendering(notification)
428441
429 // check if there's more than one negative choice442 // check if there's more than one negative choice
430 if (data.actions.length > 2) {443 if (data.actions.length > 2) {
431 var initialHeight = notification.height444 var initialHeight = notification.implicitHeight
432445
433 // click to expand446 // click to expand
434 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)447 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
435 waitForRendering(notification)448 var contentColumn = findChild(notification, "contentColumn")
449 var collapsedContentColumnHeight = contentColumn.height;
450 // Waiting for the inner column to change height because buttons appear
451 tryCompareFunction(function() { return collapsedContentColumnHeight != contentColumn.height; }, true);
452 // Waiting for notification to reach its target size
453 tryCompare(notification, "height", contentColumn.height + contentColumn.spacing * 2)
436 actionSpy.clear()454 actionSpy.clear()
437455
438 // test the additional buttons456 // test the additional buttons
439 for (var i = 2; i < data.actions.length; i++) {457 for (var i = 2; i < data.actions.length; i++) {
440 waitForRendering(notification)
441 var buttonColumn = findChild(notification, "buttonColumn")458 var buttonColumn = findChild(notification, "buttonColumn")
442 var button = findChild(buttonColumn, "button" + i)459 var button = findChild(buttonColumn, "button" + i)
443 mouseClick(button, button.width / 2, button.height / 2)460 mouseClick(button, button.width / 2, button.height / 2)
444 actionSpy.wait()
445 compare(actionSpy.signalArguments[0][0], data.actions[i]["id"], "got wrong id for additional negative action")461 compare(actionSpy.signalArguments[0][0], data.actions[i]["id"], "got wrong id for additional negative action")
446 actionSpy.clear()462 actionSpy.clear()
447 }463 }
448464
449 // click to collapse465 // click to collapse
450 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)466 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
451 waitForRendering(notification)
452 tryCompare(notification, "height", initialHeight)467 tryCompare(notification, "height", initialHeight)
453 } else {468 } else {
454 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)469 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
455 actionSpy.wait()
456 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")470 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
457 }471 }
458 }472 }
459473
=== added file 'tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml'
--- tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml 1970-01-01 00:00:00 +0000
+++ tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml 2014-03-19 11:24:40 +0000
@@ -0,0 +1,237 @@
1/*
2 * Copyright (C) 2014 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import QtTest 1.0
19import ".."
20import "../../../qml/Notifications"
21import Ubuntu.Components 0.1
22import Unity.Test 0.1
23import Unity.Notifications 1.0
24
25Row {
26 id: rootRow
27
28 Component {
29 id: mockNotification
30
31 QtObject {
32 function invokeAction(actionId) {
33 mockModel.actionInvoked(actionId)
34 }
35 }
36 }
37
38 ListModel {
39 id: mockModel
40
41 signal actionInvoked(string actionId)
42
43 function getRaw(id) {
44 return mockNotification.createObject(mockModel)
45 }
46
47 // add the default/PlaceHolder notification to the model
48 Component.onCompleted: {
49 var n = {
50 type: Notification.PlaceHolder,
51 hints: {},
52 summary: "",
53 body: "",
54 icon: "",
55 secondaryIcon: "",
56 actions: []
57 }
58
59 append(n)
60 }
61 }
62
63 function addSomeSnapDecisionNotifications() {
64 var n = [{
65 type: Notification.SnapDecision,
66 hints: {"x-canonical-private-button-tint": "true"},
67 summary: "Incoming call",
68 body: "Frank Zappa\n+44 (0)7736 027340",
69 icon: "../graphics/avatars/funky.png",
70 secondaryIcon: "../graphics/applicationIcons/phone-app.png",
71 actions: [{ id: "pickup_id", label: "Pick up"},
72 { id: "decline_1_id", label: "Decline"},
73 { id: "decline_2_id", label: "Can't talk now, what's up?"},
74 { id: "decline_3_id", label: "I call you back."},
75 { id: "decline_4_id", label: "Send custom message..."}]
76 },
77 {
78 type: Notification.SnapDecision,
79 hints: {"x-canonical-private-button-tint": "true",
80 "x-canonical-non-shaped-icon": "true"},
81 summary: "Incoming file",
82 body: "Frank would like to send you the file: essay.pdf.",
83 icon: "image://theme/search",
84 actions: [{ id: "accept_id", label: "Accept"},
85 { id: "reject_id", label: "Reject"}]
86 },
87 {
88 type: Notification.SnapDecision,
89 hints: {"x-canonical-private-button-tint": "true",
90 "x-canonical-non-shaped-icon": "true"},
91 summary: "Authentication error",
92 body: "Please authorise Ubuntu to access your Google account.",
93 icon: "image://theme/search",
94 actions: [{ id: "settings_id", label: "Settings..."},
95 { id: "cancel_id", label: "Cancel"}]
96 },
97 {
98 type: Notification.SnapDecision,
99 hints: {"x-canonical-private-button-tint": "true",
100 "x-canonical-non-shaped-icon": "true"},
101 summary: "Morning alarm",
102 body: "It's 6:30... time to get up!",
103 icon: "image://theme/search",
104 actions: [{ id: "ok_reply", label: "Ok"},
105 { id: "snooze_id", label: "Snooze"}]
106 },
107 {
108 type: Notification.SnapDecision,
109 hints: {"x-canonical-private-button-tint": "true"},
110 summary: "Jenny Sample",
111 body: "Hey there! Have you been watching the latest episode of that TV-show I told you about last week?",
112 icon: "../graphics/avatars/amanda.png",
113 secondaryIcon: "../graphics/applicationIcons/messages-app.png",
114 actions: [{ id: "reply_id", label: "Reply"},
115 { id: "ignore_id", label: "Ignore"}]
116 }]
117
118 mockModel.append(n)
119 }
120
121 function clearNotifications() {
122 // remove all but the first (PlaceHolder) notification
123 mockModel.remove(1, mockModel.count - 1)
124 }
125
126 function removeTopMostNotification() {
127 // leave real/first (PlaceHolder) notification untouched
128 if (mockModel.count > 1)
129 mockModel.remove(1)
130 }
131
132 Rectangle {
133 id: notificationsRect
134
135 width: units.gu(40)
136 height: units.gu(71)
137
138 MouseArea{
139 id: clickThroughCatcher
140
141 anchors.fill: parent
142 }
143
144 Notifications {
145 id: notifications
146
147 margin: units.gu(1)
148
149 anchors.fill: parent
150 model: mockModel
151 }
152 }
153
154 Rectangle {
155 id: interactiveControls
156
157 width: units.gu(30)
158 height: units.gu(81)
159 color: "grey"
160
161 Column {
162 spacing: units.gu(1)
163 anchors.fill: parent
164 anchors.margins: units.gu(1)
165
166 Button {
167 width: parent.width
168 text: "add some snap-decisions"
169 onClicked: addSomeSnapDecisionNotifications()
170 }
171
172 Button {
173 width: parent.width
174 text: "remove top-most notification"
175 onClicked: removeTopMostNotification()
176 }
177
178 Button {
179 width: parent.width
180 text: "clear model"
181 onClicked: clearNotifications()
182 }
183 }
184 }
185
186 UnityTestCase {
187 id: root
188 name: "VisualQueueTest"
189 when: windowShown
190
191 function test_VisualSnapDecisionsQueue() {
192 // populate model with some mock notifications
193 addSomeSnapDecisionNotifications();
194
195 // make sure the view is properly updated before going on
196 waitForRendering(notifications);
197
198 var snap_decision = [findChild(notifications, "notification1"),
199 findChild(notifications, "notification2"),
200 findChild(notifications, "notification3"),
201 findChild(notifications, "notification4"),
202 findChild(notifications, "notification5")]
203
204 for (var index = 0; index < snap_decision.length; index++) {
205 verify(snap_decision[index] !== undefined, index + ". snap-decision wasn't found");
206 }
207
208 // check initial states once all five snap-decisions were appended to the model
209 compare(snap_decision[0].state, "expanded", "state of first snap-decision is not expanded");
210 for (var index = 1; index < snap_decision.length; index++) {
211 compare(snap_decision[index].state, "contracted", "state of "+ index + ".snap-decision is not contracted");
212 }
213
214 // click/tap on each snap-decision and verify only one is in expanded-state at any time
215 for (var index = 0; index < snap_decision.length; index++) {
216 mouseClick(snap_decision[index], snap_decision[index].width / 2, snap_decision[index].height / 2)
217 for (var kindex = 0; kindex < snap_decision.length; kindex++) {
218 if (kindex == index) {
219 compare(snap_decision[kindex].state, "expanded", "state of "+ kindex + ".snap-decision is not expanded");
220 } else {
221 compare(snap_decision[kindex].state, "contracted", "state of "+ kindex + ".snap-decision is not contracted");
222 }
223 }
224 }
225
226 // remove top-most and verify one of the remaining ones is still getting expanded
227
228 // make first snap-decision expand
229 mouseClick(snap_decision[0], snap_decision[0].width / 2, snap_decision[0].height / 2);
230
231 for (var index = 1; index < snap_decision.length; index++) {
232 removeTopMostNotification();
233 compare(snap_decision[index].state, "expanded", "state of " + index + ". snap-decision is not expanded");
234 }
235 }
236 }
237}

Subscribers

People subscribed via source and target branches