Merge lp:~abreu-alexandre/ubuntu-html5-theme/port-to-python3 into lp:ubuntu-html5-theme

Proposed by Alexandre Abreu
Status: Merged
Approved by: Alexandre Abreu
Approved revision: no longer in the source branch.
Merged at revision: 191
Proposed branch: lp:~abreu-alexandre/ubuntu-html5-theme/port-to-python3
Merge into: lp:ubuntu-html5-theme
Diff against target: 160 lines (+58/-11)
8 files modified
README (+18/-0)
debian/control (+5/-6)
debian/ubuntu-html5-container-autopilot.install (+1/-1)
debian/ubuntu-html5-ui-toolkit-autopilot.install (+1/-1)
tests/autopilot/CMakeLists.txt (+1/-1)
tests/autopilot/tools/qml/message-server.js (+29/-0)
tests/autopilot/tools/qml/webview.qml (+2/-1)
tests/autopilot/ubuntu_html5_ui_toolkit/tests/__init__.py (+1/-1)
To merge this branch: bzr merge lp:~abreu-alexandre/ubuntu-html5-theme/port-to-python3
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Robert Bruce Park Pending
Ubuntu HTML5 Theme Developers Pending
Review via email: mp+234725@code.launchpad.net

Commit message

Port AP tests to python3 (blocking all other landings for fixes on the project)

Description of the change

Port AP tests to python3 (blocking all other landings for fixes on the project)

To post a comment you must log in.
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)
171. By Alexandre Abreu

make ubuntu-html5-container multi-arch foreign; update dependencies for libqt5webkit5-qmlwebkitplugin to qml-module-qtwebkit

172. By Alexandre Abreu

add forgotten changelog

173. By Steve Langasek

Drop unused dependency on dpkg-dev from ubuntu-html5-container. LP: #1369052. Fixes: 1369052
Approved by: PS Jenkins bot, Alexandre Abreu

174. By PS Jenkins bot

Releasing 0.1.2+14.10.20140922.1-0ubuntu1

175. By Jean-Francois Moy

Fixed alignment issues. Fixed UI.optionselector being incorrectly documented. Aligned terminology between various pages. Fixed incorrect UI.progress documentation. Fixes: 1276234
Approved by: Alexandre Abreu, PS Jenkins bot, David Barth

176. By PS Jenkins bot

Releasing 0.1.2+14.10.20141008-0ubuntu1

177. By Alexandre Abreu

Port HTML5 containert to oxide
Approved by: Alexandre Abreu

178. By PS Jenkins bot

Releasing 0.1.2+15.04.20141122-0ubuntu1

179. By Alexandre Abreu

Add --oxide flag to switch between oxide/webkit; simplify code.

For a smooth transition between the ubuntu-html5-app-launcher and the webapp-container as the new html5 container and to allow for some amount of backward compatibility, this MR makes sure that oxide can be used (part of the qtwebkit removal) with the launcher, and existsing apps can still function.

180. By CI Train Bot Account

Releasing 0.1.2+15.04.20141210.1-0ubuntu1

181. By Alexandre Abreu

Small fix for new tab/target blank handling

182. By CI Train Bot Account

Releasing 0.1.2+15.04.20141212.1-0ubuntu1

183. By Alexandre Abreu

Cleanup oxide option and set it as default and only option

184. By CI Train Bot Account

Releasing 0.1.2+15.04.20141217-0ubuntu1

185. By David Barth

Fix a few small typos in the docs

186. By David Barth

Make sure to add the header after it's created

187. By David Barth

Remove the strict cordova-2.8 dependency, which is not supported anymore Fixes: #1409656

188. By Alexandre Abreu

Meta branch that contains those bug fixes (easier to land):

lp:~daker/ubuntu-html5-theme/fix.1243396
lp:~daker/ubuntu-html5-theme/fix.1294779
lp:~daker/ubuntu-html5-theme/fix.1294993
lp:~daker/ubuntu-html5-theme/fix.1294986
lp:~daker/ubuntu-html5-theme/fix.1216874
lp:~daker/ubuntu-html5-theme/fix.slider

189. By Adnane Belmadiaf

Added timer to hide the toolbar Fixes: #1292109, #1293899
Approved by: Alexandre Abreu

190. By CI Train Bot Account

Releasing 0.1.2+15.04.20150115.2-0ubuntu1

191. By Alexandre Abreu

fixes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2014-05-25 18:51:21 +0000
3+++ README 2015-01-21 16:41:55 +0000
4@@ -26,3 +26,21 @@
5 branch folder. Then enter this command to begin watching your scss files:
6 $ sass --watch 0.1/ambiance/css/sass/default.scss:0.1/ambiance/css/appTemplate.css --style expanded
7
8+Automated UI tests
9+==================
10+
11+The ubuntu-html5 container and the ubuntu-ui-toolkit both use autopilot (https://launchpad.net/autopilot) to test its functional elements.
12+
13+To run the tests, you will need to install python3-autopilot and libautopilot-qt.
14+Then do the following:
15+
16+ $ cd tests/autopilot/
17+ $ autopilot3 run ubuntu_html5_ui_toolkit
18+ $ autopilot3 run ubuntu_html5_container
19+
20+You can get a list of all available tests with the following commands:
21+
22+ $ autopilot3 list ubuntu_html5_ui_toolkit
23+ $ autopilot3 list ubuntu_html5_container
24+
25+
26
27=== modified file 'debian/control'
28--- debian/control 2015-01-15 16:20:21 +0000
29+++ debian/control 2015-01-21 16:41:55 +0000
30@@ -5,8 +5,8 @@
31 Build-Depends: cmake (>= 2.8.9),
32 debhelper (>= 9),
33 liboxideqt-qmlplugin (>= 1.2.0),
34- python (>= 2.7),
35- python-setuptools,
36+ python3-all,
37+ python3-setuptools,
38 qt5-default,
39 qt5-qmake,
40 qtbase5-dev,
41@@ -64,13 +64,13 @@
42 libjs-jquery,
43 libqt5test5,
44 liboxideqt-qmlplugin (>= 1.2.0),
45- python-xlib,
46+ python3-xlib,
47+ python3-autopilot,
48 qmlscene,
49 qtdeclarative5-qtquick2-plugin,
50 ubuntu-html5-ui-toolkit (= ${binary:Version}),
51 ubuntu-html5-ui-toolkit-examples (= ${binary:Version}),
52 ${misc:Depends},
53- ${python:Depends},
54 Replaces: ubuntu-html5-theme-autopilot (<< 0.1.1),
55 Conflicts: ubuntu-html5-theme-autopilot (<< 0.1.1),
56 Provides: ubuntu-html5-theme-autopilot,
57@@ -89,7 +89,6 @@
58 ubuntu-html5-ui-toolkit (= ${source:Version}),
59 unity-webapps-qml (>= 0.1+14.04.20131106-0ubuntu2),
60 ${misc:Depends},
61- ${python:Depends},
62 ${shlibs:Depends},
63 Description: Ubuntu HTML5 QML container component for HTML5 touch apps.
64 This package contains the Ubuntu HTML5 QML component used to embed HTML5
65@@ -102,8 +101,8 @@
66 liboxideqt-qmlplugin (>= 1.2.0),
67 qtdeclarative5-qtquick2-plugin,
68 ubuntu-html5-container (>= ${binary:Version}),
69+ python3-autopilot,
70 ${misc:Depends},
71- ${python:Depends},
72 Description: Autopilot tests for the Ubuntu HTML5 QML container component for HTML5 touch apps.
73 This package contains the Ubuntu HTML5 QML component used to embed HTML5
74 apps at runtime. This package contains the autopilot tests.
75
76=== modified file 'debian/ubuntu-html5-container-autopilot.install'
77--- debian/ubuntu-html5-container-autopilot.install 2014-02-06 22:51:33 +0000
78+++ debian/ubuntu-html5-container-autopilot.install 2015-01-21 16:41:55 +0000
79@@ -1,1 +1,1 @@
80-usr/lib/python*/dist-packages/ubuntu_html5_container/*
81+usr/lib/python3/dist-packages/ubuntu_html5_container/*
82
83=== modified file 'debian/ubuntu-html5-ui-toolkit-autopilot.install'
84--- debian/ubuntu-html5-ui-toolkit-autopilot.install 2014-02-11 05:21:31 +0000
85+++ debian/ubuntu-html5-ui-toolkit-autopilot.install 2015-01-21 16:41:55 +0000
86@@ -1,2 +1,2 @@
87-usr/lib/python*/dist-packages/ubuntu_html5_ui_toolkit/*
88+usr/lib/python3/dist-packages/ubuntu_html5_ui_toolkit/*
89 usr/share/ubuntu-html5-ui-toolkit/tests
90
91=== modified file 'tests/autopilot/CMakeLists.txt'
92--- tests/autopilot/CMakeLists.txt 2014-02-11 05:21:31 +0000
93+++ tests/autopilot/CMakeLists.txt 2015-01-21 16:41:55 +0000
94@@ -1,4 +1,4 @@
95-execute_process(COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
96+execute_process(COMMAND python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
97 OUTPUT_VARIABLE PYTHON_PACKAGE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
98
99 install(DIRECTORY ubuntu_html5_container ubuntu_html5_ui_toolkit
100
101=== added file 'tests/autopilot/tools/qml/message-server.js'
102--- tests/autopilot/tools/qml/message-server.js 1970-01-01 00:00:00 +0000
103+++ tests/autopilot/tools/qml/message-server.js 2015-01-21 16:41:55 +0000
104@@ -0,0 +1,29 @@
105+// Copyright (C) 2014 Canonical Ltd.
106+
107+// This library is free software; you can redistribute it and/or
108+// modify it under the terms of the GNU Lesser General Public
109+// License as published by the Free Software Foundation; either
110+// version 2.1 of the License, or (at your option) any later version.
111+
112+// This library is distributed in the hope that it will be useful,
113+// but WITHOUT ANY WARRANTY; without even the implied warranty of
114+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
115+// Lesser General Public License for more details.
116+
117+// You should have received a copy of the GNU Lesser General Public
118+// License along with this library; if not, write to the Free Software
119+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
120+
121+oxide.addMessageHandler("EVALUATE-CODE", function(msg) {
122+ var code = msg.args.code;
123+ if (msg.args.wrap) {
124+ code = "(function() {" + code + "})()";
125+ }
126+ try {
127+ var result = eval(code);
128+ msg.reply({result: result});
129+ } catch(e) {
130+ msg.error("Code threw exception: \"" + e + "\"");
131+ }
132+});
133+
134
135=== modified file 'tests/autopilot/tools/qml/webview.qml'
136--- tests/autopilot/tools/qml/webview.qml 2014-11-19 18:36:44 +0000
137+++ tests/autopilot/tools/qml/webview.qml 2015-01-21 16:41:55 +0000
138@@ -72,7 +72,8 @@
139
140 function evalInPageUnsafe(expr) {
141 var result = webview.evaluateCode(expr, true);
142- root.resultUpdated(result.toString())
143+ console.log('result: ' + result)
144+ root.resultUpdated(result ? result.toString() : result)
145 }
146
147 function clickAnyElementBySelector(selector) {
148
149=== modified file 'tests/autopilot/ubuntu_html5_ui_toolkit/tests/__init__.py'
150--- tests/autopilot/ubuntu_html5_ui_toolkit/tests/__init__.py 2014-11-19 18:36:44 +0000
151+++ tests/autopilot/ubuntu_html5_ui_toolkit/tests/__init__.py 2015-01-21 16:41:55 +0000
152@@ -200,7 +200,7 @@
153 def eval_expression_in_page_unsafe(self, expr):
154 webview = self.get_webviewContainer()
155 prev_emissions = self.watcher.num_emissions
156- result = webview.slots.evalInPageUnsafe(expr)
157+ webview.slots.evalInPageUnsafe(expr)
158 self.assertThat(
159 lambda: self.watcher.num_emissions,
160 Eventually(GreaterThan(prev_emissions)))

Subscribers

People subscribed via source and target branches