Merge lp:~canonical-platform-qa/ubuntu-ui-toolkit/fix1351670-grid_view_autopilot_helper into lp:ubuntu-ui-toolkit/staging
- fix1351670-grid_view_autopilot_helper
- Merge into staging
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Zoltan Balogh | ||||
Approved revision: | 1179 | ||||
Merged at revision: | 1197 | ||||
Proposed branch: | lp:~canonical-platform-qa/ubuntu-ui-toolkit/fix1351670-grid_view_autopilot_helper | ||||
Merge into: | lp:ubuntu-ui-toolkit/staging | ||||
Diff against target: |
162 lines (+112/-0) 5 files modified
tests/autopilot/ubuntuuitoolkit/__init__.py (+2/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/__init__.py (+4/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_qquickgridview.py (+22/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquickgridview.QQuickGridViewTestCase.qml (+40/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquickgridview.py (+44/-0) |
||||
To merge this branch: | bzr merge lp:~canonical-platform-qa/ubuntu-ui-toolkit/fix1351670-grid_view_autopilot_helper | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Omer Akram (community) | Approve | ||
Ubuntu SDK team | Pending | ||
Review via email: mp+229353@code.launchpad.net |
Commit message
Added an autopilot custom proxy for QQuickGridView.
Description of the change
Leo Arias (elopio) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1178
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Omer Akram (om26er) wrote : | # |
148 + def test_qquickgrid
Please add a docstring here since the method name does not mention you are testing inheritance.
Also I would prefer it to be two different tests one for inheritance and the other for IsInstance. But I won't block the MR on that if you think otherwise.
Leo Arias (elopio) wrote : | # |
Thanks Omer. I've split the tests in two, and used better names on them.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1179
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Omer Akram (om26er) wrote : | # |
Thanks for fixing that.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1179
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
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:1179
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
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:1179
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1179
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1179
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
Approved revid is not set in launchpad. This is most likely a launchpad issue and re-approve should fix it. There is also a chance (although a very small one) this is a permission problem of the ps-jenkins bot.
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'tests/autopilot/ubuntuuitoolkit/__init__.py' |
2 | --- tests/autopilot/ubuntuuitoolkit/__init__.py 2014-07-26 00:10:22 +0000 |
3 | +++ tests/autopilot/ubuntuuitoolkit/__init__.py 2014-08-04 15:36:14 +0000 |
4 | @@ -34,6 +34,7 @@ |
5 | 'pickers', |
6 | 'popups', |
7 | 'QQuickFlickable', |
8 | + 'QQuickGridView', |
9 | 'QQuickListView', |
10 | 'TabBar', |
11 | 'Tabs', |
12 | @@ -69,6 +70,7 @@ |
13 | pickers, |
14 | popups, |
15 | QQuickFlickable, |
16 | + QQuickGridView, |
17 | QQuickListView, |
18 | TabBar, |
19 | Tabs, |
20 | |
21 | === modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/__init__.py' |
22 | --- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/__init__.py 2014-07-26 00:10:22 +0000 |
23 | +++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/__init__.py 2014-08-04 15:36:14 +0000 |
24 | @@ -30,6 +30,7 @@ |
25 | 'pickers', |
26 | 'popups', |
27 | 'QQuickFlickable', |
28 | + 'QQuickGridView', |
29 | 'QQuickListView', |
30 | 'TabBar', |
31 | 'Tabs', |
32 | @@ -61,6 +62,9 @@ |
33 | ) |
34 | from ubuntuuitoolkit._custom_proxy_objects import pickers |
35 | from ubuntuuitoolkit._custom_proxy_objects import popups |
36 | +from ubuntuuitoolkit._custom_proxy_objects._qquickgridview import ( |
37 | + QQuickGridView |
38 | +) |
39 | from ubuntuuitoolkit._custom_proxy_objects._qquicklistview import ( |
40 | QQuickListView |
41 | ) |
42 | |
43 | === added file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_qquickgridview.py' |
44 | --- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_qquickgridview.py 1970-01-01 00:00:00 +0000 |
45 | +++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_qquickgridview.py 2014-08-04 15:36:14 +0000 |
46 | @@ -0,0 +1,22 @@ |
47 | +# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
48 | +# |
49 | +# Copyright (C) 2014 Canonical Ltd. |
50 | +# |
51 | +# This program is free software; you can redistribute it and/or modify |
52 | +# it under the terms of the GNU Lesser General Public License as published by |
53 | +# the Free Software Foundation; version 3. |
54 | +# |
55 | +# This program is distributed in the hope that it will be useful, |
56 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
57 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
58 | +# GNU Lesser General Public License for more details. |
59 | +# |
60 | +# You should have received a copy of the GNU Lesser General Public License |
61 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
62 | + |
63 | +from ubuntuuitoolkit._custom_proxy_objects import _flickable |
64 | + |
65 | + |
66 | +class QQuickGridView(_flickable.QQuickFlickable): |
67 | + |
68 | + """Autopilot helper for the QQuickGridView component.""" |
69 | |
70 | === added file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquickgridview.QQuickGridViewTestCase.qml' |
71 | --- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquickgridview.QQuickGridViewTestCase.qml 1970-01-01 00:00:00 +0000 |
72 | +++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquickgridview.QQuickGridViewTestCase.qml 2014-08-04 15:36:14 +0000 |
73 | @@ -0,0 +1,40 @@ |
74 | +/* |
75 | + * Copyright 2014 Canonical Ltd. |
76 | + * |
77 | + * This program is free software; you can redistribute it and/or modify |
78 | + * it under the terms of the GNU Lesser General Public License as published by |
79 | + * the Free Software Foundation; version 3. |
80 | + * |
81 | + * This program is distributed in the hope that it will be useful, |
82 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
83 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
84 | + * GNU Lesser General Public License for more details. |
85 | + * |
86 | + * You should have received a copy of the GNU Lesser General Public License |
87 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
88 | + */ |
89 | + |
90 | +import QtQuick 2.0 |
91 | +import Ubuntu.Components 1.1 |
92 | +import Ubuntu.Components.ListItems 0.1 as ListItems |
93 | + |
94 | +MainView { |
95 | + |
96 | + width: units.gu(60) |
97 | + height: units.gu(80) |
98 | + objectName: 'mainView' |
99 | + |
100 | + GridView { |
101 | + objectName: 'testListView' |
102 | + anchors.fill: parent |
103 | + clip: true |
104 | + model: 20 |
105 | + |
106 | + delegate: ListItems.Standard { |
107 | + objectName: 'testListElement%1'.arg(index) |
108 | + text: 'test list element %1'.arg(index) |
109 | + height: units.gu(5) |
110 | + width: units.gu(15) |
111 | + } |
112 | + } |
113 | +} |
114 | |
115 | === added file 'tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquickgridview.py' |
116 | --- tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquickgridview.py 1970-01-01 00:00:00 +0000 |
117 | +++ tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquickgridview.py 2014-08-04 15:36:14 +0000 |
118 | @@ -0,0 +1,44 @@ |
119 | +# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
120 | +# |
121 | +# Copyright (C) 2014 Canonical Ltd. |
122 | +# |
123 | +# This program is free software; you can redistribute it and/or modify |
124 | +# it under the terms of the GNU Lesser General Public License as published by |
125 | +# the Free Software Foundation; version 3. |
126 | +# |
127 | +# This program is distributed in the hope that it will be useful, |
128 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
129 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
130 | +# GNU Lesser General Public License for more details. |
131 | +# |
132 | +# You should have received a copy of the GNU Lesser General Public License |
133 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
134 | + |
135 | +import os |
136 | + |
137 | +import testtools |
138 | + |
139 | +import ubuntuuitoolkit |
140 | +from ubuntuuitoolkit import tests |
141 | + |
142 | + |
143 | +class QQuickGridViewClassTestCase(testtools.TestCase): |
144 | + |
145 | + def test_qquickgridview_custom_proxy_object_inherits_from_flickable(self): |
146 | + self.assertTrue( |
147 | + issubclass( |
148 | + ubuntuuitoolkit.QQuickGridView, |
149 | + ubuntuuitoolkit.QQuickFlickable)) |
150 | + |
151 | + |
152 | +class QQuickGridViewTestCase(tests.QMLFileAppTestCase): |
153 | + |
154 | + path = os.path.abspath(__file__) |
155 | + dir_path = os.path.dirname(path) |
156 | + test_qml_file_path = os.path.join( |
157 | + dir_path, 'test_qquickgridview.QQuickGridViewTestCase.qml') |
158 | + |
159 | + def test_select_qquickgridview_must_return_custom_proxy_object(self): |
160 | + grid_view = self.main_view.select_single( |
161 | + ubuntuuitoolkit.QQuickGridView, objectName='testListView') |
162 | + self.assertIsInstance(grid_view, ubuntuuitoolkit.QQuickGridView) |
For now, we only need it to expose the methods in the flickable class.