Merge lp:~xavi-garcia-mena/indicator-sound/re-add-integration-tests-notifications into lp:indicator-sound/15.10

Proposed by Xavi Garcia
Status: Merged
Approved by: Charles Kerr
Approved revision: 539
Merged at revision: 540
Proposed branch: lp:~xavi-garcia-mena/indicator-sound/re-add-integration-tests-notifications
Merge into: lp:indicator-sound/15.10
Diff against target: 103 lines (+14/-19)
2 files modified
tests/integration/CMakeLists.txt (+2/-2)
tests/integration/test-indicator.cpp (+12/-17)
To merge this branch: bzr merge lp:~xavi-garcia-mena/indicator-sound/re-add-integration-tests-notifications
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+293508@code.launchpad.net

Commit message

Re-adding some integration tests for notifications after the fix for Qt has landed.

Description of the change

Re-adding some integration tests for notifications after the fix for Qt has landed.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
539. By Xavi Garcia

Re-add notifications integration tests

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

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/integration/CMakeLists.txt'
2--- tests/integration/CMakeLists.txt 2015-12-23 13:35:46 +0000
3+++ tests/integration/CMakeLists.txt 2016-05-02 09:12:57 +0000
4@@ -1,7 +1,7 @@
5 set(CMAKE_AUTOMOC ON)
6 set(CMAKE_INCLUDE_CURRENT_DIR ON)
7
8-include(FindGMock)
9+find_package(GMock REQUIRED)
10
11 #pkg_check_modules(GMENUHARNESS REQUIRED libgmenuharness REQUIRED)
12 #include_directories(${GMENUHARNESS_INCLUDE_DIRS})
13@@ -129,4 +129,4 @@
14 sound-indicator-dbus-interfaces
15 )
16
17-#add_subdirectory(utils)
18\ No newline at end of file
19+#add_subdirectory(utils)
20
21=== modified file 'tests/integration/test-indicator.cpp'
22--- tests/integration/test-indicator.cpp 2016-03-17 10:04:53 +0000
23+++ tests/integration/test-indicator.cpp 2016-05-02 09:12:57 +0000
24@@ -1493,7 +1493,7 @@
25 ).match());
26 }
27
28-TEST_F(TestIndicator, DISABLED_PhoneNotificationVolume)
29+TEST_F(TestIndicator, PhoneNotificationVolume)
30 {
31 double INITIAL_VOLUME = 0.0;
32
33@@ -1545,18 +1545,16 @@
34 notificationsSpy.clear();
35 setActionValue("volume", QVariant::fromValue(0.0));
36
37- WAIT_FOR_SIGNALS(notificationsSpy, 2)
38+ WAIT_FOR_SIGNALS(notificationsSpy, 1)
39
40- checkNotificationWithNoArgs("GetCapabilities", notificationsSpy.at(0));
41- checkVolumeNotification(0.0, "Speakers", false, notificationsSpy.at(1));
42+ checkVolumeNotification(0.0, "Speakers", false, notificationsSpy.at(0));
43
44 notificationsSpy.clear();
45 setActionValue("volume", QVariant::fromValue(0.5));
46
47- WAIT_FOR_SIGNALS(notificationsSpy, 2)
48+ WAIT_FOR_SIGNALS(notificationsSpy, 1)
49
50- checkNotificationWithNoArgs("GetCapabilities", notificationsSpy.at(0));
51- checkVolumeNotification(0.5, "Speakers", false, notificationsSpy.at(1));
52+ checkVolumeNotification(0.5, "Speakers", false, notificationsSpy.at(0));
53 }
54
55 TEST_F(TestIndicator, DISABLED_PhoneNotificationWarningVolume)
56@@ -1757,7 +1755,7 @@
57 checkVolumeNotification(1.0, "Headphones", true, notificationsSpy.at(3));
58 }
59
60-TEST_F(TestIndicator, DISABLED_PhoneNotificationWarningVolumeAlertMode)
61+TEST_F(TestIndicator, PhoneNotificationWarningVolumeAlertMode)
62 {
63 double INITIAL_VOLUME = 0.0;
64
65@@ -1784,33 +1782,30 @@
66 // change volume to 0.0... no warning should be emitted
67 setActionValue("volume", QVariant::fromValue(0.0));
68
69- WAIT_FOR_SIGNALS(notificationsSpy, 5);
70+ WAIT_FOR_SIGNALS(notificationsSpy, 4);
71
72 // the first time we also have the calls to
73 // GetServerInformation and GetCapabilities
74 checkNotificationWithNoArgs("GetServerInformation", notificationsSpy.at(0));
75 checkNotificationWithNoArgs("GetCapabilities", notificationsSpy.at(1));
76 checkVolumeNotification(0.0, "Headphones", false, notificationsSpy.at(2));
77- checkNotificationWithNoArgs("GetCapabilities", notificationsSpy.at(3));
78- checkVolumeNotification(0.0, "Headphones", false, notificationsSpy.at(4));
79+ checkVolumeNotification(0.0, "Headphones", false, notificationsSpy.at(3));
80 notificationsSpy.clear();
81
82 // change volume to 0.5... no warning should be emitted
83 setActionValue("volume", QVariant::fromValue(0.5));
84
85- WAIT_FOR_SIGNALS(notificationsSpy, 2);
86+ WAIT_FOR_SIGNALS(notificationsSpy, 1);
87
88- checkNotificationWithNoArgs("GetCapabilities", notificationsSpy.at(0));
89- checkVolumeNotification(0.5, "Headphones", false, notificationsSpy.at(1));
90+ checkVolumeNotification(0.5, "Headphones", false, notificationsSpy.at(0));
91 notificationsSpy.clear();
92
93 // change volume to 1.0... no warning should be emitted, we are in alert mode
94 setActionValue("volume", QVariant::fromValue(1.0));
95
96- WAIT_FOR_SIGNALS(notificationsSpy, 2);
97+ WAIT_FOR_SIGNALS(notificationsSpy, 1);
98
99- checkNotificationWithNoArgs("GetCapabilities", notificationsSpy.at(0));
100- checkVolumeNotification(1.0, "Headphones", false, notificationsSpy.at(1));
101+ checkVolumeNotification(1.0, "Headphones", false, notificationsSpy.at(0));
102 notificationsSpy.clear();
103 }
104

Subscribers

People subscribed via source and target branches