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
1=== modified file '0.1/ambiance/js/tabs.js'
2--- 0.1/ambiance/js/tabs.js 2015-05-19 17:31:55 +0000
3+++ 0.1/ambiance/js/tabs.js 2015-06-04 21:56:07 +0000
4@@ -189,8 +189,8 @@
5 this._tabtitle.appendChild(tabtitle_value);
6
7 var tab = this._tabs.querySelector('[data-role="tabitem"]:first-child');
8- /*tab.classList.remove('inactive');
9- tab.classList.add('active');*/
10+ tab.classList.remove('inactive');
11+ tab.classList.add('active');
12
13 this._header.innerHTML = '';
14 this._header.appendChild(backbtn);
15@@ -229,11 +229,7 @@
16 /**
17 * @private
18 */
19- __updateActiveTab: function (newActiveTab) {
20- //oldActiveTab.classList.remove('inactive');
21- //oldActiveTab.classList.remove('active');
22- //newActiveTab.classList.remove('inactive');
23- //newActiveTab.classList.add('active');
24+ __updateActiveTabContent: function (newActiveTab) {
25 this._tabtitle.textContent = newActiveTab.innerHTML;
26 },
27
28@@ -260,16 +256,10 @@
29 if (tabElement.getAttribute("data-role") !== 'tabitem')
30 return;
31
32- this.__updateActiveTab(tabElement);
33-
34- /*activeTab = this._tabs.querySelector('[data-role="tabitem"].active');
35- [].forEach.call(this._tabs.querySelectorAll('[data-role="tabitem"]:not(.active)'), function (e) {
36- e.classList.remove('inactive');
37- });*/
38+ this.__updateActiveTabContent(tabElement);
39
40 var targetPageId = tabElement.getAttribute('data-page');
41-
42- //this.__activate(targetPageId);
43+ this.__activate(targetPageId);
44
45 this.__dispatchTabChangedEvent(targetPageId);
46 if (this._firstrun) {
47
48=== modified file 'debian/control'
49--- debian/control 2015-04-30 17:30:05 +0000
50+++ debian/control 2015-06-04 21:56:07 +0000
51@@ -12,6 +12,7 @@
52 qtbase5-dev (>= 5.4),
53 qtdeclarative5-dev,
54 qtdeclarative5-qtquick2-plugin,
55+ qml-module-qttest | qtdeclarative5-test-plugin,
56 qtdeclarative5-ubuntu-ui-toolkit-plugin,
57 Standards-Version: 3.9.5
58 # if you don't have have commit access to this branch but would like to upload
59@@ -67,6 +68,7 @@
60 python3-autopilot,
61 qmlscene,
62 qtdeclarative5-qtquick2-plugin,
63+ qml-module-qttest | qtdeclarative5-test-plugin,
64 ubuntu-html5-ui-toolkit (= ${binary:Version}),
65 ubuntu-html5-ui-toolkit-examples (= ${binary:Version}),
66 ${misc:Depends},
67
68=== modified file 'examples/html5-theme/apps/rss-reader/app.js'
69--- examples/html5-theme/apps/rss-reader/app.js 2014-07-07 00:42:25 +0000
70+++ examples/html5-theme/apps/rss-reader/app.js 2015-06-04 21:56:07 +0000
71@@ -19,7 +19,7 @@
72 * License along with this program. If not, see
73 * <http://www.gnu.org/licenses/>
74 */
75-var UI = new UbuntuUI();
76+var UI;
77
78 document.addEventListener('deviceready', function () {
79 console.log('device ready');
80@@ -27,6 +27,7 @@
81
82 $(document).ready(function () {
83
84+ UI = new UbuntuUI()
85 UI.init();
86 UI.pagestack.push("main");
87
88@@ -142,4 +143,4 @@
89
90 }
91
92-google.load("feeds", "1");
93\ No newline at end of file
94+google.load("feeds", "1");
95
96=== modified file 'tests/autopilot/ubuntu_html5_ui_toolkit/tests/test_tabs.py'
97--- tests/autopilot/ubuntu_html5_ui_toolkit/tests/test_tabs.py 2015-05-19 17:31:55 +0000
98+++ tests/autopilot/ubuntu_html5_ui_toolkit/tests/test_tabs.py 2015-06-04 21:56:07 +0000
99@@ -21,11 +21,11 @@
100 def test_programaticTabSelectIndex(self):
101 self.browse_to_test_html('test-tabs-in-app.html')
102 self.assertThat(
103- self.eval_expression_in_page_unsafe(
104+ lambda: self.eval_expression_in_page_unsafe(
105 'var UI = new UbuntuUI(); '
106 'UI.init(); UI.tabs.selectedTabIndex = 1; '
107- 'return "ok";'),
108- Equals('ok'))
109+ 'return UI.tabs.selectedTabIndex;'),
110+ Eventually(Equals('1')))
111
112 self.assertThat(
113 lambda: self.is_dom_node_visible('tab1'),
114
115=== modified file 'tests/data/html/apps/rss-reader/app.js'
116--- tests/data/html/apps/rss-reader/app.js 2014-01-27 18:42:31 +0000
117+++ tests/data/html/apps/rss-reader/app.js 2015-06-04 21:56:07 +0000
118@@ -20,10 +20,11 @@
119 * <http://www.gnu.org/licenses/>
120 */
121
122-var UI = new UbuntuUI();
123+var UI;
124
125 $(document).ready(function () {
126
127+ UI = new UbuntuUI()
128 UI.init();
129 UI.pagestack.push("main");
130

Subscribers

People subscribed via source and target branches