Merge lp:~mterry/unity8/notify-authenticated into lp:unity8
- notify-authenticated
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~mterry/unity8/notify-authenticated |
Merge into: | lp:unity8 |
Diff against target: |
558 lines (+368/-1) 21 files modified
plugins/LightDM/Greeter.cpp (+2/-0) plugins/LightDM/Greeter.h (+2/-1) plugins/Ubuntu/CMakeLists.txt (+1/-0) plugins/Ubuntu/Connectivity/CMakeLists.txt (+10/-0) plugins/Ubuntu/Connectivity/Connectivity.cpp (+33/-0) plugins/Ubuntu/Connectivity/Connectivity.h (+33/-0) plugins/Ubuntu/Connectivity/Connectivity.qmltypes (+17/-0) plugins/Ubuntu/Connectivity/plugin.cpp (+34/-0) plugins/Ubuntu/Connectivity/plugin.h (+31/-0) plugins/Ubuntu/Connectivity/qmldir (+3/-0) qml/Notifications/NotificationMenuItemFactory.qml (+5/-0) qml/Shell.qml (+5/-0) tests/mocks/Ubuntu/CMakeLists.txt (+1/-0) tests/mocks/Ubuntu/Connectivity/CMakeLists.txt (+10/-0) tests/mocks/Ubuntu/Connectivity/Connectivity.qmltypes (+18/-0) tests/mocks/Ubuntu/Connectivity/MockConnectivity.cpp (+27/-0) tests/mocks/Ubuntu/Connectivity/MockConnectivity.h (+36/-0) tests/mocks/Ubuntu/Connectivity/plugin.cpp (+34/-0) tests/mocks/Ubuntu/Connectivity/plugin.h (+31/-0) tests/mocks/Ubuntu/Connectivity/qmldir (+3/-0) tests/qmltests/tst_Shell.qml (+32/-0) |
To merge this branch: | bzr merge lp:~mterry/unity8/notify-authenticated |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Albert Astals Cid (community) | Approve | ||
Review via email: mp+231022@code.launchpad.net |
This proposal has been superseded by 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
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1162
http://
Executed test runs:
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1162
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
Test and fixes the issue.
Do you think an auto test for this makes sense?
Michael Terry (mterry) wrote : | # |
> 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.
Albert Astals Cid (aacid) wrote : | # |
Sure, i didn't mean testing the signal works, that we know, i mean something like testing that the swiping of the greeter works.
Michael Terry (mterry) wrote : | # |
There is a test added in https:/
- 1163. By Michael Terry
-
Merge from trunk
- 1164. By Michael Terry
-
Add a small test to confirm that unlocked properties are correct
Michael Terry (mterry) wrote : | # |
OK, added a test to check the unlocked property and whether the edges are enabled as they should be.
Albert Astals Cid (aacid) 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.
Yes
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1164
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1165. By Michael Terry
-
Merge from sim-unlock-on-boot
- 1166. By Michael Terry
-
Re-merge from sim-unlock-on-boot with its lifecycle merge
Unmerged revisions
- 1166. By Michael Terry
-
Re-merge from sim-unlock-on-boot with its lifecycle merge
Preview Diff
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-21 14:47:14 +0000 | |||
4 | @@ -106,6 +106,7 @@ | |||
5 | 106 | } | 106 | } |
6 | 107 | 107 | ||
7 | 108 | d->m_greeter->authenticate(username); | 108 | d->m_greeter->authenticate(username); |
8 | 109 | Q_EMIT isAuthenticatedChanged(); | ||
9 | 109 | Q_EMIT authenticationUserChanged(username); | 110 | Q_EMIT authenticationUserChanged(username); |
10 | 110 | } | 111 | } |
11 | 111 | 112 | ||
12 | @@ -150,5 +151,6 @@ | |||
13 | 150 | Q_EMIT promptlessChanged(); | 151 | Q_EMIT promptlessChanged(); |
14 | 151 | } | 152 | } |
15 | 152 | 153 | ||
16 | 154 | Q_EMIT isAuthenticatedChanged(); | ||
17 | 153 | Q_EMIT authenticationComplete(); | 155 | Q_EMIT authenticationComplete(); |
18 | 154 | } | 156 | } |
19 | 155 | 157 | ||
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-21 14:47:14 +0000 | |||
23 | @@ -35,7 +35,7 @@ | |||
24 | 35 | Q_OBJECT | 35 | Q_OBJECT |
25 | 36 | 36 | ||
26 | 37 | Q_PROPERTY(bool active READ isActive WRITE setIsActive NOTIFY isActiveChanged) | 37 | Q_PROPERTY(bool active READ isActive WRITE setIsActive NOTIFY isActiveChanged) |
28 | 38 | Q_PROPERTY(bool authenticated READ isAuthenticated) | 38 | Q_PROPERTY(bool authenticated READ isAuthenticated NOTIFY isAuthenticatedChanged) |
29 | 39 | Q_PROPERTY(QString authenticationUser READ authenticationUser NOTIFY authenticationUserChanged) | 39 | Q_PROPERTY(QString authenticationUser READ authenticationUser NOTIFY authenticationUserChanged) |
30 | 40 | Q_PROPERTY(bool promptless READ promptless NOTIFY promptlessChanged) | 40 | Q_PROPERTY(bool promptless READ promptless NOTIFY promptlessChanged) |
31 | 41 | 41 | ||
32 | @@ -59,6 +59,7 @@ | |||
33 | 59 | void authenticationComplete(); | 59 | void authenticationComplete(); |
34 | 60 | void authenticationUserChanged(const QString &user); | 60 | void authenticationUserChanged(const QString &user); |
35 | 61 | void isActiveChanged(); | 61 | void isActiveChanged(); |
36 | 62 | void isAuthenticatedChanged(); | ||
37 | 62 | void promptlessChanged(); | 63 | void promptlessChanged(); |
38 | 63 | void showGreeter(); | 64 | void showGreeter(); |
39 | 64 | 65 | ||
40 | 65 | 66 | ||
41 | === modified file 'plugins/Ubuntu/CMakeLists.txt' | |||
42 | --- plugins/Ubuntu/CMakeLists.txt 2014-07-30 11:08:29 +0000 | |||
43 | +++ plugins/Ubuntu/CMakeLists.txt 2014-08-21 14:47:14 +0000 | |||
44 | @@ -1,3 +1,4 @@ | |||
45 | 1 | add_subdirectory(Connectivity) | ||
46 | 1 | add_subdirectory(Gestures) | 2 | add_subdirectory(Gestures) |
47 | 2 | add_subdirectory(DownloadDaemonListener) | 3 | add_subdirectory(DownloadDaemonListener) |
48 | 3 | add_subdirectory(Payments) | 4 | add_subdirectory(Payments) |
49 | 4 | 5 | ||
50 | === added directory 'plugins/Ubuntu/Connectivity' | |||
51 | === added file 'plugins/Ubuntu/Connectivity/CMakeLists.txt' | |||
52 | --- plugins/Ubuntu/Connectivity/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
53 | +++ plugins/Ubuntu/Connectivity/CMakeLists.txt 2014-08-21 14:47:14 +0000 | |||
54 | @@ -0,0 +1,10 @@ | |||
55 | 1 | set(CONNECTIVITY_SOURCES | ||
56 | 2 | plugin.cpp | ||
57 | 3 | Connectivity.cpp | ||
58 | 4 | ) | ||
59 | 5 | |||
60 | 6 | add_library(Connectivity MODULE ${CONNECTIVITY_SOURCES}) | ||
61 | 7 | |||
62 | 8 | qt5_use_modules(Connectivity Qml DBus Core) | ||
63 | 9 | |||
64 | 10 | add_unity8_plugin(Ubuntu.Connectivity 0.1 Ubuntu/Connectivity TARGETS Connectivity) | ||
65 | 0 | 11 | ||
66 | === added file 'plugins/Ubuntu/Connectivity/Connectivity.cpp' | |||
67 | --- plugins/Ubuntu/Connectivity/Connectivity.cpp 1970-01-01 00:00:00 +0000 | |||
68 | +++ plugins/Ubuntu/Connectivity/Connectivity.cpp 2014-08-21 14:47:14 +0000 | |||
69 | @@ -0,0 +1,33 @@ | |||
70 | 1 | /* | ||
71 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
72 | 3 | * | ||
73 | 4 | * This program is free software; you can redistribute it and/or modify | ||
74 | 5 | * it under the terms of the GNU General Public License as published by | ||
75 | 6 | * the Free Software Foundation; version 3. | ||
76 | 7 | * | ||
77 | 8 | * This program is distributed in the hope that it will be useful, | ||
78 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
79 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
80 | 11 | * GNU General Public License for more details. | ||
81 | 12 | * | ||
82 | 13 | * You should have received a copy of the GNU General Public License | ||
83 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
84 | 15 | */ | ||
85 | 16 | |||
86 | 17 | #include "Connectivity.h" | ||
87 | 18 | #include <QDBusConnection> | ||
88 | 19 | #include <QDBusInterface> | ||
89 | 20 | #include <QDBusPendingCall> | ||
90 | 21 | |||
91 | 22 | Connectivity::Connectivity(QObject *parent) | ||
92 | 23 | : QObject(parent) | ||
93 | 24 | { | ||
94 | 25 | } | ||
95 | 26 | |||
96 | 27 | void Connectivity::unlockAllModems() | ||
97 | 28 | { | ||
98 | 29 | QDBusInterface iface("com.ubuntu.connectivity1", | ||
99 | 30 | "/com/ubuntu/connectivity1/Private", | ||
100 | 31 | "com.ubuntu.connectivity1.Private"); | ||
101 | 32 | iface.asyncCall("UnlockAllModems"); | ||
102 | 33 | } | ||
103 | 0 | 34 | ||
104 | === added file 'plugins/Ubuntu/Connectivity/Connectivity.h' | |||
105 | --- plugins/Ubuntu/Connectivity/Connectivity.h 1970-01-01 00:00:00 +0000 | |||
106 | +++ plugins/Ubuntu/Connectivity/Connectivity.h 2014-08-21 14:47:14 +0000 | |||
107 | @@ -0,0 +1,33 @@ | |||
108 | 1 | /* | ||
109 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
110 | 3 | * | ||
111 | 4 | * This program is free software; you can redistribute it and/or modify | ||
112 | 5 | * it under the terms of the GNU General Public License as published by | ||
113 | 6 | * the Free Software Foundation; version 3. | ||
114 | 7 | * | ||
115 | 8 | * This program is distributed in the hope that it will be useful, | ||
116 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
117 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
118 | 11 | * GNU General Public License for more details. | ||
119 | 12 | * | ||
120 | 13 | * You should have received a copy of the GNU General Public License | ||
121 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
122 | 15 | */ | ||
123 | 16 | |||
124 | 17 | #ifndef CONNECTIVITY_H | ||
125 | 18 | #define CONNECTIVITY_H | ||
126 | 19 | |||
127 | 20 | #include <QObject> | ||
128 | 21 | |||
129 | 22 | class Connectivity : public QObject | ||
130 | 23 | { | ||
131 | 24 | Q_OBJECT | ||
132 | 25 | Q_DISABLE_COPY(Connectivity) | ||
133 | 26 | |||
134 | 27 | public: | ||
135 | 28 | explicit Connectivity(QObject *parent = 0); | ||
136 | 29 | |||
137 | 30 | Q_INVOKABLE void unlockAllModems(); | ||
138 | 31 | }; | ||
139 | 32 | |||
140 | 33 | #endif // CONNECTIVITY_H | ||
141 | 0 | 34 | ||
142 | === added file 'plugins/Ubuntu/Connectivity/Connectivity.qmltypes' | |||
143 | --- plugins/Ubuntu/Connectivity/Connectivity.qmltypes 1970-01-01 00:00:00 +0000 | |||
144 | +++ plugins/Ubuntu/Connectivity/Connectivity.qmltypes 2014-08-21 14:47:14 +0000 | |||
145 | @@ -0,0 +1,17 @@ | |||
146 | 1 | import QtQuick.tooling 1.1 | ||
147 | 2 | |||
148 | 3 | // This file describes the plugin-supplied types contained in the library. | ||
149 | 4 | // It is used for QML tooling purposes only. | ||
150 | 5 | // | ||
151 | 6 | // This file was auto-generated by: | ||
152 | 7 | // 'qmlplugindump -notrelocatable Ubuntu.Connectivity 0.1 plugins' | ||
153 | 8 | |||
154 | 9 | Module { | ||
155 | 10 | Component { | ||
156 | 11 | name: "Connectivity" | ||
157 | 12 | prototype: "QObject" | ||
158 | 13 | exports: ["Ubuntu.Connectivity/Connectivity 0.1"] | ||
159 | 14 | exportMetaObjectRevisions: [0] | ||
160 | 15 | Method { name: "unlockAllModems" } | ||
161 | 16 | } | ||
162 | 17 | } | ||
163 | 0 | 18 | ||
164 | === added file 'plugins/Ubuntu/Connectivity/plugin.cpp' | |||
165 | --- plugins/Ubuntu/Connectivity/plugin.cpp 1970-01-01 00:00:00 +0000 | |||
166 | +++ plugins/Ubuntu/Connectivity/plugin.cpp 2014-08-21 14:47:14 +0000 | |||
167 | @@ -0,0 +1,34 @@ | |||
168 | 1 | /* | ||
169 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
170 | 3 | * | ||
171 | 4 | * This program is free software; you can redistribute it and/or modify | ||
172 | 5 | * it under the terms of the GNU General Public License as published by | ||
173 | 6 | * the Free Software Foundation; version 3. | ||
174 | 7 | * | ||
175 | 8 | * This program is distributed in the hope that it will be useful, | ||
176 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
177 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
178 | 11 | * GNU General Public License for more details. | ||
179 | 12 | * | ||
180 | 13 | * You should have received a copy of the GNU General Public License | ||
181 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
182 | 15 | */ | ||
183 | 16 | |||
184 | 17 | #include "plugin.h" | ||
185 | 18 | #include "Connectivity.h" | ||
186 | 19 | |||
187 | 20 | #include <QtQml> | ||
188 | 21 | |||
189 | 22 | static QObject *service_provider(QQmlEngine *engine, QJSEngine *scriptEngine) | ||
190 | 23 | { | ||
191 | 24 | Q_UNUSED(engine) | ||
192 | 25 | Q_UNUSED(scriptEngine) | ||
193 | 26 | return new Connectivity(); | ||
194 | 27 | } | ||
195 | 28 | |||
196 | 29 | void BackendPlugin::registerTypes(const char *uri) | ||
197 | 30 | { | ||
198 | 31 | Q_ASSERT(uri == QLatin1String("Ubuntu.Connectivity")); | ||
199 | 32 | |||
200 | 33 | qmlRegisterSingletonType<Connectivity>(uri, 0, 1, "Connectivity", service_provider); | ||
201 | 34 | } | ||
202 | 0 | 35 | ||
203 | === added file 'plugins/Ubuntu/Connectivity/plugin.h' | |||
204 | --- plugins/Ubuntu/Connectivity/plugin.h 1970-01-01 00:00:00 +0000 | |||
205 | +++ plugins/Ubuntu/Connectivity/plugin.h 2014-08-21 14:47:14 +0000 | |||
206 | @@ -0,0 +1,31 @@ | |||
207 | 1 | /* | ||
208 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
209 | 3 | * | ||
210 | 4 | * This program is free software; you can redistribute it and/or modify | ||
211 | 5 | * it under the terms of the GNU General Public License as published by | ||
212 | 6 | * the Free Software Foundation; version 3. | ||
213 | 7 | * | ||
214 | 8 | * This program is distributed in the hope that it will be useful, | ||
215 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
216 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
217 | 11 | * GNU General Public License for more details. | ||
218 | 12 | * | ||
219 | 13 | * You should have received a copy of the GNU General Public License | ||
220 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
221 | 15 | */ | ||
222 | 16 | |||
223 | 17 | #ifndef CONNECTIVITY_PLUGIN_H | ||
224 | 18 | #define CONNECTIVITY_PLUGIN_H | ||
225 | 19 | |||
226 | 20 | #include <QQmlExtensionPlugin> | ||
227 | 21 | |||
228 | 22 | class BackendPlugin : public QQmlExtensionPlugin | ||
229 | 23 | { | ||
230 | 24 | Q_OBJECT | ||
231 | 25 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") | ||
232 | 26 | |||
233 | 27 | public: | ||
234 | 28 | void registerTypes(const char *uri); | ||
235 | 29 | }; | ||
236 | 30 | |||
237 | 31 | #endif // CONNECTIVITY_PLUGIN_H | ||
238 | 0 | 32 | ||
239 | === added file 'plugins/Ubuntu/Connectivity/qmldir' | |||
240 | --- plugins/Ubuntu/Connectivity/qmldir 1970-01-01 00:00:00 +0000 | |||
241 | +++ plugins/Ubuntu/Connectivity/qmldir 2014-08-21 14:47:14 +0000 | |||
242 | @@ -0,0 +1,3 @@ | |||
243 | 1 | module Ubuntu.Connectivity | ||
244 | 2 | plugin Connectivity | ||
245 | 3 | typeinfo Connectivity.qmltypes | ||
246 | 0 | 4 | ||
247 | === modified file 'qml/Notifications/NotificationMenuItemFactory.qml' | |||
248 | --- qml/Notifications/NotificationMenuItemFactory.qml 2014-08-14 01:28:23 +0000 | |||
249 | +++ qml/Notifications/NotificationMenuItemFactory.qml 2014-08-21 14:47:14 +0000 | |||
250 | @@ -127,6 +127,11 @@ | |||
251 | 127 | onCancel: { | 127 | onCancel: { |
252 | 128 | menuModel.activate(menuIndex, false); | 128 | menuModel.activate(menuIndex, false); |
253 | 129 | } | 129 | } |
254 | 130 | |||
255 | 131 | onEmergencyCall: { | ||
256 | 132 | shell.activateApplication("dialer-app") | ||
257 | 133 | menuModel.activate(menuIndex, false) | ||
258 | 134 | } | ||
259 | 130 | } | 135 | } |
260 | 131 | } | 136 | } |
261 | 132 | } | 137 | } |
262 | 133 | 138 | ||
263 | === modified file 'qml/Shell.qml' | |||
264 | --- qml/Shell.qml 2014-08-20 09:19:32 +0000 | |||
265 | +++ qml/Shell.qml 2014-08-21 14:47:14 +0000 | |||
266 | @@ -20,6 +20,7 @@ | |||
267 | 20 | import Unity.Application 0.1 | 20 | import Unity.Application 0.1 |
268 | 21 | import Ubuntu.Components 0.1 | 21 | import Ubuntu.Components 0.1 |
269 | 22 | import Ubuntu.Components.Popups 1.0 | 22 | import Ubuntu.Components.Popups 1.0 |
270 | 23 | import Ubuntu.Connectivity 0.1 | ||
271 | 23 | import Ubuntu.Gestures 0.1 | 24 | import Ubuntu.Gestures 0.1 |
272 | 24 | import Ubuntu.SystemImage 0.1 | 25 | import Ubuntu.SystemImage 0.1 |
273 | 25 | import Unity.Launcher 0.1 | 26 | import Unity.Launcher 0.1 |
274 | @@ -416,6 +417,10 @@ | |||
275 | 416 | } | 417 | } |
276 | 417 | } | 418 | } |
277 | 418 | 419 | ||
278 | 420 | Component.onCompleted: { | ||
279 | 421 | Connectivity.unlockAllModems() | ||
280 | 422 | } | ||
281 | 423 | |||
282 | 419 | onUnlocked: greeter.hide() | 424 | onUnlocked: greeter.hide() |
283 | 420 | onSelected: { | 425 | onSelected: { |
284 | 421 | // Update launcher items for new user | 426 | // Update launcher items for new user |
285 | 422 | 427 | ||
286 | === modified file 'tests/mocks/Ubuntu/CMakeLists.txt' | |||
287 | --- tests/mocks/Ubuntu/CMakeLists.txt 2014-07-30 11:08:29 +0000 | |||
288 | +++ tests/mocks/Ubuntu/CMakeLists.txt 2014-08-21 14:47:14 +0000 | |||
289 | @@ -1,3 +1,4 @@ | |||
290 | 1 | add_subdirectory(Connectivity) | ||
291 | 1 | add_subdirectory(DownloadDaemonListener) | 2 | add_subdirectory(DownloadDaemonListener) |
292 | 2 | add_subdirectory(Payments) | 3 | add_subdirectory(Payments) |
293 | 3 | add_subdirectory(SystemImage) | 4 | add_subdirectory(SystemImage) |
294 | 4 | 5 | ||
295 | === added directory 'tests/mocks/Ubuntu/Connectivity' | |||
296 | === added file 'tests/mocks/Ubuntu/Connectivity/CMakeLists.txt' | |||
297 | --- tests/mocks/Ubuntu/Connectivity/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
298 | +++ tests/mocks/Ubuntu/Connectivity/CMakeLists.txt 2014-08-21 14:47:14 +0000 | |||
299 | @@ -0,0 +1,10 @@ | |||
300 | 1 | set(MOCK_CONNECTIVITY_SOURCES | ||
301 | 2 | plugin.cpp | ||
302 | 3 | MockConnectivity.cpp | ||
303 | 4 | ) | ||
304 | 5 | |||
305 | 6 | add_library(MockConnectivity MODULE ${MOCK_CONNECTIVITY_SOURCES}) | ||
306 | 7 | |||
307 | 8 | qt5_use_modules(MockConnectivity Qml Quick Core) | ||
308 | 9 | |||
309 | 10 | add_unity8_mock(Ubuntu.Connectivity 0.1 Ubuntu/Connectivity TARGETS MockConnectivity) | ||
310 | 0 | 11 | ||
311 | === added file 'tests/mocks/Ubuntu/Connectivity/Connectivity.qmltypes' | |||
312 | --- tests/mocks/Ubuntu/Connectivity/Connectivity.qmltypes 1970-01-01 00:00:00 +0000 | |||
313 | +++ tests/mocks/Ubuntu/Connectivity/Connectivity.qmltypes 2014-08-21 14:47:14 +0000 | |||
314 | @@ -0,0 +1,18 @@ | |||
315 | 1 | import QtQuick.tooling 1.1 | ||
316 | 2 | |||
317 | 3 | // This file describes the plugin-supplied types contained in the library. | ||
318 | 4 | // It is used for QML tooling purposes only. | ||
319 | 5 | // | ||
320 | 6 | // This file was auto-generated by: | ||
321 | 7 | // 'qmlplugindump -notrelocatable Ubuntu.Connectivity 0.1 plugins' | ||
322 | 8 | |||
323 | 9 | Module { | ||
324 | 10 | Component { | ||
325 | 11 | name: "MockConnectivity" | ||
326 | 12 | prototype: "QObject" | ||
327 | 13 | exports: ["Ubuntu.Connectivity/Connectivity 0.1"] | ||
328 | 14 | exportMetaObjectRevisions: [0] | ||
329 | 15 | Signal { name: "unlockingAllModems" } | ||
330 | 16 | Method { name: "unlockAllModems" } | ||
331 | 17 | } | ||
332 | 18 | } | ||
333 | 0 | 19 | ||
334 | === added file 'tests/mocks/Ubuntu/Connectivity/MockConnectivity.cpp' | |||
335 | --- tests/mocks/Ubuntu/Connectivity/MockConnectivity.cpp 1970-01-01 00:00:00 +0000 | |||
336 | +++ tests/mocks/Ubuntu/Connectivity/MockConnectivity.cpp 2014-08-21 14:47:14 +0000 | |||
337 | @@ -0,0 +1,27 @@ | |||
338 | 1 | /* | ||
339 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
340 | 3 | * | ||
341 | 4 | * This program is free software; you can redistribute it and/or modify | ||
342 | 5 | * it under the terms of the GNU General Public License as published by | ||
343 | 6 | * the Free Software Foundation; version 3. | ||
344 | 7 | * | ||
345 | 8 | * This program is distributed in the hope that it will be useful, | ||
346 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
347 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
348 | 11 | * GNU General Public License for more details. | ||
349 | 12 | * | ||
350 | 13 | * You should have received a copy of the GNU General Public License | ||
351 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
352 | 15 | */ | ||
353 | 16 | |||
354 | 17 | #include "MockConnectivity.h" | ||
355 | 18 | |||
356 | 19 | MockConnectivity::MockConnectivity(QObject *parent) | ||
357 | 20 | : QObject(parent) | ||
358 | 21 | { | ||
359 | 22 | } | ||
360 | 23 | |||
361 | 24 | void MockConnectivity::unlockAllModems() | ||
362 | 25 | { | ||
363 | 26 | Q_EMIT unlockingAllModems(); | ||
364 | 27 | } | ||
365 | 0 | 28 | ||
366 | === added file 'tests/mocks/Ubuntu/Connectivity/MockConnectivity.h' | |||
367 | --- tests/mocks/Ubuntu/Connectivity/MockConnectivity.h 1970-01-01 00:00:00 +0000 | |||
368 | +++ tests/mocks/Ubuntu/Connectivity/MockConnectivity.h 2014-08-21 14:47:14 +0000 | |||
369 | @@ -0,0 +1,36 @@ | |||
370 | 1 | /* | ||
371 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
372 | 3 | * | ||
373 | 4 | * This program is free software; you can redistribute it and/or modify | ||
374 | 5 | * it under the terms of the GNU General Public License as published by | ||
375 | 6 | * the Free Software Foundation; version 3. | ||
376 | 7 | * | ||
377 | 8 | * This program is distributed in the hope that it will be useful, | ||
378 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
379 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
380 | 11 | * GNU General Public License for more details. | ||
381 | 12 | * | ||
382 | 13 | * You should have received a copy of the GNU General Public License | ||
383 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
384 | 15 | */ | ||
385 | 16 | |||
386 | 17 | #ifndef MOCK_CONNECTIVITY_H | ||
387 | 18 | #define MOCK_CONNECTIVITY_H | ||
388 | 19 | |||
389 | 20 | #include <QObject> | ||
390 | 21 | |||
391 | 22 | class MockConnectivity : public QObject | ||
392 | 23 | { | ||
393 | 24 | Q_OBJECT | ||
394 | 25 | Q_DISABLE_COPY(MockConnectivity) | ||
395 | 26 | |||
396 | 27 | public: | ||
397 | 28 | explicit MockConnectivity(QObject *parent = 0); | ||
398 | 29 | |||
399 | 30 | Q_INVOKABLE void unlockAllModems(); | ||
400 | 31 | |||
401 | 32 | Q_SIGNALS: | ||
402 | 33 | void unlockingAllModems(); // only for mock | ||
403 | 34 | }; | ||
404 | 35 | |||
405 | 36 | #endif // MOCK_CONNECTIVITY_H | ||
406 | 0 | 37 | ||
407 | === added file 'tests/mocks/Ubuntu/Connectivity/plugin.cpp' | |||
408 | --- tests/mocks/Ubuntu/Connectivity/plugin.cpp 1970-01-01 00:00:00 +0000 | |||
409 | +++ tests/mocks/Ubuntu/Connectivity/plugin.cpp 2014-08-21 14:47:14 +0000 | |||
410 | @@ -0,0 +1,34 @@ | |||
411 | 1 | /* | ||
412 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
413 | 3 | * | ||
414 | 4 | * This program is free software; you can redistribute it and/or modify | ||
415 | 5 | * it under the terms of the GNU General Public License as published by | ||
416 | 6 | * the Free Software Foundation; version 3. | ||
417 | 7 | * | ||
418 | 8 | * This program is distributed in the hope that it will be useful, | ||
419 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
420 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
421 | 11 | * GNU General Public License for more details. | ||
422 | 12 | * | ||
423 | 13 | * You should have received a copy of the GNU General Public License | ||
424 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
425 | 15 | */ | ||
426 | 16 | |||
427 | 17 | #include "plugin.h" | ||
428 | 18 | #include "MockConnectivity.h" | ||
429 | 19 | |||
430 | 20 | #include <QtQml> | ||
431 | 21 | |||
432 | 22 | static QObject *service_provider(QQmlEngine *engine, QJSEngine *scriptEngine) | ||
433 | 23 | { | ||
434 | 24 | Q_UNUSED(engine) | ||
435 | 25 | Q_UNUSED(scriptEngine) | ||
436 | 26 | return new MockConnectivity(); | ||
437 | 27 | } | ||
438 | 28 | |||
439 | 29 | void BackendPlugin::registerTypes(const char *uri) | ||
440 | 30 | { | ||
441 | 31 | Q_ASSERT(uri == QLatin1String("Ubuntu.Connectivity")); | ||
442 | 32 | |||
443 | 33 | qmlRegisterSingletonType<MockConnectivity>(uri, 0, 1, "Connectivity", service_provider); | ||
444 | 34 | } | ||
445 | 0 | 35 | ||
446 | === added file 'tests/mocks/Ubuntu/Connectivity/plugin.h' | |||
447 | --- tests/mocks/Ubuntu/Connectivity/plugin.h 1970-01-01 00:00:00 +0000 | |||
448 | +++ tests/mocks/Ubuntu/Connectivity/plugin.h 2014-08-21 14:47:14 +0000 | |||
449 | @@ -0,0 +1,31 @@ | |||
450 | 1 | /* | ||
451 | 2 | * Copyright (C) 2014 Canonical, Ltd. | ||
452 | 3 | * | ||
453 | 4 | * This program is free software; you can redistribute it and/or modify | ||
454 | 5 | * it under the terms of the GNU General Public License as published by | ||
455 | 6 | * the Free Software Foundation; version 3. | ||
456 | 7 | * | ||
457 | 8 | * This program is distributed in the hope that it will be useful, | ||
458 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
459 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
460 | 11 | * GNU General Public License for more details. | ||
461 | 12 | * | ||
462 | 13 | * You should have received a copy of the GNU General Public License | ||
463 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
464 | 15 | */ | ||
465 | 16 | |||
466 | 17 | #ifndef MOCK_CONNECTIVITY_PLUGIN_H | ||
467 | 18 | #define MOCK_CONNECTIVITY_PLUGIN_H | ||
468 | 19 | |||
469 | 20 | #include <QQmlExtensionPlugin> | ||
470 | 21 | |||
471 | 22 | class BackendPlugin : public QQmlExtensionPlugin | ||
472 | 23 | { | ||
473 | 24 | Q_OBJECT | ||
474 | 25 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") | ||
475 | 26 | |||
476 | 27 | public: | ||
477 | 28 | void registerTypes(const char *uri); | ||
478 | 29 | }; | ||
479 | 30 | |||
480 | 31 | #endif // MOCK_CONNECTIVITY_PLUGIN_H | ||
481 | 0 | 32 | ||
482 | === added file 'tests/mocks/Ubuntu/Connectivity/qmldir' | |||
483 | --- tests/mocks/Ubuntu/Connectivity/qmldir 1970-01-01 00:00:00 +0000 | |||
484 | +++ tests/mocks/Ubuntu/Connectivity/qmldir 2014-08-21 14:47:14 +0000 | |||
485 | @@ -0,0 +1,3 @@ | |||
486 | 1 | module Ubuntu.Connectivity | ||
487 | 2 | plugin MockConnectivity | ||
488 | 3 | typeinfo Connectivity.qmltypes | ||
489 | 0 | 4 | ||
490 | === modified file 'tests/qmltests/tst_Shell.qml' | |||
491 | --- tests/qmltests/tst_Shell.qml 2014-07-29 11:35:10 +0000 | |||
492 | +++ tests/qmltests/tst_Shell.qml 2014-08-21 14:47:14 +0000 | |||
493 | @@ -21,6 +21,7 @@ | |||
494 | 21 | import QtTest 1.0 | 21 | import QtTest 1.0 |
495 | 22 | import GSettings 1.0 | 22 | import GSettings 1.0 |
496 | 23 | import LightDM 0.1 as LightDM | 23 | import LightDM 0.1 as LightDM |
497 | 24 | import Ubuntu.Connectivity 0.1 | ||
498 | 24 | import Unity.Application 0.1 | 25 | import Unity.Application 0.1 |
499 | 25 | import Unity.Test 0.1 as UT | 26 | import Unity.Test 0.1 as UT |
500 | 26 | import Powerd 0.1 | 27 | import Powerd 0.1 |
501 | @@ -28,6 +29,7 @@ | |||
502 | 28 | import "../../qml" | 29 | import "../../qml" |
503 | 29 | 30 | ||
504 | 30 | Item { | 31 | Item { |
505 | 32 | id: root | ||
506 | 31 | width: shell.width | 33 | width: shell.width |
507 | 32 | height: shell.height | 34 | height: shell.height |
508 | 33 | 35 | ||
509 | @@ -51,6 +53,11 @@ | |||
510 | 51 | id: shell | 53 | id: shell |
511 | 52 | } | 54 | } |
512 | 53 | 55 | ||
513 | 56 | Component { | ||
514 | 57 | id: shellComponent | ||
515 | 58 | Shell {} | ||
516 | 59 | } | ||
517 | 60 | |||
518 | 54 | SignalSpy { | 61 | SignalSpy { |
519 | 55 | id: sessionSpy | 62 | id: sessionSpy |
520 | 56 | signalName: "sessionStarted" | 63 | signalName: "sessionStarted" |
521 | @@ -61,6 +68,12 @@ | |||
522 | 61 | signalName: "setCurrentScopeCalled" | 68 | signalName: "setCurrentScopeCalled" |
523 | 62 | } | 69 | } |
524 | 63 | 70 | ||
525 | 71 | SignalSpy { | ||
526 | 72 | id: unlockAllModemsSpy | ||
527 | 73 | target: Connectivity | ||
528 | 74 | signalName: "unlockingAllModems" | ||
529 | 75 | } | ||
530 | 76 | |||
531 | 64 | UT.UnityTestCase { | 77 | UT.UnityTestCase { |
532 | 65 | name: "Shell" | 78 | name: "Shell" |
533 | 66 | when: windowShown | 79 | when: windowShown |
534 | @@ -431,5 +444,24 @@ | |||
535 | 431 | 444 | ||
536 | 432 | touchRelease(shell); | 445 | touchRelease(shell); |
537 | 433 | } | 446 | } |
538 | 447 | |||
539 | 448 | function test_unlockedProperties() { | ||
540 | 449 | // Confirm that various properties have the correct values when unlocked | ||
541 | 450 | tryCompare(shell, "locked", false) | ||
542 | 451 | |||
543 | 452 | var launcher = findChild(shell, "launcher") | ||
544 | 453 | tryCompare(launcher, "available", true) | ||
545 | 454 | |||
546 | 455 | var indicators = findChild(shell, "indicators") | ||
547 | 456 | tryCompare(indicators, "available", true) | ||
548 | 457 | } | ||
549 | 458 | |||
550 | 459 | function test_unlockAllModemsOnBoot() { | ||
551 | 460 | unlockAllModemsSpy.clear() | ||
552 | 461 | // actually create an object so we notice the onCompleted signal | ||
553 | 462 | var greeter = shellComponent.createObject(root) | ||
554 | 463 | tryCompare(unlockAllModemsSpy, "count", 1) | ||
555 | 464 | greeter.destroy() | ||
556 | 465 | } | ||
557 | 434 | } | 466 | } |
558 | 435 | } | 467 | } |
FAILED: Continuous integration, rev:1162 jenkins. qa.ubuntu. com/job/ unity8- ci/3942/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- utopic- touch/3625 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- utopic/ 943/console jenkins. qa.ubuntu. com/job/ unity8- utopic- amd64-ci/ 1036 jenkins. qa.ubuntu. com/job/ unity8- utopic- armhf-ci/ 1036 jenkins. qa.ubuntu. com/job/ unity8- utopic- armhf-ci/ 1036/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity8- utopic- i386-ci/ 1036 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- mako/3515 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/4872 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/4872/ artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 11585
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity8- ci/3942/ rebuild
http://