Merge lp:~canonical-platform-qa/ubuntu-ui-toolkit/fix1351670-grid_view_autopilot_helper into lp:ubuntu-ui-toolkit/staging

Proposed by Leo Arias
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
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.

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote :

For now, we only need it to expose the methods in the flickable class.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:1178
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/717/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2956
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2344
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/549
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/549
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/549/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/549
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3014
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4199
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4199/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10903
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1939
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2610
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2610/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/717/rebuild

review: Approve (continuous-integration)
Revision history for this message
Omer Akram (om26er) wrote :

148 + def test_qquickgridview_custom_proxy_object(self):

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.

review: Needs Fixing
Revision history for this message
Leo Arias (elopio) wrote :

Thanks Omer. I've split the tests in two, and used better names on them.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1179
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/725/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2988
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2368
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/557
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/557
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/557/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/557
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3039
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4231
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4231/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10940
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1959
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2634
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2634/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/725/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Omer Akram (om26er) wrote :

Thanks for fixing that.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:1179
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/789/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/3387
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2657
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/621
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/621
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/621/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/621
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3311
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4634
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4634/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/11311
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/2148
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2934
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2934/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/789/rebuild

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-autolanding/342/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/3391
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2661
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-autolanding/286
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-autolanding/286
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-autolanding/286/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-autolanding/286
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3317
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4638
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4638/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/11317
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/2152
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2938
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2938/artifact/work/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:1179
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/801/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/3449
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2711
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/633
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/633
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/633/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/633
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3357
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4696
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4696/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/11367
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/2191
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2988
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2988/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/801/rebuild

review: Approve (continuous-integration)
Revision history for this message
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://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-autolanding/357/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/3483
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2740
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-autolanding/301
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-autolanding/301
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-autolanding/301/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-autolanding/301
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3384
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4730
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4730/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/11408
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/2215
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/3017
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/3017/artifact/work/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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)

Subscribers

People subscribed via source and target branches