Merge lp:~timo-jyrinki/ubuntu-html5-theme/autopilot_tests_offline into lp:~ubuntu-html5-theme-devs/ubuntu-html5-theme/ambiance

Proposed by Timo Jyrinki
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 63
Merged at revision: 62
Proposed branch: lp:~timo-jyrinki/ubuntu-html5-theme/autopilot_tests_offline
Merge into: lp:~ubuntu-html5-theme-devs/ubuntu-html5-theme/ambiance
Diff against target: 178 lines (+118/-8)
5 files modified
0.1/examples/apps/rss-reader/autopilot.html (+107/-0)
0.1/examples/apps/rss-reader/index.html (+1/-1)
debian/control (+1/-0)
tests/autopilot/ubuntu_html5_theme/tests/__init__.py (+2/-2)
tests/autopilot/ubuntu_html5_theme/tests/test_rss_reader.py (+7/-5)
To merge this branch: bzr merge lp:~timo-jyrinki/ubuntu-html5-theme/autopilot_tests_offline
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Didier Roche-Tolomelli (community) Approve
Review via email: mp+173439@code.launchpad.net

Commit message

Prepare the autopilot test to work with blocking firewall. Switch to using libjs-jquery instead of fetching from the web. Add autopilot.html without the Google dependency, disable one test for now that would need further contents mockup to work.

Description of the change

Prepare the autopilot test to work with blocking firewall. (LP: #1198820)

Switch to using libjs-jquery instead of fetching from the web. Add autopilot.html without the Google dependency, disable one test for now that would need further contents mockup to work.

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

excellent work! that sounds good to me (and nice for the caching). The opened bug is fine :)

review: Approve
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
=== added file '0.1/examples/apps/rss-reader/autopilot.html'
--- 0.1/examples/apps/rss-reader/autopilot.html 1970-01-01 00:00:00 +0000
+++ 0.1/examples/apps/rss-reader/autopilot.html 2013-07-08 07:59:31 +0000
@@ -0,0 +1,107 @@
1<!--
2 Copyright (C) 2013 Adnane Belmadiaf <daker@ubuntu.com>
3
4 This file is part of ubuntu-html5-theme.
5
6 This package is free software; you can redistribute it and/or modify
7 it under the terms of the Lesser GNU General Public License as
8 published by the Free Software Foundation; either version 3 of the
9 License, or
10 (at your option) any later version.
11
12 This package is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this program. If not, see
19 <http://www.gnu.org/licenses/>.
20-->
21
22<!DOCTYPE html>
23<html>
24<head>
25 <meta charset="utf-8" />
26 <meta name="copyright" content="Adnane Belmadiaf <daker@ubuntu.com>">
27 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
28
29 <title>RSS Mobile Reader - Ubuntu UI Example</title>
30
31 <!-- Ubuntu UI Style imports - Ambiance theme -->
32 <link href="../../../ambiance/css/appTemplate.css" rel="stylesheet" type="text/css" />
33
34 <link href="styles.css" rel="stylesheet" type="text/css" />
35
36 <!-- External javascript imports -->
37 <script src="file:///usr/share/javascript/jquery/jquery.min.js"></script>
38
39 <!-- Ubuntu UI javascript imports - Ambiance theme -->
40 <script src="../../../ambiance/js/fast-buttons.js"></script>
41 <script src="../../../ambiance/js/core.js"></script>
42 <script src="../../../ambiance/js/buttons.js"></script>
43 <script src="../../../ambiance/js/dialogs.js"></script>
44 <script src="../../../ambiance/js/pagestacks.js"></script>
45 <script src="../../../ambiance/js/popovers.js"></script>
46
47 <script src="app.js"></script>
48</head>
49
50<body>
51 <div data-role="page">
52
53 <header data-role="header">
54 <nav data-role="navbar" class="tabs" >
55 <div class="tabs-inner">
56 <ul>
57 <li class="active" role="tab">
58 <a href="#item1" class="tab-item">RSS Mobile Reader</a>
59 </li>
60 </ul>
61 </div>
62 </nav>
63 </header>
64
65 <div data-role="content">
66 <div data-role="pagestack">
67 <div data-role="page" id="main">
68 <section data-role="list" id="yourfeeds"></section>
69 <footer data-role="footer" class="revealed">
70 <nav>
71 <ul>
72 <li>
73 <a href="#" id="addfeed">
74 <img src="../../../ambiance/img/back@18.png" alt="Tap me!" />
75 <span>Add feed</span>
76 </a>
77 </li>
78 </ul>
79 </nav>
80 </footer>
81 </div>
82
83 <div data-role="page" id="results">
84 <section data-role="list" id="resultscontent"></section>
85 </div>
86
87 <div data-role="page" id="article">
88 <section id="articleinfo"></section>
89 </div>
90 </div>
91 <div data-role="dialog" id="addfeeddialog">
92 <section>
93 <h1>Add a new feed</h1>
94 <p>Type the url feed you want to add</p>
95 <input type="url" id="rssFeed" placeholder="http://">
96 <menu>
97 <button data-role="button" id="no">Cancel</button>
98 <button data-role="button" class="success" id="yes">Add</button>
99 </menu>
100 </section>
101 </div>
102 <div data-role="dialog" id="loading"><section><progress></progress></section></div>
103 </div>
104
105 </div>
106</body>
107</html>
0108
=== modified file '0.1/examples/apps/rss-reader/index.html'
--- 0.1/examples/apps/rss-reader/index.html 2013-07-03 15:29:36 +0000
+++ 0.1/examples/apps/rss-reader/index.html 2013-07-08 07:59:31 +0000
@@ -35,7 +35,7 @@
3535
36 <!-- External javascript imports -->36 <!-- External javascript imports -->
37 <script type="text/javascript" src="https://www.google.com/jsapi?key=ABQIAAAAuvAXPRXL9qkzO0R8vzYpOhQ_BAnb8hQeSCQ2aBH79hHa1YbW_RQNN9ClKXG21xQObiXJ7diAAYaywg"></script>37 <script type="text/javascript" src="https://www.google.com/jsapi?key=ABQIAAAAuvAXPRXL9qkzO0R8vzYpOhQ_BAnb8hQeSCQ2aBH79hHa1YbW_RQNN9ClKXG21xQObiXJ7diAAYaywg"></script>
38 <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>38 <script src="file:///usr/share/javascript/jquery/jquery.min.js"></script>
3939
40 <!-- Ubuntu UI javascript imports - Ambiance theme -->40 <!-- Ubuntu UI javascript imports - Ambiance theme -->
41 <script src="../../../ambiance/js/fast-buttons.js"></script>41 <script src="../../../ambiance/js/fast-buttons.js"></script>
4242
=== modified file 'debian/control'
--- debian/control 2013-07-08 06:39:09 +0000
+++ debian/control 2013-07-08 07:59:31 +0000
@@ -33,6 +33,7 @@
33 ${python:Depends},33 ${python:Depends},
34 dpkg-dev,34 dpkg-dev,
35 libautopilot-qt,35 libautopilot-qt,
36 libjs-jquery,
36 libqt5test5,37 libqt5test5,
37 libqt5webkit5-qmlwebkitplugin,38 libqt5webkit5-qmlwebkitplugin,
38 qmlscene,39 qmlscene,
3940
=== modified file 'tests/autopilot/ubuntu_html5_theme/tests/__init__.py'
--- tests/autopilot/ubuntu_html5_theme/tests/__init__.py 2013-07-07 16:13:52 +0000
+++ tests/autopilot/ubuntu_html5_theme/tests/__init__.py 2013-07-08 07:59:31 +0000
@@ -28,7 +28,7 @@
2828
29 def get_served_filename(self, appname, filename):29 def get_served_filename(self, appname, filename):
30 if len(filename) == 0 or filename == '/':30 if len(filename) == 0 or filename == '/':
31 filename = 'index.html'31 filename = 'autopilot.html'
32 print os.path.join(self.BASE_PATH_FOR_SERVED_APPS[appname], filename)32 print os.path.join(self.BASE_PATH_FOR_SERVED_APPS[appname], filename)
33 return os.path.join(self.BASE_PATH_FOR_SERVED_APPS[appname], filename)33 return os.path.join(self.BASE_PATH_FOR_SERVED_APPS[appname], filename)
3434
@@ -179,7 +179,7 @@
179 self.assert_url_eventually_loaded(url);179 self.assert_url_eventually_loaded(url);
180180
181 def browse_to_app(self, appname):181 def browse_to_app(self, appname):
182 self.browse_to_url(self.create_file_url_from(self.BASE_PATH + '/' + self.APPS_SUBFOLDER_NAME + '/' + appname + '/index.html'))182 self.browse_to_url(self.create_file_url_from(self.BASE_PATH + '/' + self.APPS_SUBFOLDER_NAME + '/' + appname + '/autopilot.html'))
183183
184 def browse_to_test_html(self, html_filename):184 def browse_to_test_html(self, html_filename):
185 self.browse_to_url(self.create_file_url_from(os.path.abspath(self.BASE_PATH + '/../../tests/data/html/' + html_filename)))185 self.browse_to_url(self.create_file_url_from(os.path.abspath(self.BASE_PATH + '/../../tests/data/html/' + html_filename)))
186186
=== modified file 'tests/autopilot/ubuntu_html5_theme/tests/test_rss_reader.py'
--- tests/autopilot/ubuntu_html5_theme/tests/test_rss_reader.py 2013-07-03 13:57:41 +0000
+++ tests/autopilot/ubuntu_html5_theme/tests/test_rss_reader.py 2013-07-08 07:59:31 +0000
@@ -27,11 +27,13 @@
27 self.assertThat(self.is_dom_node_visible('article'), Equals(False))27 self.assertThat(self.is_dom_node_visible('article'), Equals(False))
28 self.assertThat(self.is_dom_node_visible('results'), Equals(False))28 self.assertThat(self.is_dom_node_visible('results'), Equals(False))
2929
30 def test_switchToFeedView(self):30# Needs further mockup for autopilot.html to work offline
31 self.click_any_dom_node_by_selector('#yourfeeds li a')31# LP: https://bugs.launchpad.net/ubuntu-html5-theme/+bug/1198820
32 self.assertThat(lambda: self.is_dom_node_visible('main'), Eventually(Equals(False)))32# def test_switchToFeedView(self):
33 self.assertThat(self.is_dom_node_visible('article'), Equals(False))33# self.click_any_dom_node_by_selector('#yourfeeds li a')
34 self.assertThat(self.is_dom_node_visible('results'), Equals(True))34# self.assertThat(lambda: self.is_dom_node_visible('main'), Eventually(Equals(False)))
35# self.assertThat(self.is_dom_node_visible('article'), Equals(False))
36# self.assertThat(self.is_dom_node_visible('results'), Equals(True))
3537
3638
3739

Subscribers

People subscribed via source and target branches