Merge lp:~macslow/unity-notifications/dont-ignore-placeholder into lp:unity-notifications

Proposed by Mirco Müller
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 198
Merged at revision: 199
Proposed branch: lp:~macslow/unity-notifications/dont-ignore-placeholder
Merge into: lp:unity-notifications
Diff against target: 79 lines (+9/-9)
5 files modified
examples/sd-example-incoming-file.py (+1/-1)
examples/sd-example-much-body-text.py (+1/-1)
examples/sd-example-using-button-tint-hint.py (+1/-1)
src/NotificationModel.cpp (+1/-1)
test/notificationtest.cpp (+5/-5)
To merge this branch: bzr merge lp:~macslow/unity-notifications/dont-ignore-placeholder
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+206950@code.launchpad.net

Commit message

Updated NotificationModel and its unit-test to not ignore the permanent PlaceHolder notification in the queue.

Description of the change

Updated NotificationModel and its unit-test to not ignore the permanent PlaceHolder notification in the queue.

* Are there any related MPs required for this MP to build/function as expected?
This MP is related...
* https://code.launchpad.net/~macslow/unity8/fix-object-name-of-notification-ap-test/+merge/210588

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

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

Are the examples related to the other changes? I can't see how

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

Is there any bug that this change is fixing? Also is it possible to have a testcase that fails without this change but works with it? (Besides the tests you changed)

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

The icon-changes in the examples are unrelated and just cosmetics.

There's only testVisualSDQueueWithoutCritical(). Why would it need an additional test?

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

This seems to make unity8.shell.tests.test_notifications.InteractiveNotificationBase.test_sd_incoming_call fail. Is that correct?

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

That should not happen :/ This is new. I need to look into this.

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

The notification AP-test "test_sd_incoming_call" does not use the correct objectName "notification1", but "notification0". The PlaceHolder notification in the model has "notification0". So no AP-test should look for "notification0".

I'll push a fixing branch to unity8 to go alongside with this one.

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

I've updated the MP-summary with a link to the fixing MP for unity8. See https://code.launchpad.net/~macslow/unity8/fix-object-name-of-notification-ap-test/+merge/210588

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

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/sd-example-incoming-file.py'
2--- examples/sd-example-incoming-file.py 2013-10-31 12:55:18 +0000
3+++ examples/sd-example-incoming-file.py 2014-02-18 14:55:55 +0000
4@@ -81,7 +81,7 @@
5 loop = gobject.MainLoop ()
6 n = pushNotification ("Incoming file",
7 "Frank would like to send you the file: essay.pdf",
8- "document")
9+ "sync-idle")
10 n.connect ("closed", example.closedHandler, loop)
11
12 loop.run ()
13
14=== modified file 'examples/sd-example-much-body-text.py'
15--- examples/sd-example-much-body-text.py 2013-10-31 12:55:18 +0000
16+++ examples/sd-example-much-body-text.py 2014-02-18 14:55:55 +0000
17@@ -85,7 +85,7 @@
18 loop = gobject.MainLoop ()
19 n = pushNotification ("Uses much text",
20 "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
21- "info")
22+ "messages")
23 n.connect ("closed", example.closedHandler, loop)
24
25 loop.run ()
26
27=== modified file 'examples/sd-example-using-button-tint-hint.py'
28--- examples/sd-example-using-button-tint-hint.py 2013-10-31 12:55:18 +0000
29+++ examples/sd-example-using-button-tint-hint.py 2014-02-18 14:55:55 +0000
30@@ -85,7 +85,7 @@
31 loop = gobject.MainLoop ()
32 n = pushNotification ("Question",
33 "Would you say Ok or Cancel?",
34- "info")
35+ "search")
36 n.connect ("closed", example.closedHandler, loop)
37
38 loop.run ()
39
40=== modified file 'src/NotificationModel.cpp'
41--- src/NotificationModel.cpp 2014-01-16 15:13:04 +0000
42+++ src/NotificationModel.cpp 2014-02-18 14:55:55 +0000
43@@ -441,7 +441,7 @@
44 }
45
46 if (!inserted) {
47- insertToVisible(n, 0);
48+ insertToVisible(n, 1);
49 }
50 }
51 }
52
53=== modified file 'test/notificationtest.cpp'
54--- test/notificationtest.cpp 2014-01-27 16:00:55 +0000
55+++ test/notificationtest.cpp 2014-02-18 14:55:55 +0000
56@@ -156,7 +156,7 @@
57 m.insertNotification(n3);
58 m.insertNotification(n4);
59
60- QCOMPARE(m.getDisplayedNotification(0)->getBody(), QString("snap-decision-critical"));
61+ QCOMPARE(m.getDisplayedNotification(1)->getBody(), QString("snap-decision-critical"));
62 }
63
64 void TestNotifications::testVisualSDQueueWithoutCritical() {
65@@ -173,10 +173,10 @@
66 m.insertNotification(n3);
67 m.insertNotification(n4);
68
69- QCOMPARE(m.getDisplayedNotification(3)->getBody(), QString("snap-decision-1"));
70- QCOMPARE(m.getDisplayedNotification(2)->getBody(), QString("snap-decision-2"));
71- QCOMPARE(m.getDisplayedNotification(1)->getBody(), QString("snap-decision-3"));
72- QCOMPARE(m.getDisplayedNotification(0)->getBody(), QString("snap-decision-4"));
73+ QCOMPARE(m.getDisplayedNotification(4)->getBody(), QString("snap-decision-1"));
74+ QCOMPARE(m.getDisplayedNotification(3)->getBody(), QString("snap-decision-2"));
75+ QCOMPARE(m.getDisplayedNotification(2)->getBody(), QString("snap-decision-3"));
76+ QCOMPARE(m.getDisplayedNotification(1)->getBody(), QString("snap-decision-4"));
77 }
78
79 QTEST_MAIN(TestNotifications)

Subscribers

People subscribed via source and target branches

to all changes: