Merge lp:~cimi/unity8/uitkPageHeader into lp:unity8
- uitkPageHeader
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~cimi/unity8/uitkPageHeader |
Merge into: | lp:unity8 |
Diff against target: |
590 lines (+123/-156) 12 files modified
qml/Components/Header.qml (+0/-28) qml/Dash/DashPageHeader.qml (+32/-37) qml/Dash/GenericScopeView.qml (+5/-0) qml/Dash/ScopesList.qml (+1/-13) qml/Stages/Splash.qml (+7/-19) tests/plugins/Unity/Session/sessionbackendtest.cpp (+0/-15) tests/qmltests/Dash/Previews/tst_Preview.qml (+0/-1) tests/qmltests/Dash/tst_Dash.qml (+9/-9) tests/qmltests/Dash/tst_DashContent.qml (+64/-5) tests/qmltests/Dash/tst_DashPageHeader.qml (+0/-24) tests/qmltests/Dash/tst_GenericScopeView.qml (+2/-2) tests/qmltests/Dash/tst_PreviewView.qml (+3/-3) |
To merge this branch: | bzr merge lp:~cimi/unity8/uitkPageHeader |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Albert Astals Cid (community) | Approve | ||
Unity8 CI Bot | continuous-integration | Needs Fixing | |
Michael Zanetti (community) | Needs Fixing | ||
Review via email: mp+293608@code.launchpad.net |
This proposal has been superseded by a proposal from 2016-05-17.
Commit message
Use PageHeader instead Ambiance's PageHeadStyle
Description of the change
* Are there any related MPs required for this MP to build/function as expected? Please list.
* Did you perform an exploratory manual test run of your code change and any related functionality?
y
* Did you make sure that your branch does not contain spurious tags?
y
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
n/a
* If you changed the UI, has there been a design review?
n/a
- 2345. By Andrea Cimitan
-
merged trunk
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
Michael Zanetti (mzanetti) wrote : | # |
seems this requires some test updates
- 2346. By Andrea Cimitan
-
fixed Dash qml tests
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2345
https:/
Executed test runs:
UNSTABLE: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2347. By Andrea Cimitan
-
Fixed GenericScopeView test
- 2348. By Andrea Cimitan
-
Fixed PreviewView test
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2346
https:/
Executed test runs:
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2348
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Albert Astals Cid (aacid) wrote : | # |
Why the
- units.dp(1)
in the "Fixed GenericScopeView test" commit?
Andrea Cimitan (cimi) wrote : | # |
> Why the
> - units.dp(1)
> in the "Fixed GenericScopeView test" commit?
there is a test in genericscopeview that checks the position of the listview when the header is scrolled up, and there was one pixel difference between PageHeadStyle code (using contentHeight for height of the container) and the current one using implicitHeight - figured out it need to be smaller of 1px
Albert Astals Cid (aacid) wrote : | # |
> > Why the
> > - units.dp(1)
> > in the "Fixed GenericScopeView test" commit?
> there is a test in genericscopeview that checks the position of the listview
> when the header is scrolled up, and there was one pixel difference between
> PageHeadStyle code (using contentHeight for height of the container) and the
> current one using implicitHeight - figured out it need to be smaller of 1px
I'd be more confortable with
- height: header.
+ height: header.
What do you think?
- 2349. By Andrea Cimitan
-
good idea albert
Andrea Cimitan (cimi) wrote : | # |
> > > Why the
> > > - units.dp(1)
> > > in the "Fixed GenericScopeView test" commit?
> > there is a test in genericscopeview that checks the position of the listview
> > when the header is scrolled up, and there was one pixel difference between
> > PageHeadStyle code (using contentHeight for height of the container) and the
> > current one using implicitHeight - figured out it need to be smaller of 1px
>
> I'd be more confortable with
>
> - height: header.
> + height: header.
>
> What do you think?
considering we already use __styleInstance in this code, at this point it makes sense to use it even here, thank you nice idea!
Albert Astals Cid (aacid) wrote : | # |
file://
file://
- 2350. By Andrea Cimitan
-
Fixed error
Albert Astals Cid (aacid) wrote : | # |
There's still a focus bug.
* make tryDash
* Click on the magnifying glass
* Click on the filters icon (the one left to Cancel)
* Click anywhere outside the popup
With the new code the search bar regains the focus, with the old one it does not.
Could you also please add a test for this so next time we don't have to rely on manual testing?
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2349
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2350
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2351. By Andrea Cimitan
-
add spacing
- 2352. By Andrea Cimitan
-
unfocus header when closing popup
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2352
https:/
Executed test runs:
UNSTABLE: https:/
UNSTABLE: https:/
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Albert Astals Cid (aacid) wrote : | # |
What i described in https:/
- 2353. By Andrea Cimitan
-
More things to test in the filters popover
- 2354. By Andrea Cimitan
-
comment
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2354
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
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 (except broken autopilot and unstable wizard test)
- 2355. By Andrea Cimitan
-
rebased on mzanetti branch
- 2356. By Andrea Cimitan
-
remove test
- 2357. By Andrea Cimitan
-
merged trunk
Unmerged revisions
- 2357. By Andrea Cimitan
-
merged trunk
- 2356. By Andrea Cimitan
-
remove test
- 2355. By Andrea Cimitan
-
rebased on mzanetti branch
- 2354. By Andrea Cimitan
-
comment
- 2353. By Andrea Cimitan
-
More things to test in the filters popover
- 2352. By Andrea Cimitan
-
unfocus header when closing popup
- 2351. By Andrea Cimitan
-
add spacing
- 2350. By Andrea Cimitan
-
Fixed error
- 2349. By Andrea Cimitan
-
good idea albert
- 2348. By Andrea Cimitan
-
Fixed PreviewView test
Preview Diff
1 | === removed file 'qml/Components/Header.qml' |
2 | --- qml/Components/Header.qml 2016-01-25 10:12:48 +0000 |
3 | +++ qml/Components/Header.qml 1970-01-01 00:00:00 +0000 |
4 | @@ -1,28 +0,0 @@ |
5 | -/* |
6 | - * Copyright (C) 2014 Canonical, Ltd. |
7 | - * |
8 | - * This program is free software; you can redistribute it and/or modify |
9 | - * it under the terms of the GNU General Public License as published by |
10 | - * the Free Software Foundation; version 3. |
11 | - * |
12 | - * This program is distributed in the hope that it will be useful, |
13 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | - * GNU General Public License for more details. |
16 | - * |
17 | - * You should have received a copy of the GNU General Public License |
18 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | - */ |
20 | - |
21 | -import Ubuntu.Components 1.3 |
22 | -import Ubuntu.Components.Themes.Ambiance 1.3 |
23 | - |
24 | -PageHeadStyle { |
25 | - // FIXME: Don't use this but PageHeader from Ubuntu.Components 1.3. |
26 | - id: root |
27 | - |
28 | - property var styledItem: root |
29 | - property string title |
30 | - property var config: PageHeadConfiguration {} |
31 | - property var contents: null |
32 | -} |
33 | |
34 | === modified file 'qml/Dash/DashPageHeader.qml' |
35 | --- qml/Dash/DashPageHeader.qml 2016-04-27 15:01:10 +0000 |
36 | +++ qml/Dash/DashPageHeader.qml 2016-05-17 16:58:21 +0000 |
37 | @@ -16,7 +16,7 @@ |
38 | |
39 | import QtQuick 2.4 |
40 | import Ubuntu.Components 1.3 |
41 | -import Ubuntu.Components.Themes.Ambiance 1.3 |
42 | +import Ubuntu.Components.Popups 1.3 |
43 | import Ubuntu.Components.ListItems 1.3 |
44 | import "../Components" |
45 | |
46 | @@ -78,13 +78,13 @@ |
47 | } |
48 | } |
49 | |
50 | - function closePopup(keepFocus) { |
51 | + function closePopup(keepFocus, keepSearch) { |
52 | if (extraPanel.visible) { |
53 | extraPanel.visible = false; |
54 | } else if (!keepFocus) { |
55 | - unfocus(); |
56 | + unfocus(keepSearch); |
57 | } |
58 | - if (!searchTextField.text && !root.navigationTag && searchHistory.count == 0) { |
59 | + if (!keepSearch && !searchTextField.text && !root.navigationTag && searchHistory.count == 0) { |
60 | headerContainer.showSearch = false; |
61 | } |
62 | } |
63 | @@ -97,9 +97,9 @@ |
64 | closePopup(keepFocus); |
65 | } |
66 | |
67 | - function unfocus() { |
68 | + function unfocus(keepSearch) { |
69 | searchTextField.focus = false; |
70 | - if (!searchTextField.text && !root.navigationTag) { |
71 | + if (!keepSearch && !searchTextField.text && !root.navigationTag) { |
72 | headerContainer.showSearch = false; |
73 | } |
74 | } |
75 | @@ -142,7 +142,7 @@ |
76 | objectName: "headerContainer" |
77 | clip: contentY < height |
78 | anchors { left: parent.left; top: parent.top; right: parent.right } |
79 | - height: header.contentHeight |
80 | + height: header.__styleInstance.contentHeight |
81 | contentHeight: headersColumn.height |
82 | interactive: false |
83 | contentY: showSearch ? 0 : height |
84 | @@ -173,22 +173,18 @@ |
85 | id: headersColumn |
86 | anchors { left: parent.left; right: parent.right } |
87 | |
88 | - PageHeadStyle { |
89 | - // FIXME: Replace PageHeadStyle from the Ambiance theme by the new PageHeader from Ubuntu.Components 1.3. |
90 | + PageHeader { |
91 | id: searchHeader |
92 | anchors { left: parent.left; right: parent.right } |
93 | opacity: headerContainer.clip || headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout |
94 | - __separator_visible: false |
95 | - // Required to keep PageHeadStyle noise down as it expects the Page's properties around. |
96 | - property var styledItem: searchHeader |
97 | - property color dividerColor: "transparent" // Doesn't matter as we don't have PageHeadSections |
98 | - property color panelColor: background.topColor |
99 | - panelForegroundColor: config.foregroundColor |
100 | - backgroundColor: "transparent" |
101 | - config: PageHeadConfiguration { |
102 | + |
103 | + StyleHints { |
104 | foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText |
105 | + backgroundColor: "transparent" |
106 | + dividerColor: "transparent" |
107 | } |
108 | - property var contents: Item { |
109 | + |
110 | + contents: Item { |
111 | anchors.fill: parent |
112 | |
113 | TextField { |
114 | @@ -273,7 +269,7 @@ |
115 | anchors.fill: parent |
116 | anchors.margins: units.gu(2) |
117 | name: "filters" |
118 | - color: root.activeFiltersCount > 0 ? UbuntuColors.orange : header.config.foregroundColor |
119 | + color: root.activeFiltersCount > 0 ? UbuntuColors.orange : header.__styleInstance.foregroundColor |
120 | } |
121 | |
122 | onClicked: { |
123 | @@ -283,6 +279,7 @@ |
124 | |
125 | AbstractButton { |
126 | id: cancelButton |
127 | + objectName: "cancelButton" |
128 | width: cancelLabel.width + cancelLabel.anchors.rightMargin + cancelLabel.anchors.leftMargin |
129 | anchors { |
130 | top: parent.top |
131 | @@ -296,7 +293,7 @@ |
132 | Label { |
133 | id: cancelLabel |
134 | text: i18n.tr("Cancel") |
135 | - color: header.panelForegroundColor |
136 | + color: header.__styleInstance.foregroundColor |
137 | verticalAlignment: Text.AlignVCenter |
138 | anchors { |
139 | verticalCenter: parent.verticalCenter |
140 | @@ -309,28 +306,27 @@ |
141 | } |
142 | } |
143 | |
144 | - PageHeadStyle { |
145 | - // FIXME: Replace PageHeadStyle from the Ambiance theme by the new PageHeader from Ubuntu.Components 1.3. |
146 | + PageHeader { |
147 | id: header |
148 | objectName: "innerPageHeader" |
149 | anchors { left: parent.left; right: parent.right } |
150 | height: headerContainer.height |
151 | opacity: headerContainer.clip || !headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout |
152 | - __separator_visible: false |
153 | - property var styledItem: header |
154 | - property color dividerColor: "transparent" // Doesn't matter as we don't have PageHeadSections |
155 | - property color panelColor: background.topColor |
156 | - panelForegroundColor: config.foregroundColor |
157 | - backgroundColor: "transparent" |
158 | - config: PageHeadConfiguration { |
159 | - title: root.title |
160 | + title: root.title |
161 | + |
162 | + StyleHints { |
163 | foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText |
164 | - backAction: Action { |
165 | - iconName: backIsClose ? "close" : "back" |
166 | - visible: root.showBackButton |
167 | - onTriggered: root.backClicked() |
168 | - } |
169 | - |
170 | + backgroundColor: "transparent" |
171 | + dividerColor: "transparent" |
172 | + } |
173 | + |
174 | + leadingActionBar.actions: Action { |
175 | + iconName: backIsClose ? "close" : "back" |
176 | + visible: root.showBackButton |
177 | + onTriggered: root.backClicked() |
178 | + } |
179 | + |
180 | + trailingActionBar { |
181 | actions: [ |
182 | Action { |
183 | objectName: "store" |
184 | @@ -366,7 +362,6 @@ |
185 | ] |
186 | } |
187 | |
188 | - property var contents: null |
189 | Component.onCompleted: root.refreshLogo() |
190 | |
191 | Component { |
192 | |
193 | === modified file 'qml/Dash/GenericScopeView.qml' |
194 | --- qml/Dash/GenericScopeView.qml 2016-05-04 18:08:35 +0000 |
195 | +++ qml/Dash/GenericScopeView.qml 2016-05-17 16:58:21 +0000 |
196 | @@ -662,6 +662,10 @@ |
197 | onShowFiltersPopup: { // item |
198 | extraPanel.visible = false; |
199 | scopeView.filtersPopover = PopupUtils.open(Qt.resolvedUrl("FiltersPopover.qml"), item, { "contentWidth": scopeView.width - units.gu(2) } ); |
200 | + scopeView.filtersPopover.Component.onDestruction.connect(function () { |
201 | + categoryView.pageHeader.closePopup(false, true); |
202 | + categoryView.pageHeader.unfocus(true); // remove the focus from the search field |
203 | + }) |
204 | } |
205 | } |
206 | |
207 | @@ -683,6 +687,7 @@ |
208 | onHistoryItemClicked: { |
209 | SearchHistoryModel.addQuery(text); |
210 | categoryView.pageHeader.searchQuery = text; |
211 | + categoryView.pageHeader.unfocus(); |
212 | } |
213 | |
214 | onDashNavigationLeafClicked: { |
215 | |
216 | === modified file 'qml/Dash/ScopesList.qml' |
217 | --- qml/Dash/ScopesList.qml 2016-01-29 10:29:57 +0000 |
218 | +++ qml/Dash/ScopesList.qml 2016-05-17 16:58:21 +0000 |
219 | @@ -49,18 +49,6 @@ |
220 | anchors.fill: parent |
221 | } |
222 | |
223 | - Binding { |
224 | - target: root.scope |
225 | - property: "searchQuery" |
226 | - value: header.searchQuery |
227 | - } |
228 | - |
229 | - Binding { |
230 | - target: header |
231 | - property: "searchQuery" |
232 | - value: root.scope ? root.scope.searchQuery : "" |
233 | - } |
234 | - |
235 | DashPageHeader { |
236 | id: header |
237 | objectName: "pageHeader" |
238 | @@ -70,7 +58,7 @@ |
239 | showBackButton: true |
240 | backIsClose: root.state == "edit" |
241 | storeEntryEnabled: root.state == "browse" |
242 | - searchEntryEnabled: false // Disable search for now |
243 | + searchEntryEnabled: false |
244 | scopeStyle: root.scopeStyle |
245 | onBackClicked: { |
246 | if (backIsClose) { |
247 | |
248 | === modified file 'qml/Stages/Splash.qml' |
249 | --- qml/Stages/Splash.qml 2016-03-08 20:59:22 +0000 |
250 | +++ qml/Stages/Splash.qml 2016-05-17 16:58:21 +0000 |
251 | @@ -29,7 +29,7 @@ |
252 | property color footerColor: d.undefinedColor |
253 | property alias imageSource: overlaidImage.source |
254 | property url icon |
255 | - property alias title: headerConfig.title |
256 | + property alias title: header.title |
257 | property alias showHeader: header.visible |
258 | |
259 | Ambiance.Palette { |
260 | @@ -75,25 +75,13 @@ |
261 | style: Component { MainViewStyle {theme: styledItem.fakeTheme} } |
262 | } |
263 | |
264 | - Ambiance.PageHeadStyle { |
265 | - // FIXME: Replace PageHeadStyle by PageHeader from Ubuntu.Components 1.3. |
266 | + PageHeader { |
267 | id: header |
268 | - anchors { |
269 | - left: parent.left; |
270 | - right: parent.right |
271 | - } |
272 | - property var styledItem: header |
273 | - // FIXME Keep in sync with SDK's MainView.qml values of these two colors |
274 | - property color dividerColor: Qt.darker(styledItem.backgroundColor, 1.1) |
275 | - property color panelColor: Qt.lighter(styledItem.backgroundColor, 1.1) |
276 | - panelForegroundColor: config.foregroundColor |
277 | - backgroundColor: "transparent" |
278 | - config: PageHeadConfiguration { |
279 | - id: headerConfig |
280 | - foregroundColor: styledItem.fakeTheme.palette.normal.backgroundText |
281 | - } |
282 | - |
283 | - property var contents: null |
284 | + anchors { left: parent.left; right: parent.right } |
285 | + StyleHints { |
286 | + foregroundColor: styledItem.fakeTheme.palette.selected.backgroundText |
287 | + backgroundColor: "transparent" |
288 | + } |
289 | } |
290 | |
291 | Image { |
292 | |
293 | === modified file 'tests/plugins/Unity/Session/sessionbackendtest.cpp' |
294 | --- tests/plugins/Unity/Session/sessionbackendtest.cpp 2016-01-11 20:51:09 +0000 |
295 | +++ tests/plugins/Unity/Session/sessionbackendtest.cpp 2016-05-17 16:58:21 +0000 |
296 | @@ -148,21 +148,6 @@ |
297 | } |
298 | } |
299 | |
300 | - void testLogin1Capabilities() { |
301 | - QSKIP("This test talks to real logind backend, it will fail depending on how the machine is set up"); |
302 | - DBusUnitySessionService dbusUnitySessionService; |
303 | - QDBusInterface login1face("org.freedesktop.login1", "/org/freedesktop/login1", "org.freedesktop.login1.Manager", QDBusConnection::systemBus()); |
304 | - QCoreApplication::processEvents(); // to let the services register on DBus |
305 | - |
306 | - if (login1face.isValid()) { |
307 | - QCOMPARE(dbusUnitySessionService.CanHibernate(), (login1face.call("CanHibernate").arguments().first().toString() != "no")); |
308 | - QCOMPARE(dbusUnitySessionService.CanSuspend(), (login1face.call("CanSuspend").arguments().first().toString() != "no")); |
309 | - QCOMPARE(dbusUnitySessionService.CanReboot(), (login1face.call("CanReboot").arguments().first().toString() != "no")); |
310 | - QCOMPARE(dbusUnitySessionService.CanShutdown(), (login1face.call("CanPowerOff").arguments().first().toString() != "no")); |
311 | - QCOMPARE(dbusUnitySessionService.CanHybridSleep(), (login1face.call("CanHybridSleep").arguments().first().toString() != "no")); |
312 | - } |
313 | - } |
314 | - |
315 | private: |
316 | QDBusInterface *dbusUnitySession; |
317 | }; |
318 | |
319 | === modified file 'tests/qmltests/Dash/Previews/tst_Preview.qml' |
320 | --- tests/qmltests/Dash/Previews/tst_Preview.qml 2016-03-29 03:47:39 +0000 |
321 | +++ tests/qmltests/Dash/Previews/tst_Preview.qml 2016-05-17 16:58:21 +0000 |
322 | @@ -109,7 +109,6 @@ |
323 | } |
324 | |
325 | function test_comboEnsureVisible() { |
326 | - skip("Flaky in adt but can't reproduce locally. Given the deadline I won't risk this getting stuck in proposed."); |
327 | waitForRendering(preview); |
328 | |
329 | // Scroll down |
330 | |
331 | === modified file 'tests/qmltests/Dash/tst_Dash.qml' |
332 | --- tests/qmltests/Dash/tst_Dash.qml 2016-02-15 10:14:43 +0000 |
333 | +++ tests/qmltests/Dash/tst_Dash.qml 2016-05-17 16:58:21 +0000 |
334 | @@ -125,7 +125,7 @@ |
335 | // Go back |
336 | var scopesList = findChild(dash, "scopesList"); |
337 | var scopesListPageHeader = findChild(scopesList, "pageHeader"); |
338 | - var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton"); |
339 | + var backButton = findChild(scopesListPageHeader, "innerPageHeader").leadingActionBar; |
340 | mouseClick(backButton); |
341 | tryCompare(bottomEdgeController, "progress", 0); |
342 | } |
343 | @@ -200,7 +200,7 @@ |
344 | |
345 | // Go back |
346 | var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader"); |
347 | - var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton"); |
348 | + var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar; |
349 | mouseClick(backButton); |
350 | |
351 | // Check temp scope is gone |
352 | @@ -253,7 +253,7 @@ |
353 | |
354 | // Go back |
355 | var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader"); |
356 | - var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton"); |
357 | + var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar; |
358 | mouseClick(backButton); |
359 | |
360 | // Check temp scope is gone |
361 | @@ -279,7 +279,7 @@ |
362 | // Go back |
363 | var scopesList = findChild(dash, "scopesList"); |
364 | var scopesListPageHeader = findChild(scopesList, "pageHeader"); |
365 | - var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton"); |
366 | + var backButton = findChild(scopesListPageHeader, "innerPageHeader").leadingActionBar; |
367 | mouseClick(backButton); |
368 | tryCompare(bottomEdgeController, "progress", 0); |
369 | } |
370 | @@ -391,7 +391,7 @@ |
371 | // Exit edit mode and go back |
372 | var scopesList = findChild(dash, "scopesList"); |
373 | var scopesListPageHeader = findChild(scopesList, "pageHeader"); |
374 | - var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton"); |
375 | + var backButton = findChild(scopesListPageHeader, "innerPageHeader").leadingActionBar; |
376 | mouseClick(backButton); |
377 | mouseClick(backButton); |
378 | tryCompare(bottomEdgeController, "progress", 0); |
379 | @@ -436,7 +436,7 @@ |
380 | // Exit edit mode |
381 | var scopesList = findChild(dash, "scopesList"); |
382 | var scopesListPageHeader = findChild(scopesList, "pageHeader"); |
383 | - var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton"); |
384 | + var backButton = findChild(scopesListPageHeader, "innerPageHeader").leadingActionBar; |
385 | mouseClick(backButton); |
386 | |
387 | // Click on third scope |
388 | @@ -546,7 +546,7 @@ |
389 | |
390 | // Go back |
391 | var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader"); |
392 | - var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton"); |
393 | + var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar; |
394 | mouseClick(backButton); |
395 | |
396 | // Check temp scope is gone |
397 | @@ -614,7 +614,7 @@ |
398 | |
399 | // Go back |
400 | var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader"); |
401 | - var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton"); |
402 | + var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar; |
403 | mouseClick(backButton); |
404 | |
405 | // Check temp scope is gone |
406 | @@ -646,7 +646,7 @@ |
407 | |
408 | // Go back |
409 | var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader"); |
410 | - var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton"); |
411 | + var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar; |
412 | mouseClick(backButton); |
413 | |
414 | // Check temp scope is gone |
415 | |
416 | === modified file 'tests/qmltests/Dash/tst_DashContent.qml' |
417 | --- tests/qmltests/Dash/tst_DashContent.qml 2016-03-29 03:47:39 +0000 |
418 | +++ tests/qmltests/Dash/tst_DashContent.qml 2016-05-17 16:58:21 +0000 |
419 | @@ -215,7 +215,7 @@ |
420 | verify(pageHeader, "Could not find the scope page header."); |
421 | var innerHeader = findChild(pageHeader, "innerPageHeader"); |
422 | verify(innerHeader, "Could not find the scope page header."); |
423 | - compare(innerHeader.config.title, scopesModel.getScope(data.index).name); |
424 | + compare(innerHeader.title, scopesModel.getScope(data.index).name); |
425 | } |
426 | |
427 | function test_is_active_data() { |
428 | @@ -515,10 +515,18 @@ |
429 | } |
430 | |
431 | function test_navigationShowFilterPopup() { |
432 | - goToSecondLevel(); |
433 | - |
434 | var dashContentList = findChild(dashContent, "dashContentList"); |
435 | + var pageHeader = findChild(dashContentList.currentItem, "scopePageHeader") |
436 | var settingsButton = findChild(dashContentList.currentItem, "settingsButton"); |
437 | + var searchButton = findChild(dashContentList.currentItem, "search_button"); |
438 | + var cancelButton = findChild(dashContentList.currentItem, "cancelButton"); |
439 | + var searchTextField = findChild(pageHeader, "searchTextField"); |
440 | + var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel"); |
441 | + var headerContainer = findChild(pageHeader, "headerContainer"); |
442 | + |
443 | + // test that closing the filters popover without a search unfocuses and removes the navigation |
444 | + mouseClick(searchButton); |
445 | + tryCompare(peExtraPanel, "visible", true); |
446 | |
447 | var filtersPopover = findChild(shell, "filtersPopover") |
448 | verify(!filtersPopover); |
449 | @@ -526,8 +534,33 @@ |
450 | mouseClick(settingsButton); |
451 | |
452 | filtersPopover = findChild(shell, "filtersPopover") |
453 | - |
454 | - verify(filtersPopover); |
455 | + verify(filtersPopover); |
456 | + |
457 | + mouseClick(shell, shell.width - 1, shell.height - 1); |
458 | + |
459 | + tryCompare(pageHeader.extraPanel, "visible", false); |
460 | + tryCompare(headerContainer, "showSearch", true); |
461 | + tryCompare(searchTextField, "focus", false); |
462 | + |
463 | + mouseClick(cancelButton); |
464 | + tryCompare(headerContainer, "showSearch", false); |
465 | + tryCompare(headerContainer, "contentY", headerContainer.height); |
466 | + |
467 | + // test within a navigation |
468 | + goToSecondLevel(); |
469 | + |
470 | + filtersPopover = findChild(shell, "filtersPopover") |
471 | + verify(!filtersPopover); |
472 | + |
473 | + mouseClick(settingsButton); |
474 | + |
475 | + filtersPopover = findChild(shell, "filtersPopover") |
476 | + verify(filtersPopover); |
477 | + |
478 | + mouseClick(shell, shell.width - 1, shell.height - 1); |
479 | + |
480 | + tryCompare(pageHeader.extraPanel, "visible", false); |
481 | + tryCompare(headerContainer, "showSearch", true); |
482 | } |
483 | |
484 | function test_primaryFilter() { |
485 | @@ -625,5 +658,31 @@ |
486 | tryCompareFunction(function() { return dashContentList.currentItem.item.scope.id == nextScopeId; }, true); |
487 | compare(dashContentList.currentIndex, 0); |
488 | } |
489 | + |
490 | + function test_extraPanel() { |
491 | + var dashContentList = findChild(dashContent, "dashContentList"); |
492 | + var pageHeader = findChild(dashContentList.currentItem, "scopePageHeader") |
493 | + pageHeader.searchEntryEnabled = true; |
494 | + pageHeader.searchHistory.clear(); |
495 | + |
496 | + pageHeader.searchHistory.addQuery("Search1"); |
497 | + pageHeader.searchHistory.addQuery("Search2"); |
498 | + |
499 | + pageHeader.triggerSearch(); |
500 | + tryCompare(pageHeader.extraPanel, "visible", true); |
501 | + |
502 | + var searchTextField = findChild(pageHeader, "searchTextField"); |
503 | + compare(searchTextField.focus, true); |
504 | + |
505 | + var recentSearches = findChild(pageHeader.extraPanel, "recentSearchesRepeater"); |
506 | + verify(recentSearches, "Could not find recent searches"); |
507 | + |
508 | + waitForRendering(recentSearches); |
509 | + |
510 | + mouseClick(recentSearches.itemAt(0)); |
511 | + compare(pageHeader.searchQuery, "Search2"); |
512 | + tryCompare(pageHeader.extraPanel, "visible", false); |
513 | + compare(searchTextField.focus, false); |
514 | + } |
515 | } |
516 | } |
517 | |
518 | === modified file 'tests/qmltests/Dash/tst_DashPageHeader.qml' |
519 | --- tests/qmltests/Dash/tst_DashPageHeader.qml 2016-03-29 03:47:39 +0000 |
520 | +++ tests/qmltests/Dash/tst_DashPageHeader.qml 2016-05-17 16:58:21 +0000 |
521 | @@ -147,30 +147,6 @@ |
522 | doResetSearch(); |
523 | } |
524 | |
525 | - function test_extraPanel() { |
526 | - searchEnabled = true; |
527 | - pageHeader.searchHistory.clear(); |
528 | - |
529 | - pageHeader.searchHistory.addQuery("Search1"); |
530 | - pageHeader.searchHistory.addQuery("Search2"); |
531 | - |
532 | - pageHeader.triggerSearch(); |
533 | - |
534 | - tryCompare(pageHeader.extraPanel, "visible", true); |
535 | - |
536 | - var searchTextField = findChild(pageHeader, "searchTextField"); |
537 | - compare(searchTextField.focus, true); |
538 | - |
539 | - var recentSearches = findChild(pageHeader.extraPanel, "recentSearchesRepeater"); |
540 | - verify(recentSearches, "Could not find recent searches"); |
541 | - waitForRendering(recentSearches); |
542 | - mouseClick(recentSearches.itemAt(0)); |
543 | - |
544 | - compare(pageHeader.searchQuery, "Search2"); |
545 | - tryCompare(pageHeader.extraPanel, "visible", false); |
546 | - compare(searchTextField.focus, false); |
547 | - } |
548 | - |
549 | function test_popup_closing_data() { |
550 | return [ |
551 | { tag: "with search text", searchText: "foobar", hideSearch: false }, |
552 | |
553 | === modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml' |
554 | --- tests/qmltests/Dash/tst_GenericScopeView.qml 2016-03-29 03:47:39 +0000 |
555 | +++ tests/qmltests/Dash/tst_GenericScopeView.qml 2016-05-17 16:58:21 +0000 |
556 | @@ -442,8 +442,8 @@ |
557 | |
558 | var innerHeader = findChild(header, "innerPageHeader"); |
559 | verify(innerHeader, "Could not find the inner header"); |
560 | - verify(Qt.colorEqual(innerHeader.config.foregroundColor, data.foreground), |
561 | - "Foreground color not equal: %1 != %2".arg(innerHeader.config.foregroundColor).arg(data.foreground)); |
562 | + verify(Qt.colorEqual(innerHeader.__styleInstance.foregroundColor, data.foreground), |
563 | + "Foreground color not equal: %1 != %2".arg(innerHeader.__styleInstance.foregroundColor).arg(data.foreground)); |
564 | |
565 | var background = findChild(header, "headerBackground"); |
566 | verify(background, "Could not find the background"); |
567 | |
568 | === modified file 'tests/qmltests/Dash/tst_PreviewView.qml' |
569 | --- tests/qmltests/Dash/tst_PreviewView.qml 2016-03-29 03:47:39 +0000 |
570 | +++ tests/qmltests/Dash/tst_PreviewView.qml 2016-05-17 16:58:21 +0000 |
571 | @@ -98,7 +98,7 @@ |
572 | var header = findChild(view, "innerPageHeader"); |
573 | verify(header, "Could not find the preview header"); |
574 | |
575 | - compare(header.config.title, "Mock Scope"); |
576 | + compare(header.title, "Mock Scope"); |
577 | } |
578 | |
579 | function test_header_style() { |
580 | @@ -107,8 +107,8 @@ |
581 | |
582 | var innerHeader = findChild(header, "innerPageHeader"); |
583 | verify(innerHeader, "Could not find the inner header"); |
584 | - verify(Qt.colorEqual(innerHeader.config.foregroundColor, UbuntuColors.darkGrey), |
585 | - "Foreground color not equal: %1 != %2".arg(innerHeader.config.foregroundColor).arg(UbuntuColors.darkGrey)); |
586 | + verify(Qt.colorEqual(innerHeader.__styleInstance.foregroundColor, UbuntuColors.darkGrey), |
587 | + "Foreground color not equal: %1 != %2".arg(innerHeader.__styleInstance.foregroundColor).arg(UbuntuColors.darkGrey)); |
588 | |
589 | var background = findChild(header, "headerBackground"); |
590 | verify(background, "Could not find the background"); |
FAILED: Continuous integration, rev:2344 /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/1108/ /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= vivid+overlay, testname= qmluitests. sh/661 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= xenial+ overlay, testname= qmluitests. sh/661 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=phone- armhf,release= vivid+overlay, testname= autopilot. sh/661/ console /unity8- jenkins. ubuntu. com/job/ build-0- fetch/1486 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 1451 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial+ overlay/ 1451 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1451 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1451/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1451 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1451/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1451 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1451/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1451 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1451/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1451 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1451/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1451 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1451/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
UNSTABLE: https:/
UNSTABLE: https:/
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/1108/ rebuild
https:/