Merge lp:~abreu-alexandre/ubuntu-html5-theme/fix-ap-tests 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: 210
Proposed branch: lp:~abreu-alexandre/ubuntu-html5-theme/fix-ap-tests
Merge into: lp:ubuntu-html5-theme
Diff against target: 129 lines (+15/-21)
5 files modified
0.1/ambiance/js/tabs.js (+5/-15)
debian/control (+2/-0)
examples/html5-theme/apps/rss-reader/app.js (+3/-2)
tests/autopilot/ubuntu_html5_ui_toolkit/tests/test_tabs.py (+3/-3)
tests/data/html/apps/rss-reader/app.js (+2/-1)
To merge this branch: bzr merge lp:~abreu-alexandre/ubuntu-html5-theme/fix-ap-tests
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu HTML5 Theme Developers Pending
Review via email: mp+255084@code.launchpad.net

Commit message

Fix AP tests and tab selection issue

Description of the change

Fix AP tests

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)
201. By Michael Hall

Add -doc package, whose contents have to be generated locally (use the ./update-docs command) because not all of its node dependencies are in the archive. This is done, so we can more easily update developer.ubuntu.com/api
Approved by: David Barth

202. By CI Train Bot Account

Releasing 0.1.2+15.04.20150409.1-0ubuntu1

203. By Alexandre Abreu

Remove QtWebkit support code Fixes: #1362640
Approved by: Olivier Tilloy

204. By CI Train Bot Account

Releasing 0.1.2+15.04.20150410-0ubuntu1

205. By Alexandre Abreu

Fix gallery & component showcase Fixes: #1450614

206. By Alexandre Abreu

Update debian/control to remove qt private package deps; Rely on Qt 5.4's new API Fixes: #1387537

207. By David Barth

Add a command line tool to maintain a theme installation in an html5 project Fixes: #1451937

208. By Alexandre Abreu

Fix page actions; no need to create actions when none is defined Fixes: #1455622

209. By CI Train Bot Account

Releasing 0.1.2+15.10.20150520-0ubuntu1

210. By Alexandre Abreu

Fix Autopilot tests for the ubuntu ui tk are failing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '0.1/ambiance/js/tabs.js'
--- 0.1/ambiance/js/tabs.js 2015-05-19 17:31:55 +0000
+++ 0.1/ambiance/js/tabs.js 2015-06-04 21:56:07 +0000
@@ -189,8 +189,8 @@
189 this._tabtitle.appendChild(tabtitle_value);189 this._tabtitle.appendChild(tabtitle_value);
190190
191 var tab = this._tabs.querySelector('[data-role="tabitem"]:first-child');191 var tab = this._tabs.querySelector('[data-role="tabitem"]:first-child');
192 /*tab.classList.remove('inactive');192 tab.classList.remove('inactive');
193 tab.classList.add('active');*/193 tab.classList.add('active');
194194
195 this._header.innerHTML = '';195 this._header.innerHTML = '';
196 this._header.appendChild(backbtn);196 this._header.appendChild(backbtn);
@@ -229,11 +229,7 @@
229 /**229 /**
230 * @private230 * @private
231 */231 */
232 __updateActiveTab: function (newActiveTab) {232 __updateActiveTabContent: function (newActiveTab) {
233 //oldActiveTab.classList.remove('inactive');
234 //oldActiveTab.classList.remove('active');
235 //newActiveTab.classList.remove('inactive');
236 //newActiveTab.classList.add('active');
237 this._tabtitle.textContent = newActiveTab.innerHTML;233 this._tabtitle.textContent = newActiveTab.innerHTML;
238 },234 },
239235
@@ -260,16 +256,10 @@
260 if (tabElement.getAttribute("data-role") !== 'tabitem')256 if (tabElement.getAttribute("data-role") !== 'tabitem')
261 return;257 return;
262258
263 this.__updateActiveTab(tabElement);259 this.__updateActiveTabContent(tabElement);
264
265 /*activeTab = this._tabs.querySelector('[data-role="tabitem"].active');
266 [].forEach.call(this._tabs.querySelectorAll('[data-role="tabitem"]:not(.active)'), function (e) {
267 e.classList.remove('inactive');
268 });*/
269260
270 var targetPageId = tabElement.getAttribute('data-page');261 var targetPageId = tabElement.getAttribute('data-page');
271262 this.__activate(targetPageId);
272 //this.__activate(targetPageId);
273263
274 this.__dispatchTabChangedEvent(targetPageId);264 this.__dispatchTabChangedEvent(targetPageId);
275 if (this._firstrun) {265 if (this._firstrun) {
276266
=== modified file 'debian/control'
--- debian/control 2015-04-30 17:30:05 +0000
+++ debian/control 2015-06-04 21:56:07 +0000
@@ -12,6 +12,7 @@
12 qtbase5-dev (>= 5.4),12 qtbase5-dev (>= 5.4),
13 qtdeclarative5-dev,13 qtdeclarative5-dev,
14 qtdeclarative5-qtquick2-plugin,14 qtdeclarative5-qtquick2-plugin,
15 qml-module-qttest | qtdeclarative5-test-plugin,
15 qtdeclarative5-ubuntu-ui-toolkit-plugin,16 qtdeclarative5-ubuntu-ui-toolkit-plugin,
16Standards-Version: 3.9.517Standards-Version: 3.9.5
17# if you don't have have commit access to this branch but would like to upload18# if you don't have have commit access to this branch but would like to upload
@@ -67,6 +68,7 @@
67 python3-autopilot,68 python3-autopilot,
68 qmlscene,69 qmlscene,
69 qtdeclarative5-qtquick2-plugin,70 qtdeclarative5-qtquick2-plugin,
71 qml-module-qttest | qtdeclarative5-test-plugin,
70 ubuntu-html5-ui-toolkit (= ${binary:Version}),72 ubuntu-html5-ui-toolkit (= ${binary:Version}),
71 ubuntu-html5-ui-toolkit-examples (= ${binary:Version}),73 ubuntu-html5-ui-toolkit-examples (= ${binary:Version}),
72 ${misc:Depends},74 ${misc:Depends},
7375
=== modified file 'examples/html5-theme/apps/rss-reader/app.js'
--- examples/html5-theme/apps/rss-reader/app.js 2014-07-07 00:42:25 +0000
+++ examples/html5-theme/apps/rss-reader/app.js 2015-06-04 21:56:07 +0000
@@ -19,7 +19,7 @@
19 * License along with this program. If not, see19 * License along with this program. If not, see
20 * <http://www.gnu.org/licenses/>20 * <http://www.gnu.org/licenses/>
21 */21 */
22var UI = new UbuntuUI();22var UI;
2323
24document.addEventListener('deviceready', function () {24document.addEventListener('deviceready', function () {
25 console.log('device ready');25 console.log('device ready');
@@ -27,6 +27,7 @@
2727
28$(document).ready(function () {28$(document).ready(function () {
2929
30 UI = new UbuntuUI()
30 UI.init();31 UI.init();
31 UI.pagestack.push("main");32 UI.pagestack.push("main");
3233
@@ -142,4 +143,4 @@
142143
143}144}
144145
145google.load("feeds", "1");
146\ No newline at end of file146\ No newline at end of file
147google.load("feeds", "1");
147148
=== modified file 'tests/autopilot/ubuntu_html5_ui_toolkit/tests/test_tabs.py'
--- tests/autopilot/ubuntu_html5_ui_toolkit/tests/test_tabs.py 2015-05-19 17:31:55 +0000
+++ tests/autopilot/ubuntu_html5_ui_toolkit/tests/test_tabs.py 2015-06-04 21:56:07 +0000
@@ -21,11 +21,11 @@
21 def test_programaticTabSelectIndex(self):21 def test_programaticTabSelectIndex(self):
22 self.browse_to_test_html('test-tabs-in-app.html')22 self.browse_to_test_html('test-tabs-in-app.html')
23 self.assertThat(23 self.assertThat(
24 self.eval_expression_in_page_unsafe(24 lambda: self.eval_expression_in_page_unsafe(
25 'var UI = new UbuntuUI(); '25 'var UI = new UbuntuUI(); '
26 'UI.init(); UI.tabs.selectedTabIndex = 1; '26 'UI.init(); UI.tabs.selectedTabIndex = 1; '
27 'return "ok";'),27 'return UI.tabs.selectedTabIndex;'),
28 Equals('ok'))28 Eventually(Equals('1')))
2929
30 self.assertThat(30 self.assertThat(
31 lambda: self.is_dom_node_visible('tab1'),31 lambda: self.is_dom_node_visible('tab1'),
3232
=== modified file 'tests/data/html/apps/rss-reader/app.js'
--- tests/data/html/apps/rss-reader/app.js 2014-01-27 18:42:31 +0000
+++ tests/data/html/apps/rss-reader/app.js 2015-06-04 21:56:07 +0000
@@ -20,10 +20,11 @@
20 * <http://www.gnu.org/licenses/>20 * <http://www.gnu.org/licenses/>
21 */21 */
2222
23var UI = new UbuntuUI();23var UI;
2424
25$(document).ready(function () {25$(document).ready(function () {
2626
27 UI = new UbuntuUI()
27 UI.init();28 UI.init();
28 UI.pagestack.push("main");29 UI.pagestack.push("main");
2930

Subscribers

People subscribed via source and target branches