Merge lp:~canonical-platform-qa/dialer-app/qmltests1 into lp:dialer-app
- qmltests1
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Gustavo Pichorim Boiko |
Approved revision: | 238 |
Merged at revision: | 270 |
Proposed branch: | lp:~canonical-platform-qa/dialer-app/qmltests1 |
Merge into: | lp:dialer-app |
Prerequisite: | lp:~canonical-platform-qa/dialer-app/custom_proxy_objects |
Diff against target: |
218 lines (+146/-2) 7 files modified
debian/control (+4/-0) debian/rules (+1/-1) src/qml/CMakeLists.txt (+2/-0) src/qml/DialerPage/KeypadButton.qml (+3/-1) tests/CMakeLists.txt (+2/-0) tests/qml/CMakeLists.txt (+31/-0) tests/qml/tst_KeypadButton.qml (+103/-0) |
To merge this branch: | bzr merge lp:~canonical-platform-qa/dialer-app/qmltests1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gustavo Pichorim Boiko (community) | Approve | ||
Didier Roche-Tolomelli | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Canonical Platform QA Team | Pending | ||
Review via email: mp+233130@code.launchpad.net |
This proposal supersedes a proposal from 2014-08-12.
Commit message
Added the initial suite of QML tests.
Description of the change
Are there any related MPs required for this MP to build/function as expected? Please list.
Yes, from boiko:
<boiko> btw, the failure on the qmltests branch is due to telephony-service's qml plugin not pulling the gsettings schemas, but I have an MR to fix that in the same silo
Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
It is.
Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?
I ran the tests many times. They failed only on the schroot and boiko has now found the cause.
Did you successfully run all tests found in your component's Test Plan (https:/
No functionality changes, so no need to run manual tests.
If you changed the UI, was the change specified/approved by design?
No UI changes.
If you changed UI labels, did you update the pot file?
No UI changes.
If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?
Subscribing...
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:218
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://
Leo Arias (elopio) wrote : Posted in a previous version of this proposal | # |
Hum, I guess I'm still missing some dependencies. Back to the workshop.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:219
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 : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:220
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:221
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 : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:222
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
None: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:223
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 : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:224
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Gustavo Pichorim Boiko (boiko) wrote : Posted in a previous version of this proposal | # |
Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
Yes
Did CI run pass? If not, please explain why.
No, but that's because of a missing dependency that got fixed in telephony-service
Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes
Code looks good and works as expected!
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:227
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:228
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Gustavo Pichorim Boiko (boiko) wrote : | # |
Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
Yes
Did CI run pass? If not, please explain why.
No, but that's because it needs a fix done in a separate telephony-service branch
Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes
Code looks good and works as expected!
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:231
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
FAILURE: 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: Continuous integration, rev:237
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:237
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
FAILURE: 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 : | # |
PASSED: Continuous integration, rev:237
http://
Executed test runs:
SUCCESS: http://
SUCCESS: 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 : | # |
PASSED: Continuous integration, rev:238
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Didier Roche-Tolomelli (didrocks) wrote : | # |
ack on the packaging change
Leo Arias (elopio) wrote : | # |
Thanks Didier.
Gustavo Pichorim Boiko (boiko) wrote : | # |
Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
Yes
Did CI run pass? If not, please explain why.
Yes
Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes
Code looks good and works as expected!
Preview Diff
1 | === modified file 'debian/control' |
2 | --- debian/control 2014-09-02 21:06:15 +0000 |
3 | +++ debian/control 2014-09-08 17:18:25 +0000 |
4 | @@ -8,9 +8,13 @@ |
5 | pkg-config, |
6 | python3-all:any, |
7 | dh-python, |
8 | + qml-module-qttest, |
9 | qt5-default, |
10 | qtbase5-dev (>= 5.0), |
11 | qtdeclarative5-dev (>= 5.0), |
12 | + qtdeclarative5-dev-tools, |
13 | + qtdeclarative5-ubuntu-ui-toolkit-plugin, |
14 | + xvfb, |
15 | Standards-Version: 3.9.4 |
16 | Homepage: https://launchpad.net/dialer-app |
17 | # If you aren't a member of ~phablet-team but need to upload packaging changes, |
18 | |
19 | === modified file 'debian/rules' |
20 | --- debian/rules 2014-05-22 14:25:18 +0000 |
21 | +++ debian/rules 2014-09-08 17:18:25 +0000 |
22 | @@ -13,7 +13,7 @@ |
23 | dh_auto_configure -- -DCMAKE_BUILD_TYPE=Debug |
24 | |
25 | override_dh_auto_test: |
26 | - make -C obj-$(DEB_HOST_GNU_TYPE) test |
27 | + CTEST_OUTPUT_ON_FAILURE=1 make -C obj-$(DEB_HOST_GNU_TYPE) test |
28 | |
29 | override_dh_translations: |
30 | # Override dh_translations to work around http://pad.lv/1183262. |
31 | |
32 | === modified file 'src/qml/CMakeLists.txt' |
33 | --- src/qml/CMakeLists.txt 2014-08-22 14:51:14 +0000 |
34 | +++ src/qml/CMakeLists.txt 2014-09-08 17:18:25 +0000 |
35 | @@ -1,3 +1,5 @@ |
36 | +project(qml) |
37 | + |
38 | file(GLOB QML_JS_FILES *.qml *.js) |
39 | |
40 | # make the files visible on qtcreator |
41 | |
42 | === modified file 'src/qml/DialerPage/KeypadButton.qml' |
43 | --- src/qml/DialerPage/KeypadButton.qml 2014-08-06 02:49:06 +0000 |
44 | +++ src/qml/DialerPage/KeypadButton.qml 2014-09-08 17:18:25 +0000 |
45 | @@ -33,10 +33,11 @@ |
46 | property bool isCorner: false |
47 | property int corner |
48 | property alias pressed: mouseArea.pressed |
49 | - |
50 | + |
51 | signal keyPressed() |
52 | |
53 | UbuntuShape { |
54 | + objectName: "keypadButtonUbuntuShape" |
55 | anchors.fill: parent |
56 | opacity: button.pressed ? 1 : 0 |
57 | |
58 | @@ -48,6 +49,7 @@ |
59 | } |
60 | |
61 | Item { |
62 | + objectName: "keypadButtonLabelsContainer" |
63 | height: childrenRect.height |
64 | width: parent.width |
65 | clip: true |
66 | |
67 | === modified file 'tests/CMakeLists.txt' |
68 | --- tests/CMakeLists.txt 2014-08-13 17:24:42 +0000 |
69 | +++ tests/CMakeLists.txt 2014-09-08 17:18:25 +0000 |
70 | @@ -1,1 +1,3 @@ |
71 | +add_subdirectory(qml) |
72 | + |
73 | add_subdirectory(autopilot) |
74 | |
75 | === added directory 'tests/qml' |
76 | === added file 'tests/qml/CMakeLists.txt' |
77 | --- tests/qml/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
78 | +++ tests/qml/CMakeLists.txt 2014-09-08 17:18:25 +0000 |
79 | @@ -0,0 +1,31 @@ |
80 | +find_program(QMLTESTRUNNER_BIN |
81 | + NAMES qmltestrunner |
82 | + PATHS /usr/lib/*/qt5/bin |
83 | + NO_DEFAULT_PATH |
84 | +) |
85 | + |
86 | +find_program(XVFB_RUN_BIN |
87 | + NAMES xvfb-run |
88 | +) |
89 | + |
90 | +macro(DECLARE_QML_TEST TST_NAME TST_QML_FILE) |
91 | + add_test(NAME ${TST_NAME} |
92 | + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
93 | + COMMAND ${XVFB_RUN_BIN} -a -s "-screen 0 1024x768x24" ${QMLTESTRUNNER_BIN} -import ${qml_BINARY_DIR} -input ${CMAKE_CURRENT_SOURCE_DIR}/${TST_QML_FILE} |
94 | + ) |
95 | +endmacro() |
96 | + |
97 | +if(QMLTESTRUNNER_BIN AND XVFB_RUN_BIN) |
98 | + declare_qml_test("keypad_button" tst_KeypadButton.qml) |
99 | +else() |
100 | + if (NOT QMLTESTRUNNER_BIN) |
101 | + message(WARNING "Qml tests disabled: qmltestrunner not found") |
102 | + else() |
103 | + message(WARNING "Qml tests disabled: xvfb-run not found") |
104 | + endif() |
105 | +endif() |
106 | + |
107 | +set(QML_TST_FILES |
108 | + tst_KeypadButton.qml |
109 | +) |
110 | +add_custom_target(tst_QmlFiles ALL SOURCES ${QML_TST_FILES}) |
111 | |
112 | === added file 'tests/qml/tst_KeypadButton.qml' |
113 | --- tests/qml/tst_KeypadButton.qml 1970-01-01 00:00:00 +0000 |
114 | +++ tests/qml/tst_KeypadButton.qml 2014-09-08 17:18:25 +0000 |
115 | @@ -0,0 +1,103 @@ |
116 | +/* |
117 | + * Copyright 2014 Canonical Ltd. |
118 | + * |
119 | + * This file is part of dialer-app. |
120 | + * |
121 | + * dialer-app is free software; you can redistribute it and/or modify |
122 | + * it under the terms of the GNU General Public License as published by |
123 | + * the Free Software Foundation; version 3. |
124 | + * |
125 | + * dialer-app is distributed in the hope that it will be useful, |
126 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
127 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
128 | + * GNU General Public License for more details. |
129 | + * |
130 | + * You should have received a copy of the GNU General Public License |
131 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
132 | + */ |
133 | + |
134 | +import QtQuick 2.2 |
135 | +import QtTest 1.0 |
136 | +import Ubuntu.Test 0.1 |
137 | + |
138 | +import '../../src/qml/DialerPage' |
139 | + |
140 | +Item { |
141 | + id: root |
142 | + |
143 | + width: units.gu(40) |
144 | + height: units.gu(60) |
145 | + |
146 | + KeypadButton { |
147 | + id: keypadButton |
148 | + label: 'test label' |
149 | + keycode: 1 |
150 | + |
151 | + anchors.fill: parent |
152 | + } |
153 | + |
154 | + SignalSpy { |
155 | + id: spyOnKeyPressed |
156 | + target: keypadButton |
157 | + signalName: 'keyPressed' |
158 | + } |
159 | + |
160 | + UbuntuTestCase { |
161 | + id: keypadButtonTestCase |
162 | + name: 'keypadButtonTestCase' |
163 | + |
164 | + when: windowShown |
165 | + |
166 | + function init() { |
167 | + waitForRendering(keypadButton); |
168 | + } |
169 | + |
170 | + function cleanup() { |
171 | + spyOnKeyPressed.clear() |
172 | + } |
173 | + |
174 | + function test_clickButtonMustScaleLabelsContainer() { |
175 | + var labelsContainer = findChild( |
176 | + keypadButton, 'keypadButtonLabelsContainer') |
177 | + compare(labelsContainer.scale, 1) |
178 | + |
179 | + mousePress( |
180 | + keypadButton, keypadButton.width / 2, keypadButton.height / 2) |
181 | + |
182 | + tryCompare(labelsContainer, 'scale', 0.9) |
183 | + |
184 | + mouseRelease( |
185 | + keypadButton, keypadButton.width / 2, keypadButton.height / 2) |
186 | + |
187 | + tryCompare(labelsContainer, 'scale', 1) |
188 | + } |
189 | + |
190 | + function test_clickButtonMustMakeUbuntuShapeVisible() { |
191 | + var ubuntuShape = findChild( |
192 | + keypadButton, 'keypadButtonUbuntuShape') |
193 | + compare(ubuntuShape.opacity, 0) |
194 | + |
195 | + mousePress( |
196 | + keypadButton, keypadButton.width / 2, keypadButton.height / 2) |
197 | + |
198 | + tryCompare(ubuntuShape, 'opacity', 1) |
199 | + |
200 | + mouseRelease( |
201 | + keypadButton, keypadButton.width / 2, keypadButton.height / 2) |
202 | + |
203 | + tryCompare(ubuntuShape, 'opacity', 0) |
204 | + } |
205 | + |
206 | + function test_clickButtonMustEmitKeyPressed() { |
207 | + mouseClick( |
208 | + keypadButton, keypadButton.width / 2, keypadButton.height / 2) |
209 | + |
210 | + spyOnKeyPressed.wait() |
211 | + compare( |
212 | + spyOnKeyPressed.count, 1, |
213 | + 'keyPressed signal was not emitted.') |
214 | + } |
215 | + |
216 | + } |
217 | + |
218 | +} |
FAILED: Continuous integration, rev:217 jenkins. qa.ubuntu. com/job/ dialer- app-ci/ 372/ jenkins. qa.ubuntu. com/job/ dialer- app-utopic- amd64-ci/ 143/console jenkins. qa.ubuntu. com/job/ dialer- app-utopic- armhf-ci/ 142/console jenkins. qa.ubuntu. com/job/ dialer- app-utopic- i386-ci/ 143/console jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- utopic- touch/3363/ console jenkins. qa.ubuntu. com/job/ generic- mediumtests- utopic/ 2635/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/4609/ console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- amd64/2911/ console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/dialer- app-ci/ 372/rebuild
http://