Merge lp:~osomon/webbrowser-app/visual-tweaks into lp:webbrowser-app
- visual-tweaks
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Olivier Tilloy |
Approved revision: | 1375 |
Merged at revision: | 1371 |
Proposed branch: | lp:~osomon/webbrowser-app/visual-tweaks |
Merge into: | lp:webbrowser-app |
Diff against target: |
598 lines (+129/-110) 11 files modified
debian/control (+2/-0) src/Ubuntu/Web/ItemSelector02.qml (+7/-5) src/app/webbrowser/Browser.qml (+3/-0) src/app/webbrowser/HistoryViewWide.qml (+3/-13) src/app/webbrowser/NavigationBar.qml (+1/-0) src/app/webbrowser/NewTabViewWide.qml (+12/-1) src/app/webbrowser/SettingsPage.qml (+64/-38) src/app/webbrowser/TabsList.qml (+2/-2) src/app/webbrowser/UrlDelegate.qml (+9/-16) tests/autopilot/webbrowser_app/emulators/browser.py (+7/-12) tests/autopilot/webbrowser_app/tests/test_settings.py (+19/-23) |
To merge this branch: | bzr merge lp:~osomon/webbrowser-app/visual-tweaks |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Needs Fixing | |
Ubuntu Phablet Team | Pending | ||
Review via email: mp+287169@code.launchpad.net |
Commit message
Visual tweaks per designers’ review.
Description of the change
- 1364. By Olivier Tilloy
-
Update tabs list background color, per visual design request.
- 1365. By Olivier Tilloy
-
Make the drawer menu’s inverse mouse area the topmost item to ensure that the tabs list cannot be opened while the drawer menu is displayed.
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1365
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1366. By Olivier Tilloy
-
Merge the latest changes from trunk and resolve a minor conflict.
- 1367. By Olivier Tilloy
-
Fix activating entries in the drawer menu.
- 1368. By Olivier Tilloy
-
Update autopilot tests.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1366
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1368
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 1369. By Olivier Tilloy
-
Fix unit tests.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1369
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 1370. By Olivier Tilloy
-
Fix one more flake8 error.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1370
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1371. By Olivier Tilloy
-
Remove UbuntuShape around favicons in history views, per visual design request.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1371
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1372. By Olivier Tilloy
-
Fix a crash that seems to result from the interaction of the custom DirectionalDragArea element and a topmost InverseMouseArea.
- 1373. By Olivier Tilloy
-
Simplify code.
- 1374. By Olivier Tilloy
-
Use a RowLayout to make code more readable.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1372
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1375. By Olivier Tilloy
-
Downgrade module import version to make it compatible with Qt 5.4.1 which is in vivid.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1374
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1375
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'debian/control' |
2 | --- debian/control 2016-02-09 21:19:41 +0000 |
3 | +++ debian/control 2016-03-01 11:22:46 +0000 |
4 | @@ -21,6 +21,7 @@ |
5 | qml-module-qt-labs-folderlistmodel, |
6 | qml-module-qt-labs-settings, |
7 | qml-module-qtquick2 (>= 5.4), |
8 | + qml-module-qtquick-layouts, |
9 | qml-module-qttest, |
10 | qt5-default, |
11 | qt5-qmake, |
12 | @@ -48,6 +49,7 @@ |
13 | qml-module-qt-labs-folderlistmodel, |
14 | qml-module-qt-labs-settings, |
15 | qml-module-qtquick2 (>= 5.4), |
16 | + qml-module-qtquick-layouts, |
17 | qml-module-qtquick-window2 (>= 5.3), |
18 | qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3), |
19 | qtdeclarative5-ubuntu-web-plugin (= ${binary:Version}), |
20 | |
21 | === modified file 'src/Ubuntu/Web/ItemSelector02.qml' |
22 | --- src/Ubuntu/Web/ItemSelector02.qml 2015-08-10 15:22:00 +0000 |
23 | +++ src/Ubuntu/Web/ItemSelector02.qml 2016-03-01 11:22:46 +0000 |
24 | @@ -1,5 +1,5 @@ |
25 | /* |
26 | - * Copyright 2013-2015 Canonical Ltd. |
27 | + * Copyright 2013-2016 Canonical Ltd. |
28 | * |
29 | * This file is part of webbrowser-app. |
30 | * |
31 | @@ -18,7 +18,7 @@ |
32 | |
33 | import QtQuick 2.4 |
34 | import Ubuntu.Components 1.3 |
35 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
36 | +import Ubuntu.Components.ListItems 1.3 as ListItems |
37 | import Ubuntu.Components.Popups 1.3 |
38 | |
39 | Popover { |
40 | @@ -38,8 +38,10 @@ |
41 | |
42 | model: selectorModel.items |
43 | |
44 | - delegate: ListItem.Standard { |
45 | - text: model.text |
46 | + delegate: ListItem { |
47 | + ListItemLayout { |
48 | + title.text: model.text |
49 | + } |
50 | enabled: model.enabled |
51 | selected: model.selected |
52 | onClicked: { |
53 | @@ -49,7 +51,7 @@ |
54 | } |
55 | |
56 | section.property: "group" |
57 | - section.delegate: ListItem.Header { |
58 | + section.delegate: ListItems.Header { |
59 | text: section |
60 | } |
61 | |
62 | |
63 | === modified file 'src/app/webbrowser/Browser.qml' |
64 | --- src/app/webbrowser/Browser.qml 2016-02-23 11:24:33 +0000 |
65 | +++ src/app/webbrowser/Browser.qml 2016-03-01 11:22:46 +0000 |
66 | @@ -769,6 +769,9 @@ |
67 | (osk.state == "hidden") && (recentView.state == "") |
68 | visible: enabled |
69 | height: visible ? units.gu(4) : 0 |
70 | + // Ensure that this ends up below the chrome, so that the |
71 | + // drawer menu’s inverse mouse area covers it. |
72 | + z: -1 |
73 | |
74 | onClicked: { |
75 | recentView.state = "shown" |
76 | |
77 | === modified file 'src/app/webbrowser/HistoryViewWide.qml' |
78 | --- src/app/webbrowser/HistoryViewWide.qml 2016-01-28 18:35:14 +0000 |
79 | +++ src/app/webbrowser/HistoryViewWide.qml 2016-03-01 11:22:46 +0000 |
80 | @@ -306,19 +306,9 @@ |
81 | title: Highlight.highlightTerms(model.title ? model.title : model.url, searchQuery.terms) |
82 | url: Highlight.highlightTerms(model.url, searchQuery.terms) |
83 | |
84 | - headerComponent: Component { |
85 | - Item { |
86 | - objectName: "historySectionDelegate" |
87 | - height: units.gu(3) |
88 | - width: timeLabel.width |
89 | - |
90 | - Label { |
91 | - id: timeLabel |
92 | - anchors.centerIn: parent |
93 | - text: Qt.formatTime(model.lastVisit) |
94 | - fontSize: "xx-small" |
95 | - } |
96 | - } |
97 | + headerComponent: Label { |
98 | + text: Qt.formatTime(model.lastVisit) |
99 | + fontSize: "xx-small" |
100 | } |
101 | |
102 | onClicked: { |
103 | |
104 | === modified file 'src/app/webbrowser/NavigationBar.qml' |
105 | --- src/app/webbrowser/NavigationBar.qml 2016-02-18 09:29:20 +0000 |
106 | +++ src/app/webbrowser/NavigationBar.qml 2016-03-01 11:22:46 +0000 |
107 | @@ -256,6 +256,7 @@ |
108 | clip: actionsListView.y != 0 |
109 | |
110 | InverseMouseArea { |
111 | + anchors.fill: parent |
112 | enabled: drawer.opened |
113 | onPressed: drawer.opened = false |
114 | } |
115 | |
116 | === modified file 'src/app/webbrowser/NewTabViewWide.qml' |
117 | --- src/app/webbrowser/NewTabViewWide.qml 2016-02-02 11:09:49 +0000 |
118 | +++ src/app/webbrowser/NewTabViewWide.qml 2016-03-01 11:22:46 +0000 |
119 | @@ -112,7 +112,7 @@ |
120 | left: parent.left |
121 | right: parent.right |
122 | } |
123 | - color: "#f8f8f8" |
124 | + color: "#ffffff" |
125 | height: sections.height |
126 | |
127 | Sections { |
128 | @@ -139,5 +139,16 @@ |
129 | Action { text: i18n.tr("Bookmarks") } |
130 | ] |
131 | } |
132 | + |
133 | + Rectangle { |
134 | + // Divider, see Ubuntu/Components/Themes/Ambiance/1.3/PageHeaderStyle.qml |
135 | + anchors { |
136 | + left: parent.left |
137 | + right: parent.right |
138 | + top: parent.bottom |
139 | + } |
140 | + height: units.dp(1) |
141 | + color: Qt.rgba(0, 0, 0, 0.1) |
142 | + } |
143 | } |
144 | } |
145 | |
146 | === modified file 'src/app/webbrowser/SettingsPage.qml' |
147 | --- src/app/webbrowser/SettingsPage.qml 2016-02-05 17:35:24 +0000 |
148 | +++ src/app/webbrowser/SettingsPage.qml 2016-03-01 11:22:46 +0000 |
149 | @@ -20,7 +20,6 @@ |
150 | import Qt.labs.settings 1.0 |
151 | import Ubuntu.Components 1.3 |
152 | import Ubuntu.Components.Popups 1.3 |
153 | -import Ubuntu.Components.ListItems 1.3 as ListItems |
154 | import Ubuntu.Web 0.2 |
155 | import webbrowserapp.private 0.1 |
156 | |
157 | @@ -68,8 +67,10 @@ |
158 | |
159 | width: parent.width |
160 | |
161 | - ListItems.Subtitled { |
162 | + ListItem { |
163 | + id: searchEngineListItem |
164 | objectName: "searchengine" |
165 | + readonly property string currentSearchEngineDisplayName: currentSearchEngine.name |
166 | |
167 | SearchEngine { |
168 | id: currentSearchEngine |
169 | @@ -77,32 +78,38 @@ |
170 | filename: settingsObject.searchEngine |
171 | } |
172 | |
173 | - text: i18n.tr("Search engine") |
174 | - subText: currentSearchEngine.name |
175 | + ListItemLayout { |
176 | + title.text: i18n.tr("Search engine") |
177 | + subtitle.text: searchEngineListItem.currentSearchEngineDisplayName |
178 | + } |
179 | |
180 | visible: searchEngines.engines.count > 1 |
181 | - |
182 | onClicked: searchEngineComponent.createObject(subpageContainer) |
183 | } |
184 | |
185 | - ListItems.Subtitled { |
186 | + ListItem { |
187 | + id: homepageListItem |
188 | objectName: "homepage" |
189 | + readonly property url currentHomepage: settingsObject.homepage |
190 | |
191 | - text: i18n.tr("Homepage") |
192 | - subText: settingsObject.homepage |
193 | + ListItemLayout { |
194 | + title.text: i18n.tr("Homepage") |
195 | + subtitle.text: homepageListItem.currentHomepage |
196 | + } |
197 | |
198 | onClicked: PopupUtils.open(homepageDialog) |
199 | } |
200 | |
201 | - ListItems.Standard { |
202 | + ListItem { |
203 | objectName: "restoreSession" |
204 | |
205 | - text: i18n.tr("Restore previous session at startup") |
206 | - highlightWhenPressed: false |
207 | - |
208 | - control: CheckBox { |
209 | - id: restoreSessionCheckbox |
210 | - onTriggered: settingsObject.restoreSession = checked |
211 | + ListItemLayout { |
212 | + title.text: i18n.tr("Restore previous session at startup") |
213 | + CheckBox { |
214 | + id: restoreSessionCheckbox |
215 | + SlotsLayout.position: SlotsLayout.Trailing |
216 | + onTriggered: settingsObject.restoreSession = checked |
217 | + } |
218 | } |
219 | |
220 | Binding { |
221 | @@ -112,18 +119,22 @@ |
222 | } |
223 | } |
224 | |
225 | - ListItems.Standard { |
226 | + ListItem { |
227 | objectName: "privacy" |
228 | |
229 | - text: i18n.tr("Privacy & permissions") |
230 | + ListItemLayout { |
231 | + title.text: i18n.tr("Privacy & permissions") |
232 | + } |
233 | |
234 | onClicked: privacyComponent.createObject(subpageContainer) |
235 | } |
236 | |
237 | - ListItems.Standard { |
238 | + ListItem { |
239 | objectName: "reset" |
240 | |
241 | - text: i18n.tr("Reset browser settings") |
242 | + ListItemLayout { |
243 | + title.text: i18n.tr("Reset browser settings") |
244 | + } |
245 | |
246 | onClicked: settingsObject.restoreDefaults() |
247 | } |
248 | @@ -167,20 +178,25 @@ |
249 | |
250 | model: searchEngines.engines |
251 | |
252 | - delegate: ListItems.Standard { |
253 | - objectName: "searchEngineDelegate_" + index |
254 | + delegate: ListItem { |
255 | + id: searchEngineDelegate |
256 | + objectName: "searchEngineDelegate" |
257 | + readonly property string displayName: delegateSearchEngine.name |
258 | SearchEngine { |
259 | - id: searchEngineDelegate |
260 | + id: delegateSearchEngine |
261 | searchPaths: searchEngines.searchPaths |
262 | filename: model.filename |
263 | } |
264 | - text: searchEngineDelegate.name |
265 | |
266 | - control: CheckBox { |
267 | - checked: settingsObject.searchEngine == searchEngineDelegate.filename |
268 | - onClicked: { |
269 | - settingsObject.searchEngine = searchEngineDelegate.filename |
270 | - searchEngineItem.destroy() |
271 | + ListItemLayout { |
272 | + title.text: searchEngineDelegate.displayName |
273 | + CheckBox { |
274 | + SlotsLayout.position: SlotsLayout.Trailing |
275 | + checked: settingsObject.searchEngine == delegateSearchEngine.filename |
276 | + onClicked: { |
277 | + settingsObject.searchEngine = delegateSearchEngine.filename |
278 | + searchEngineItem.destroy() |
279 | + } |
280 | } |
281 | } |
282 | } |
283 | @@ -224,15 +240,19 @@ |
284 | id: privacyCol |
285 | width: parent.width |
286 | |
287 | - ListItems.Standard { |
288 | + ListItem { |
289 | objectName: "privacy.mediaAccess" |
290 | - text: i18n.tr("Camera & microphone") |
291 | + ListItemLayout { |
292 | + title.text: i18n.tr("Camera & microphone") |
293 | + } |
294 | onClicked: mediaAccessComponent.createObject(subpageContainer) |
295 | } |
296 | |
297 | - ListItems.Standard { |
298 | + ListItem { |
299 | objectName: "privacy.clearHistory" |
300 | - text: i18n.tr("Clear Browsing History") |
301 | + ListItemLayout { |
302 | + title.text: i18n.tr("Clear Browsing History") |
303 | + } |
304 | enabled: HistoryModel.count > 0 |
305 | onClicked: { |
306 | var dialog = PopupUtils.open(privacyConfirmDialogComponent, privacyItem, {"title": i18n.tr("Clear Browsing History?")}) |
307 | @@ -240,9 +260,11 @@ |
308 | } |
309 | } |
310 | |
311 | - ListItems.Standard { |
312 | + ListItem { |
313 | objectName: "privacy.clearCache" |
314 | - text: i18n.tr("Clear Cache") |
315 | + ListItemLayout { |
316 | + title.text: i18n.tr("Clear Cache") |
317 | + } |
318 | onClicked: { |
319 | var dialog = PopupUtils.open(privacyConfirmDialogComponent, privacyItem, {"title": i18n.tr("Clear Cache?")}) |
320 | dialog.confirmed.connect(function() { |
321 | @@ -383,8 +405,10 @@ |
322 | id: mediaAccessCol |
323 | width: parent.width |
324 | |
325 | - ListItems.Standard { |
326 | - text: i18n.tr("Microphone") |
327 | + ListItem { |
328 | + ListItemLayout { |
329 | + title.text: i18n.tr("Microphone") |
330 | + } |
331 | } |
332 | |
333 | SettingsDeviceSelector { |
334 | @@ -402,8 +426,10 @@ |
335 | } |
336 | } |
337 | |
338 | - ListItems.Standard { |
339 | - text: i18n.tr("Camera") |
340 | + ListItem { |
341 | + ListItemLayout { |
342 | + title.text: i18n.tr("Camera") |
343 | + } |
344 | } |
345 | |
346 | SettingsDeviceSelector { |
347 | |
348 | === modified file 'src/app/webbrowser/TabsList.qml' |
349 | --- src/app/webbrowser/TabsList.qml 2015-11-17 14:50:31 +0000 |
350 | +++ src/app/webbrowser/TabsList.qml 2016-03-01 11:22:46 +0000 |
351 | @@ -1,5 +1,5 @@ |
352 | /* |
353 | - * Copyright 2014-2015 Canonical Ltd. |
354 | + * Copyright 2014-2016 Canonical Ltd. |
355 | * |
356 | * This file is part of webbrowser-app. |
357 | * |
358 | @@ -50,7 +50,7 @@ |
359 | right: parent.right |
360 | } |
361 | height: invisibleTabChrome.height |
362 | - color: "#fbfbfb" |
363 | + color: "#111111" |
364 | } |
365 | |
366 | Flickable { |
367 | |
368 | === modified file 'src/app/webbrowser/UrlDelegate.qml' |
369 | --- src/app/webbrowser/UrlDelegate.qml 2016-02-01 17:52:43 +0000 |
370 | +++ src/app/webbrowser/UrlDelegate.qml 2016-03-01 11:22:46 +0000 |
371 | @@ -17,6 +17,7 @@ |
372 | */ |
373 | |
374 | import QtQuick 2.4 |
375 | +import QtQuick.Layouts 1.1 |
376 | import Ubuntu.Components 1.3 |
377 | import ".." |
378 | |
379 | @@ -35,7 +36,7 @@ |
380 | |
381 | signal removed() |
382 | |
383 | - Row { |
384 | + RowLayout { |
385 | anchors { |
386 | verticalCenter: parent.verticalCenter |
387 | left: parent.left |
388 | @@ -47,26 +48,18 @@ |
389 | |
390 | Loader { |
391 | id: headerComponentLoader |
392 | - sourceComponent: undefined |
393 | + anchors.verticalCenter: parent.verticalCenter |
394 | + visible: status == Loader.Ready |
395 | } |
396 | |
397 | - UbuntuShape { |
398 | - id: iconContainer |
399 | - width: units.gu(3) |
400 | - height: width |
401 | - |
402 | - Favicon { |
403 | - id: icon |
404 | - anchors.centerIn: parent |
405 | - } |
406 | + Favicon { |
407 | + id: icon |
408 | + anchors.verticalCenter: parent.verticalCenter |
409 | } |
410 | |
411 | Column { |
412 | - width: parent.width - headerComponentLoader.width - iconContainer.width - parent.spacing - (headerComponentLoader.sourceComponent ? parent.spacing : 0) |
413 | - anchors { |
414 | - top: parent.top |
415 | - bottom: parent.bottom |
416 | - } |
417 | + Layout.fillWidth: true |
418 | + anchors.verticalCenter: parent.verticalCenter |
419 | |
420 | Label { |
421 | id: title |
422 | |
423 | === modified file 'tests/autopilot/webbrowser_app/emulators/browser.py' |
424 | --- tests/autopilot/webbrowser_app/emulators/browser.py 2016-02-03 16:22:37 +0000 |
425 | +++ tests/autopilot/webbrowser_app/emulators/browser.py 2016-03-01 11:22:46 +0000 |
426 | @@ -508,30 +508,25 @@ |
427 | return self.select_single(BrowserPageHeader) |
428 | |
429 | def get_searchengine_entry(self): |
430 | - return self.select_single("Subtitled", objectName="searchengine") |
431 | + return self.select_single(objectName="searchengine") |
432 | |
433 | def get_searchengine_page(self): |
434 | - return self.wait_select_single("QQuickItem", |
435 | - objectName="searchEnginePage") |
436 | + return self.wait_select_single(objectName="searchEnginePage") |
437 | |
438 | def get_homepage_entry(self): |
439 | - return self.select_single("Subtitled", objectName="homepage") |
440 | + return self.select_single(objectName="homepage") |
441 | |
442 | def get_restore_session_entry(self): |
443 | - return self.select_single("Standard", objectName="restoreSession") |
444 | - |
445 | - def get_background_tabs_entry(self): |
446 | - return self.select_single("Standard", objectName="backgroundTabs") |
447 | + return self.select_single(objectName="restoreSession") |
448 | |
449 | def get_privacy_entry(self): |
450 | - return self.select_single("Standard", objectName="privacy") |
451 | + return self.select_single(objectName="privacy") |
452 | |
453 | def get_privacy_page(self): |
454 | - return self.wait_select_single("QQuickItem", |
455 | - objectName="privacySettings") |
456 | + return self.wait_select_single(objectName="privacySettings") |
457 | |
458 | def get_reset_settings_entry(self): |
459 | - return self.select_single("Standard", objectName="reset") |
460 | + return self.select_single(objectName="reset") |
461 | |
462 | |
463 | class DownloadsPage(uitk.UbuntuUIToolkitCustomProxyObjectBase): |
464 | |
465 | === modified file 'tests/autopilot/webbrowser_app/tests/test_settings.py' |
466 | --- tests/autopilot/webbrowser_app/tests/test_settings.py 2015-09-03 12:58:26 +0000 |
467 | +++ tests/autopilot/webbrowser_app/tests/test_settings.py 2016-03-01 11:22:46 +0000 |
468 | @@ -1,6 +1,6 @@ |
469 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
470 | # |
471 | -# Copyright 2015 Canonical |
472 | +# Copyright 2015-2016 Canonical |
473 | # |
474 | # This program is free software: you can redistribute it and/or modify it |
475 | # under the terms of the GNU General Public License version 3, as published |
476 | @@ -20,7 +20,6 @@ |
477 | |
478 | from testtools.matchers import Equals, GreaterThan, NotEquals |
479 | from autopilot.matchers import Eventually |
480 | -from autopilot.platform import model |
481 | |
482 | import ubuntuuitoolkit as uitk |
483 | |
484 | @@ -45,7 +44,7 @@ |
485 | def test_open_close_searchengine_page(self): |
486 | settings = self.open_settings() |
487 | searchengine = settings.get_searchengine_entry() |
488 | - old_engine = searchengine.subText |
489 | + old_engine = searchengine.currentSearchEngineDisplayName |
490 | self.assertThat(old_engine, NotEquals("")) |
491 | self.pointing_device.click_object(searchengine) |
492 | searchengine_page = settings.get_searchengine_page() |
493 | @@ -53,18 +52,21 @@ |
494 | browser.BrowserPageHeader) |
495 | searchengine_header.click_back_button() |
496 | searchengine_page.wait_until_destroyed() |
497 | - self.assertThat(searchengine.subText, Equals(old_engine)) |
498 | + self.assertThat(searchengine.currentSearchEngineDisplayName, |
499 | + Equals(old_engine)) |
500 | |
501 | def test_change_searchengine(self): |
502 | settings = self.open_settings() |
503 | searchengine = settings.get_searchengine_entry() |
504 | - old_engine = searchengine.subText |
505 | + old_engine = searchengine.currentSearchEngineDisplayName |
506 | self.assertThat(old_engine, NotEquals("")) |
507 | self.pointing_device.click_object(searchengine) |
508 | searchengine_page = settings.get_searchengine_page() |
509 | - self.assertThat(lambda: len(searchengine_page.select_many("Standard")), |
510 | - Eventually(GreaterThan(1))) |
511 | - delegates = searchengine_page.select_many("Standard") |
512 | + self.assertThat(lambda: len(searchengine_page.select_many( |
513 | + objectName="searchEngineDelegate")), |
514 | + Eventually(GreaterThan(1))) |
515 | + delegates = searchengine_page.select_many( |
516 | + objectName="searchEngineDelegate") |
517 | delegates.sort(key=lambda delegate: delegate.objectName) |
518 | new_index = -1 |
519 | for (i, delegate) in enumerate(delegates): |
520 | @@ -72,18 +74,19 @@ |
521 | if (new_index == -1) and not checkbox.checked: |
522 | new_index = i |
523 | self.assertThat(checkbox.checked, |
524 | - Equals(delegate.text == old_engine)) |
525 | - new_engine = delegates[new_index].text |
526 | + Equals(delegate.displayName == old_engine)) |
527 | + new_engine = delegates[new_index].displayName |
528 | self.assertThat(new_engine, NotEquals(old_engine)) |
529 | self.pointing_device.click_object( |
530 | delegates[new_index].select_single(uitk.CheckBox)) |
531 | searchengine_page.wait_until_destroyed() |
532 | - self.assertThat(searchengine.subText, Eventually(Equals(new_engine))) |
533 | + self.assertThat(searchengine.currentSearchEngineDisplayName, |
534 | + Eventually(Equals(new_engine))) |
535 | |
536 | def test_change_homepage(self): |
537 | settings = self.open_settings() |
538 | homepage = settings.get_homepage_entry() |
539 | - old = homepage.subText |
540 | + old = homepage.currentHomepage |
541 | self.assertThat(old, NotEquals("")) |
542 | |
543 | # First test cancelling the edition |
544 | @@ -97,7 +100,7 @@ |
545 | objectName="homepageDialog.cancelButton") |
546 | self.pointing_device.click_object(cancel_button) |
547 | dialog.wait_until_destroyed() |
548 | - self.assertThat(homepage.subText, Equals(old)) |
549 | + self.assertThat(homepage.currentHomepage, Equals(old)) |
550 | |
551 | # Then test actually changing the homepage |
552 | self.pointing_device.click_object(homepage) |
553 | @@ -113,7 +116,7 @@ |
554 | objectName="homepageDialog.saveButton") |
555 | self.pointing_device.click_object(save_button) |
556 | dialog.wait_until_destroyed() |
557 | - self.assertThat(homepage.subText, Eventually(Equals(new))) |
558 | + self.assertThat(homepage.currentHomepage, Eventually(Equals(new))) |
559 | |
560 | def test_open_close_privacy_settings(self): |
561 | settings = self.open_settings() |
562 | @@ -130,7 +133,6 @@ |
563 | self.pointing_device.click_object(privacy) |
564 | privacy_page = settings.get_privacy_page() |
565 | clear_history = privacy_page.select_single( |
566 | - "Standard", |
567 | objectName="privacy.clearHistory") |
568 | self.assertThat(clear_history.enabled, Equals(True)) |
569 | |
570 | @@ -158,7 +160,6 @@ |
571 | self.pointing_device.click_object(privacy) |
572 | privacy_page = settings.get_privacy_page() |
573 | clear_cache = privacy_page.select_single( |
574 | - "Standard", |
575 | objectName="privacy.clearCache") |
576 | self.assertThat(clear_cache.enabled, Equals(True)) |
577 | |
578 | @@ -186,18 +187,13 @@ |
579 | self.pointing_device.click_object(reset) |
580 | |
581 | searchengine = settings.get_searchengine_entry() |
582 | - self.assertThat(searchengine.subText, |
583 | + self.assertThat(searchengine.currentSearchEngineDisplayName, |
584 | Eventually(Equals("Google"))) |
585 | |
586 | homepage = settings.get_homepage_entry() |
587 | - self.assertThat(homepage.subText, |
588 | + self.assertThat(homepage.currentHomepage, |
589 | Eventually(Equals("http://start.ubuntu.com"))) |
590 | |
591 | restore_session = settings.get_restore_session_entry() |
592 | checkbox = restore_session.select_single(uitk.CheckBox) |
593 | self.assertThat(checkbox.checked, Eventually(Equals(True))) |
594 | - |
595 | - background_tabs = settings.get_background_tabs_entry() |
596 | - checkbox = background_tabs.select_single(uitk.CheckBox) |
597 | - self.assertThat(checkbox.checked, |
598 | - Eventually(Equals(model() == 'Desktop'))) |
FAILED: Continuous integration, rev:1363 jenkins. qa.ubuntu. com/job/ webbrowser- app-ci/ 2632/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 6636 jenkins. qa.ubuntu. com/job/ webbrowser- app-vivid- amd64-ci/ 1385 jenkins. qa.ubuntu. com/job/ webbrowser- app-vivid- armhf-ci/ 1385 jenkins. qa.ubuntu. com/job/ webbrowser- app-vivid- armhf-ci/ 1385/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ webbrowser- app-vivid- i386-ci/ 1385 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- vivid-touch/ 5038 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 6647 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 6647/artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 27894
http://
Executed test runs:
UNSTABLE: 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/webbrowser- app-ci/ 2632/rebuild
http://