Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/visualGallery into lp:ubuntu-ui-toolkit/staging
- visualGallery
- Merge into staging
Status: | Merged |
---|---|
Approved by: | Cris Dywan |
Approved revision: | 1995 |
Merged at revision: | 1997 |
Proposed branch: | lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/visualGallery |
Merge into: | lp:ubuntu-ui-toolkit/staging |
Diff against target: |
134 lines (+95/-0) 4 files modified
tests/unit/visual/gallery.qml (+75/-0) tests/unit/visual/gallery.sh (+6/-0) tests/unit/visual/tst_picker13.qml (+1/-0) tests/unit/visual/tst_popups_dialog13.qml (+13/-0) |
To merge this branch: | bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/visualGallery |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
ubuntu-sdk-build-bot | continuous-integration | Approve | |
Tim Peeters | Pending | ||
Review via email: mp+296680@code.launchpad.net |
Commit message
Introduce gallery for browsing visual tests
Description of the change
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1995
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1995
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1995
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1995
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Tim Peeters (tpeeters) wrote : | # |
The first listitem that I click becomes blue, and if I click another listitem in the left column after that, it does open the page that I intend to open, but still the previously blue listitem stays blue. What is the logic behind this?
I'll repeat one question from the last MR: is gallery.sh the best name? We have another gallery.sh, and it may be confusing (ctrl+k to select files in qtc already gives a lot of duplicates for many of the qml files that we have, which is very annoying).
Also, one inline comment.
Cris Dywan (kalikiana) wrote : | # |
> The first listitem that I click becomes blue, and if I click another listitem
> in the left column after that, it does open the page that I intend to open,
> but still the previously blue listitem stays blue. What is the logic behind
> this?
I don't get it. The code is the same as in the old MR, onClicked pushes the page. Nothing is getting blue here.
> I'll repeat one question from the last MR: is gallery.sh the best name? We
> have another gallery.sh, and it may be confusing (ctrl+k to select files in
> qtc already gives a lot of duplicates for many of the qml files that we have,
> which is very annoying).
It's still the the most obvious name. browser would make sense also but it's just as ambiguous. I don't really have much inspiration here.
> This filter seems random. We don't have a strict policy on the naming,
> and I think only the tests that have a deprecated test version for 1.2
> also have a *13.qml. Plenty of (new) tests do not have 13 in the name,
> like actionbar, adaptivepagelayout, listitem, header, pageheader, sections, toolbar
The filter *seems* random. All new tests being added lately, as far as I'm aware, have a 13 suffix if they use 1.3 and that's what the filter means. Maybe I missed one or two, but I think we'll want to get our naming sorted anyway if we haven't yet. There's no other special requirement. But I'd rather not rename and rewrite more tests in this MR - I patched two to display "something" but some tests need more work to be useful for manual testing. The way I see it, it's not harmful to have those in there, it's motivating to fix them.
Tim Peeters (tpeeters) wrote : | # |
Ok. Happroving. We still need to fix the naming of the unit test filenames (in a separate MR).
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1995
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1995
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1995
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1995
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1995
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1995
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1995
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1995
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === added file 'tests/unit/visual/gallery.qml' |
2 | --- tests/unit/visual/gallery.qml 1970-01-01 00:00:00 +0000 |
3 | +++ tests/unit/visual/gallery.qml 2016-06-07 14:41:14 +0000 |
4 | @@ -0,0 +1,75 @@ |
5 | +/* |
6 | + * Copyright 2016 Canonical Ltd. |
7 | + * |
8 | + * This program is free software; you can redistribute it and/or modify |
9 | + * it under the terms of the GNU Lesser 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 Lesser General Public License for more details. |
16 | + * |
17 | + * You should have received a copy of the GNU Lesser General Public License |
18 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | + */ |
20 | + |
21 | +import QtQuick 2.4 |
22 | +import Ubuntu.Components 1.3 |
23 | +import Qt.labs.folderlistmodel 2.1 |
24 | + |
25 | +MainView { |
26 | + width: units.gu(120) |
27 | + height: units.gu(75) |
28 | + |
29 | + AdaptivePageLayout { |
30 | + id: pageLayout |
31 | + anchors.fill: parent |
32 | + primaryPage: Page { |
33 | + header: PageHeader { |
34 | + flickable: testsListView |
35 | + title: 'Unit Tests' |
36 | + } |
37 | + |
38 | + UbuntuListView { |
39 | + id: testsListView |
40 | + anchors.fill: parent |
41 | + model: FolderListModel { |
42 | + Component.onCompleted: folder += '/tests/unit/visual' |
43 | + showDirs: false |
44 | + showOnlyReadable: true |
45 | + sortField: FolderListModel.Name |
46 | + nameFilters: [ "tst_*13.qml" ] |
47 | + } |
48 | + |
49 | + delegate: ListItem { |
50 | + height: listItemLayout.height |
51 | + ListItemLayout { |
52 | + id: listItemLayout |
53 | + title.text: fileBaseName |
54 | + ProgressionSlot {} |
55 | + } |
56 | + onClicked: pageLayout.addPageToNextColumn(pageLayout.primaryPage, testPage, { source: fileURL, title: fileBaseName }) |
57 | + } |
58 | + } |
59 | + } |
60 | + asynchronous: false |
61 | + |
62 | + Page { |
63 | + id: testPage |
64 | + property alias source: testLoader.source |
65 | + header: PageHeader { |
66 | + id: testPageHeader |
67 | + title: testPage.title |
68 | + } |
69 | + |
70 | + Loader { |
71 | + id: testLoader |
72 | + anchors.fill: parent |
73 | + anchors.topMargin: testPage.header.height |
74 | + asynchronous: false |
75 | + } |
76 | + } |
77 | + } |
78 | +} |
79 | + |
80 | |
81 | === added file 'tests/unit/visual/gallery.sh' |
82 | --- tests/unit/visual/gallery.sh 1970-01-01 00:00:00 +0000 |
83 | +++ tests/unit/visual/gallery.sh 2016-06-07 14:41:14 +0000 |
84 | @@ -0,0 +1,6 @@ |
85 | +#!/bin/bash |
86 | + |
87 | +. `dirname ${BASH_SOURCE[0]}`/../../../export_qml_dir.sh || exit 1 |
88 | + |
89 | +SCRIPT_DIRECTORY=`dirname $0` |
90 | +$BUILD_DIR/ubuntu-ui-toolkit-launcher/ubuntu-ui-toolkit-launcher $@ $SCRIPT_DIRECTORY/gallery.qml |
91 | |
92 | === modified file 'tests/unit/visual/tst_picker13.qml' |
93 | --- tests/unit/visual/tst_picker13.qml 2016-03-15 13:26:55 +0000 |
94 | +++ tests/unit/visual/tst_picker13.qml 2016-06-07 14:41:14 +0000 |
95 | @@ -100,6 +100,7 @@ |
96 | Loader { |
97 | id: pickerLoader |
98 | asynchronous: false |
99 | + sourceComponent: defaultPicker |
100 | } |
101 | |
102 | ListModel { |
103 | |
104 | === modified file 'tests/unit/visual/tst_popups_dialog13.qml' |
105 | --- tests/unit/visual/tst_popups_dialog13.qml 2016-03-15 13:26:55 +0000 |
106 | +++ tests/unit/visual/tst_popups_dialog13.qml 2016-06-07 14:41:14 +0000 |
107 | @@ -26,6 +26,13 @@ |
108 | width: units.gu(40) |
109 | height: units.gu(71) |
110 | |
111 | + Button { |
112 | + id: pressMe |
113 | + anchors.top: parent.top |
114 | + text: "Open Dialog" |
115 | + onClicked: PopupUtils.open(dialog) |
116 | + } |
117 | + |
118 | UbuntuTestCase { |
119 | id: test |
120 | name: "Popups.Dialog" |
121 | @@ -45,7 +52,13 @@ |
122 | Component { |
123 | id: dialog |
124 | Dialog { |
125 | + id: ahojDialog |
126 | title: "Ahoj" |
127 | + |
128 | + Button { |
129 | + text: "Close" |
130 | + onClicked: PopupUtils.close(ahojDialog) |
131 | + } |
132 | } |
133 | } |
134 | } |
FAILED: Continuous integration, rev:1995 /jenkins. ubuntu. com/ubuntu- sdk/job/ ubuntu- ui-toolkit- ci-armhf- stable/ 854/ /jenkins. ubuntu. com/ubuntu- sdk/job/ generic- update- mp/3574/ console
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/ubuntu- sdk/job/ ubuntu- ui-toolkit- ci-armhf- stable/ 854/rebuild
https:/