Merge lp:~martin-borho/ubuntu-weather-app/sdk_emulator into lp:ubuntu-weather-app/obsolete.trunk
- sdk_emulator
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Nicholas Skaggs | ||||
Approved revision: | 90 | ||||
Merged at revision: | 85 | ||||
Proposed branch: | lp:~martin-borho/ubuntu-weather-app/sdk_emulator | ||||
Merge into: | lp:ubuntu-weather-app/obsolete.trunk | ||||
Diff against target: |
602 lines (+98/-225) 9 files modified
debian/control (+1/-0) tests/autopilot/ubuntu_weather_app/emulators.py (+40/-0) tests/autopilot/ubuntu_weather_app/emulators/__init__.py (+0/-17) tests/autopilot/ubuntu_weather_app/emulators/ubuntusdk.py (+0/-157) tests/autopilot/ubuntu_weather_app/tests/__init__.py (+15/-7) tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py (+21/-28) tests/autopilot/ubuntu_weather_app/tests/test_mainview.py (+5/-3) tests/autopilot/ubuntu_weather_app/tests/test_settings.py (+13/-9) tests/autopilot/ubuntu_weather_app/tests/weatherdata.py (+3/-4) |
||||
To merge this branch: | bzr merge lp:~martin-borho/ubuntu-weather-app/sdk_emulator | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nicholas Skaggs (community) | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+178832@code.launchpad.net |
Commit message
integrated toolkit emulator from SDK, updated test data
Description of the change
- Integrated toolkit emulator from SDK
- Updated test data with new internal format version
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
Nicholas Skaggs (nskaggs) wrote : | # |
Well, I'm getting some failures off the cuff on my box, going to try on the device if I can.
- 89. By Martin Borho
-
added more assertions to improve test stability
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:89
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 90. By Martin Borho
-
cleaned some test code, removed obsolete test
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:90
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Nicholas Skaggs (nskaggs) wrote : | # |
Excellent Martin. Thanks for adding the extra asserts and cleanup!
Preview Diff
1 | === modified file 'debian/control' | |||
2 | --- debian/control 2013-05-14 20:38:57 +0000 | |||
3 | +++ debian/control 2013-08-07 17:39:25 +0000 | |||
4 | @@ -26,5 +26,6 @@ | |||
5 | 26 | libautopilot-qt, | 26 | libautopilot-qt, |
6 | 27 | libqt5test5, | 27 | libqt5test5, |
7 | 28 | libqt5widgets5, | 28 | libqt5widgets5, |
8 | 29 | ubuntu-ui-toolkit-autopilot, | ||
9 | 29 | Description: Test package for the weather app | 30 | Description: Test package for the weather app |
10 | 30 | Autopilot tests for the weather app package | 31 | Autopilot tests for the weather app package |
11 | 31 | 32 | ||
12 | === removed directory 'tests/autopilot/ubuntu_weather_app/emulators' | |||
13 | === added file 'tests/autopilot/ubuntu_weather_app/emulators.py' | |||
14 | --- tests/autopilot/ubuntu_weather_app/emulators.py 1970-01-01 00:00:00 +0000 | |||
15 | +++ tests/autopilot/ubuntu_weather_app/emulators.py 2013-08-07 17:39:25 +0000 | |||
16 | @@ -0,0 +1,40 @@ | |||
17 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
18 | 2 | # Copyright 2013 Canonical | ||
19 | 3 | # | ||
20 | 4 | # This program is free software: you can redistribute it and/or modify it | ||
21 | 5 | # under the terms of the GNU General Public License version 3, as published | ||
22 | 6 | # by the Free Software Foundation. | ||
23 | 7 | # | ||
24 | 8 | # Authored by: Martin Borho <martin@borho.net> | ||
25 | 9 | |||
26 | 10 | """weather app autopilot tests and emulators - top level package.""" | ||
27 | 11 | |||
28 | 12 | from ubuntuuitoolkit import emulators as toolkit_emulators | ||
29 | 13 | |||
30 | 14 | |||
31 | 15 | class MainView(toolkit_emulators.MainView): | ||
32 | 16 | |||
33 | 17 | def get_object(self, typeName, name): | ||
34 | 18 | """Get a specific object""" | ||
35 | 19 | return self.select_single(typeName, objectName=name) | ||
36 | 20 | |||
37 | 21 | def get_objects(self, typeName, name): | ||
38 | 22 | """Get more than one object""" | ||
39 | 23 | return self.select_many(typeName, objectName=name) | ||
40 | 24 | |||
41 | 25 | def get_tabs(self): | ||
42 | 26 | """Return the LocationTabs emulator of the MainView.""" | ||
43 | 27 | tabs = self.select_single(Tabs) | ||
44 | 28 | assert tabs is not None, toolkit_emulators._NO_TABS_ERROR | ||
45 | 29 | return tabs | ||
46 | 30 | |||
47 | 31 | class Tabs(toolkit_emulators.UbuntuUIToolkitEmulatorBase): | ||
48 | 32 | """LocationTabs Autopilot emulator.""" | ||
49 | 33 | |||
50 | 34 | def get_current_tab(self): | ||
51 | 35 | """Return the currently selected tab.""" | ||
52 | 36 | return self.select_many('LocationTab')[self.selectedTabIndex] | ||
53 | 37 | |||
54 | 38 | def get_number_of_tabs(self): | ||
55 | 39 | """Return the number of tabs.""" | ||
56 | 40 | return len(self.select_many('LocationTab')) | ||
57 | 0 | 41 | ||
58 | === removed file 'tests/autopilot/ubuntu_weather_app/emulators/__init__.py' | |||
59 | --- tests/autopilot/ubuntu_weather_app/emulators/__init__.py 2013-06-20 16:10:06 +0000 | |||
60 | +++ tests/autopilot/ubuntu_weather_app/emulators/__init__.py 1970-01-01 00:00:00 +0000 | |||
61 | @@ -1,17 +0,0 @@ | |||
62 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
63 | 2 | # | ||
64 | 3 | # Copyright (C) 2013 Canonical Ltd | ||
65 | 4 | # | ||
66 | 5 | # This program is free software: you can redistribute it and/or modify | ||
67 | 6 | # it under the terms of the GNU General Public License version 3 as | ||
68 | 7 | # published by the Free Software Foundation. | ||
69 | 8 | # | ||
70 | 9 | # This program is distributed in the hope that it will be useful, | ||
71 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
72 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
73 | 12 | # GNU General Public License for more details. | ||
74 | 13 | # | ||
75 | 14 | # You should have received a copy of the GNU General Public License | ||
76 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
77 | 16 | # | ||
78 | 17 | # Authored by: Nicholas Skaggs <nicholas.skaggs@canonical.com> | ||
79 | 18 | 0 | ||
80 | === removed file 'tests/autopilot/ubuntu_weather_app/emulators/ubuntusdk.py' | |||
81 | --- tests/autopilot/ubuntu_weather_app/emulators/ubuntusdk.py 2013-07-11 22:04:11 +0000 | |||
82 | +++ tests/autopilot/ubuntu_weather_app/emulators/ubuntusdk.py 1970-01-01 00:00:00 +0000 | |||
83 | @@ -1,157 +0,0 @@ | |||
84 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
85 | 2 | # | ||
86 | 3 | # Copyright (C) 2013 Canonical Ltd | ||
87 | 4 | # | ||
88 | 5 | # This program is free software: you can redistribute it and/or modify | ||
89 | 6 | # it under the terms of the GNU General Public License version 3 as | ||
90 | 7 | # published by the Free Software Foundation. | ||
91 | 8 | # | ||
92 | 9 | # This program is distributed in the hope that it will be useful, | ||
93 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
94 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
95 | 12 | # GNU General Public License for more details. | ||
96 | 13 | # | ||
97 | 14 | # You should have received a copy of the GNU General Public License | ||
98 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
99 | 16 | # | ||
100 | 17 | # Authored by: Nicholas Skaggs <nicholas.skaggs@canonical.com> | ||
101 | 18 | |||
102 | 19 | from testtools.matchers import Equals, NotEquals, Not, Is | ||
103 | 20 | from autopilot.matchers import Eventually | ||
104 | 21 | |||
105 | 22 | class ubuntusdk(object): | ||
106 | 23 | """An emulator class that makes it easy to interact with the ubuntu sdk applications.""" | ||
107 | 24 | |||
108 | 25 | def __init__(self, autopilot, app): | ||
109 | 26 | self.app = app | ||
110 | 27 | self.autopilot = autopilot | ||
111 | 28 | |||
112 | 29 | def get_qml_view(self): | ||
113 | 30 | """Get the main QML view""" | ||
114 | 31 | return self.app.select_single("QQuickView") | ||
115 | 32 | |||
116 | 33 | def get_object(self, typeName, name): | ||
117 | 34 | """Get a specific object""" | ||
118 | 35 | return self.app.select_single(typeName, objectName=name) | ||
119 | 36 | |||
120 | 37 | def get_objects(self, typeName, name): | ||
121 | 38 | """Get more than one object""" | ||
122 | 39 | return self.app.select_many(typeName, objectName=name) | ||
123 | 40 | |||
124 | 41 | def get_tabs(self): | ||
125 | 42 | """Return all tabs""" | ||
126 | 43 | return self.app.select_single("Tabs") | ||
127 | 44 | |||
128 | 45 | def switch_to_tab(self, tab): | ||
129 | 46 | """Switch to the specified tab number""" | ||
130 | 47 | tabs = self.get_tabs() | ||
131 | 48 | currentTab = tabs.selectedTabIndex | ||
132 | 49 | |||
133 | 50 | #perform operations until tab == currentTab | ||
134 | 51 | while tab != currentTab: | ||
135 | 52 | if tab > currentTab: | ||
136 | 53 | self._next_tab() | ||
137 | 54 | if tab < currentTab: | ||
138 | 55 | self._previous_tab() | ||
139 | 56 | currentTab = tabs.selectedTabIndex | ||
140 | 57 | |||
141 | 58 | def _previous_tab(self): | ||
142 | 59 | """Switch to the previous tab""" | ||
143 | 60 | qmlView = self.get_qml_view() | ||
144 | 61 | |||
145 | 62 | startX = int(qmlView.x + qmlView.width * 0.10) | ||
146 | 63 | stopX = int(qmlView.x + qmlView.width * 0.45) | ||
147 | 64 | lineY = int(qmlView.y + qmlView.height * 0.05) | ||
148 | 65 | |||
149 | 66 | self.autopilot.pointing_device.drag(startX, lineY, stopX, lineY) | ||
150 | 67 | self.autopilot.pointing_device.move(startX, lineY) | ||
151 | 68 | self.autopilot.pointing_device.click() | ||
152 | 69 | self.autopilot.pointing_device.click() | ||
153 | 70 | |||
154 | 71 | def _next_tab(self): | ||
155 | 72 | """Switch to the next tab""" | ||
156 | 73 | qmlView = self.get_qml_view() | ||
157 | 74 | |||
158 | 75 | startX = int(qmlView.x + qmlView.width * 0.45) | ||
159 | 76 | stopX = int(qmlView.x + qmlView.width * 0.10) | ||
160 | 77 | lineY = int(qmlView.y + qmlView.height * 0.05) | ||
161 | 78 | |||
162 | 79 | self.autopilot.pointing_device.drag(startX, lineY, stopX, lineY) | ||
163 | 80 | self.autopilot.pointing_device.move(startX, lineY) | ||
164 | 81 | self.autopilot.pointing_device.click() | ||
165 | 82 | self.autopilot.pointing_device.click() | ||
166 | 83 | |||
167 | 84 | def toggle_toolbar(self): | ||
168 | 85 | """Toggle the toolbar between revealed and hidden""" | ||
169 | 86 | #check and see if the toolbar is open or not | ||
170 | 87 | if self.get_toolbar().opened: | ||
171 | 88 | self.hide_toolbar() | ||
172 | 89 | else: | ||
173 | 90 | self.open_toolbar() | ||
174 | 91 | |||
175 | 92 | def get_toolbar(self): | ||
176 | 93 | """Returns the toolbar in the main events view.""" | ||
177 | 94 | return self.app.select_single("Toolbar") | ||
178 | 95 | |||
179 | 96 | def get_toolbar_button(self, buttonObject): | ||
180 | 97 | """Returns the toolbar button with objectName buttonObject""" | ||
181 | 98 | toolbar = self.get_toolbar() | ||
182 | 99 | if not toolbar.opened: | ||
183 | 100 | self.open_toolbar() | ||
184 | 101 | buttonList = toolbar.select_many("ActionItem") | ||
185 | 102 | #old version is ToolbarButton | ||
186 | 103 | if not buttonList: | ||
187 | 104 | buttonList = toolbar.select_many("ToolbarButton") | ||
188 | 105 | for button in buttonList: | ||
189 | 106 | if button.objectName == buttonObject: | ||
190 | 107 | return button | ||
191 | 108 | |||
192 | 109 | def click_toolbar_button(self, buttonObject): | ||
193 | 110 | """Clicks the toolbar button with objectName buttonObject""" | ||
194 | 111 | #The toolbar button is assumed to be the following format | ||
195 | 112 | #Toolbar { | ||
196 | 113 | # ... | ||
197 | 114 | # ActionItem { | ||
198 | 115 | # objectName: "name" | ||
199 | 116 | button = self.get_toolbar_button(buttonObject) | ||
200 | 117 | self.autopilot.pointing_device.click_object(button) | ||
201 | 118 | return button | ||
202 | 119 | |||
203 | 120 | def open_toolbar(self): | ||
204 | 121 | """Open the toolbar""" | ||
205 | 122 | qmlView = self.get_qml_view() | ||
206 | 123 | |||
207 | 124 | lineX = int(qmlView.x + qmlView.width * 0.50) | ||
208 | 125 | startY = int(qmlView.y + qmlView.height - 1) | ||
209 | 126 | stopY = int(qmlView.y + qmlView.height * 0.95) | ||
210 | 127 | |||
211 | 128 | self.autopilot.pointing_device.drag(lineX, startY, lineX, stopY) | ||
212 | 129 | |||
213 | 130 | def hide_toolbar(self): | ||
214 | 131 | """Hide the toolbar""" | ||
215 | 132 | qmlView = self.get_qml_view() | ||
216 | 133 | |||
217 | 134 | lineX = int(qmlView.x + qmlView.width * 0.50) | ||
218 | 135 | startY = int(qmlView.y + qmlView.height * 0.95) | ||
219 | 136 | stopY = int(qmlView.y + qmlView.height - 1) | ||
220 | 137 | |||
221 | 138 | self.autopilot.pointing_device.drag(lineX, startY, lineX, stopY) | ||
222 | 139 | |||
223 | 140 | def set_popup_value(self, popover, button, value): | ||
224 | 141 | """Changes the given popover selector to the request value | ||
225 | 142 | At the moment this only works for values that are currently visible. To | ||
226 | 143 | access the remaining items, a help method to drag and recheck is needed.""" | ||
227 | 144 | #The popover is assumed to be the following format | ||
228 | 145 | #Component { | ||
229 | 146 | # id: actionSelectionPopover | ||
230 | 147 | # | ||
231 | 148 | #ActionSelectionPopover { | ||
232 | 149 | # actions: ActionList { | ||
233 | 150 | # Action { | ||
234 | 151 | |||
235 | 152 | popList = self.get_object("ActionSelectionPopover", popover) | ||
236 | 153 | itemList = popList.select_many("Label") | ||
237 | 154 | for item in itemList: | ||
238 | 155 | if item.text == value: | ||
239 | 156 | self.autopilot.pointing_device.click_object(item) | ||
240 | 157 | return item | ||
241 | 158 | 0 | ||
242 | === modified file 'tests/autopilot/ubuntu_weather_app/tests/__init__.py' | |||
243 | --- tests/autopilot/ubuntu_weather_app/tests/__init__.py 2013-07-19 11:39:31 +0000 | |||
244 | +++ tests/autopilot/ubuntu_weather_app/tests/__init__.py 2013-08-07 17:39:25 +0000 | |||
245 | @@ -4,6 +4,8 @@ | |||
246 | 4 | # This program is free software: you can redistribute it and/or modify it | 4 | # This program is free software: you can redistribute it and/or modify it |
247 | 5 | # under the terms of the GNU General Public License version 3, as published | 5 | # under the terms of the GNU General Public License version 3, as published |
248 | 6 | # by the Free Software Foundation. | 6 | # by the Free Software Foundation. |
249 | 7 | # | ||
250 | 8 | # Authored by: Martin Borho <martin@borho.net> | ||
251 | 7 | 9 | ||
252 | 8 | """weather-app autopilot tests.""" | 10 | """weather-app autopilot tests.""" |
253 | 9 | 11 | ||
254 | @@ -16,7 +18,8 @@ | |||
255 | 16 | from autopilot.platform import model | 18 | from autopilot.platform import model |
256 | 17 | from autopilot.testcase import AutopilotTestCase | 19 | from autopilot.testcase import AutopilotTestCase |
257 | 18 | 20 | ||
259 | 19 | from ubuntu_weather_app.emulators.ubuntusdk import ubuntusdk | 21 | from ubuntuuitoolkit import emulators as toolkit_emulators |
260 | 22 | from ubuntu_weather_app.emulators import MainView | ||
261 | 20 | 23 | ||
262 | 21 | class WeatherTestCase(AutopilotTestCase): | 24 | class WeatherTestCase(AutopilotTestCase): |
263 | 22 | 25 | ||
264 | @@ -51,18 +54,20 @@ | |||
265 | 51 | self.app = self.launch_test_application( | 54 | self.app = self.launch_test_application( |
266 | 52 | self.qmlscene(), | 55 | self.qmlscene(), |
267 | 53 | self.local_location, | 56 | self.local_location, |
269 | 54 | app_type='qt') | 57 | app_type='qt', |
270 | 58 | emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase) | ||
271 | 55 | 59 | ||
272 | 56 | def launch_test_installed(self): | 60 | def launch_test_installed(self): |
273 | 57 | self.app = self.launch_test_application( | 61 | self.app = self.launch_test_application( |
274 | 58 | self.qmlscene(), | 62 | self.qmlscene(), |
275 | 59 | "/usr/share/ubuntu-weather-app/ubuntu-weather-app.qml", | 63 | "/usr/share/ubuntu-weather-app/ubuntu-weather-app.qml", |
276 | 60 | "--desktop_file_hint=/usr/share/applications/ubuntu-weather-app.desktop", | 64 | "--desktop_file_hint=/usr/share/applications/ubuntu-weather-app.desktop", |
278 | 61 | app_type='qt') | 65 | app_type='qt', |
279 | 66 | emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase) | ||
280 | 62 | 67 | ||
281 | 63 | def launch_and_quit_app(self): | 68 | def launch_and_quit_app(self): |
282 | 64 | self.launch_app() | 69 | self.launch_app() |
284 | 65 | self.main_window.get_qml_view().visible.wait_for(True) | 70 | self.get_qml_view().visible.wait_for(True) |
285 | 66 | 71 | ||
286 | 67 | # When calling launch_app an instance of the spawned process | 72 | # When calling launch_app an instance of the spawned process |
287 | 68 | # control object will be stored in self.app.process, and a cleanup | 73 | # control object will be stored in self.app.process, and a cleanup |
288 | @@ -72,19 +77,22 @@ | |||
289 | 72 | # the process during regular test setup. | 77 | # the process during regular test setup. |
290 | 73 | self.doCleanups() | 78 | self.doCleanups() |
291 | 74 | 79 | ||
292 | 80 | def get_qml_view(self): | ||
293 | 81 | return self.app.select_single("QQuickView") | ||
294 | 82 | |||
295 | 75 | @property | 83 | @property |
296 | 76 | def main_window(self): | 84 | def main_window(self): |
298 | 77 | return ubuntusdk(self, self.app)#MainWindow(self, self.app) | 85 | return self.app.select_single(MainView) |
299 | 78 | 86 | ||
300 | 79 | class SheetMixin(object): | 87 | class SheetMixin(object): |
301 | 80 | """A mixin to to give access to common sheet elements""" | 88 | """A mixin to to give access to common sheet elements""" |
302 | 81 | def _click_sheet_confirm(self): | 89 | def _click_sheet_confirm(self): |
303 | 82 | """Clicks the confirm button""" | 90 | """Clicks the confirm button""" |
305 | 83 | self.pointing_device.click_object(self.main_window.app.select_many('Button')[1]) | 91 | self.pointing_device.click_object(self.main_window.select_many('Button')[1]) |
306 | 84 | 92 | ||
307 | 85 | def _click_sheet_cancel(self): | 93 | def _click_sheet_cancel(self): |
308 | 86 | """Clicks the cancel button""" | 94 | """Clicks the cancel button""" |
310 | 87 | self.pointing_device.click_object(self.main_window.app.select_many('Button')[0]) | 95 | self.pointing_device.click_object(self.main_window.select_many('Button')[0]) |
311 | 88 | 96 | ||
312 | 89 | class DatabaseMixin(object): | 97 | class DatabaseMixin(object): |
313 | 90 | 98 | ||
314 | 91 | 99 | ||
315 | === modified file 'tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py' | |||
316 | --- tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py 2013-08-04 02:26:07 +0000 | |||
317 | +++ tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py 2013-08-07 17:39:25 +0000 | |||
318 | @@ -23,13 +23,14 @@ | |||
319 | 23 | self.clean_db() | 23 | self.clean_db() |
320 | 24 | super(TestLocationManager, self).setUp() | 24 | super(TestLocationManager, self).setUp() |
321 | 25 | self.assertThat( | 25 | self.assertThat( |
323 | 26 | self.main_window.get_qml_view().visible, Eventually(Equals(True))) | 26 | self.get_qml_view().visible, Eventually(Equals(True))) |
324 | 27 | 27 | ||
325 | 28 | def _open_add_location_page(self): | 28 | def _open_add_location_page(self): |
326 | 29 | """Opens the AddLocationPage""" | 29 | """Opens the AddLocationPage""" |
327 | 30 | # click on listitem to open AddLocationPage | 30 | # click on listitem to open AddLocationPage |
328 | 31 | locationList = self.main_window.get_object('QQuickListView', 'LocationList') | 31 | locationList = self.main_window.get_object('QQuickListView', 'LocationList') |
329 | 32 | addCityItem = locationList.get_children()[0] | 32 | addCityItem = locationList.get_children()[0] |
330 | 33 | self.assertThat(lambda: addCityItem, Eventually(NotEquals(None))) | ||
331 | 33 | self.pointing_device.move_to_object(addCityItem) | 34 | self.pointing_device.move_to_object(addCityItem) |
332 | 34 | self.pointing_device.click() | 35 | self.pointing_device.click() |
333 | 35 | 36 | ||
334 | @@ -54,8 +55,9 @@ | |||
335 | 54 | 55 | ||
336 | 55 | # insert city name to search for | 56 | # insert city name to search for |
337 | 56 | searchField = self.main_window.get_object("TextField", "SearchField") | 57 | searchField = self.main_window.get_object("TextField", "SearchField") |
340 | 57 | self.pointing_device.move_to_object(searchField) | 58 | self.assertThat(lambda: searchField, Eventually(NotEquals(None))) |
341 | 58 | self.pointing_device.click() | 59 | self.pointing_device.click_object(searchField) |
342 | 60 | self.assertThat(searchField.focus, Eventually(Equals(True))) | ||
343 | 59 | self.keyboard.type("London") | 61 | self.keyboard.type("London") |
344 | 60 | self.assertThat(searchField.text, Eventually(Equals("London"))) | 62 | self.assertThat(searchField.text, Eventually(Equals("London"))) |
345 | 61 | self.keyboard.press_and_release('Enter') | 63 | self.keyboard.press_and_release('Enter') |
346 | @@ -63,14 +65,16 @@ | |||
347 | 63 | # wait for results and click on the first item | 65 | # wait for results and click on the first item |
348 | 64 | resultsList = self.main_window.get_object('QQuickListView', 'SearchResultList') | 66 | resultsList = self.main_window.get_object('QQuickListView', 'SearchResultList') |
349 | 65 | self.assertThat(resultsList.visible, Eventually(Equals(True), timeout=30)) | 67 | self.assertThat(resultsList.visible, Eventually(Equals(True), timeout=30)) |
351 | 66 | firstResult = resultsList.get_children()[0].get_children()[0] | 68 | firstResult = self.main_window.get_object('Standard', 'searchResult0') |
352 | 69 | self.assertThat(lambda: firstResult, Eventually(NotEquals(None))) | ||
353 | 67 | self.pointing_device.move_to_object(firstResult) | 70 | self.pointing_device.move_to_object(firstResult) |
354 | 68 | self.pointing_device.click() | 71 | self.pointing_device.click() |
355 | 69 | 72 | ||
356 | 70 | # LocationManagerPage should be visible and "London" added | 73 | # LocationManagerPage should be visible and "London" added |
357 | 71 | locationList = self.main_window.get_object('QQuickListView', 'LocationList') | 74 | locationList = self.main_window.get_object('QQuickListView', 'LocationList') |
360 | 72 | addedItem = locationList.get_children()[0] | 75 | addedItem = self.main_window.get_object('Standard', "existingLocation0") |
361 | 73 | self.assertThat(addedItem.get_children()[1].text, Eventually(Equals("London"))) | 76 | self.assertThat(lambda: addedItem, Eventually(NotEquals(None))) |
362 | 77 | self.assertThat(addedItem.text, Eventually(Equals("London"))) | ||
363 | 74 | self._click_sheet_confirm() | 78 | self._click_sheet_confirm() |
364 | 75 | 79 | ||
365 | 76 | # back to locations, wait till data is loaded | 80 | # back to locations, wait till data is loaded |
366 | @@ -83,18 +87,15 @@ | |||
367 | 83 | tabObjects = self.main_window.get_objects('LocationTab','LocationTab') | 87 | tabObjects = self.main_window.get_objects('LocationTab','LocationTab') |
368 | 84 | self.assertEqual(1, len(tabObjects)) | 88 | self.assertEqual(1, len(tabObjects)) |
369 | 85 | 89 | ||
370 | 86 | def test_toolbar_hidden_when_no_location_is_defined(self): | ||
371 | 87 | """Toolbar is not visible when there's no location is defined""" | ||
372 | 88 | toolbar = self.main_window.get_toolbar() | ||
373 | 89 | self.assertThat(toolbar.opened, Eventually(Equals(False))) | ||
374 | 90 | |||
375 | 91 | def test_search_city(self): | 90 | def test_search_city(self): |
376 | 92 | """Search for cities""" | 91 | """Search for cities""" |
377 | 93 | self._open_add_location_page() | 92 | self._open_add_location_page() |
378 | 94 | 93 | ||
379 | 95 | # insert city name to search for | 94 | # insert city name to search for |
380 | 96 | searchField = self.main_window.get_object("TextField", "SearchField") | 95 | searchField = self.main_window.get_object("TextField", "SearchField") |
381 | 96 | self.assertThat(lambda: searchField, Eventually(NotEquals(None))) | ||
382 | 97 | self.pointing_device.click_object(searchField) | 97 | self.pointing_device.click_object(searchField) |
383 | 98 | self.assertThat(searchField.focus, Eventually(Equals(True))) | ||
384 | 98 | self.keyboard.type("London") | 99 | self.keyboard.type("London") |
385 | 99 | self.assertThat(searchField.text, Eventually(Equals("London"))) | 100 | self.assertThat(searchField.text, Eventually(Equals("London"))) |
386 | 100 | self.keyboard.press_and_release('Enter') | 101 | self.keyboard.press_and_release('Enter') |
387 | @@ -103,10 +104,12 @@ | |||
388 | 103 | resultsList = self.main_window.get_object('QQuickListView', 'SearchResultList') | 104 | resultsList = self.main_window.get_object('QQuickListView', 'SearchResultList') |
389 | 104 | self.assertThat(resultsList.visible, Eventually(Equals(True), timeout=30)) | 105 | self.assertThat(resultsList.visible, Eventually(Equals(True), timeout=30)) |
390 | 105 | firstResult = self.select_single_retry("Standard", objectName="searchResult0") | 106 | firstResult = self.select_single_retry("Standard", objectName="searchResult0") |
391 | 107 | self.assertThat(lambda: firstResult, Eventually(NotEquals(None))) | ||
392 | 106 | self.assertThat(firstResult.text, Eventually(Equals("London, GB"))) | 108 | self.assertThat(firstResult.text, Eventually(Equals("London, GB"))) |
393 | 107 | 109 | ||
394 | 108 | # clear search field and do another search | 110 | # clear search field and do another search |
395 | 109 | clear_button = searchField.select_single("AbstractButton") | 111 | clear_button = searchField.select_single("AbstractButton") |
396 | 112 | self.assertThat(lambda: clear_button, Eventually(NotEquals(None))) | ||
397 | 110 | self.pointing_device.click_object(clear_button) | 113 | self.pointing_device.click_object(clear_button) |
398 | 111 | self.assertThat(searchField.text, Eventually(Equals(""))) | 114 | self.assertThat(searchField.text, Eventually(Equals(""))) |
399 | 112 | 115 | ||
400 | @@ -115,6 +118,7 @@ | |||
401 | 115 | self.keyboard.press_and_release('Enter') | 118 | self.keyboard.press_and_release('Enter') |
402 | 116 | self.assertThat(resultsList.visible, Eventually(Equals(True), timeout=30)) | 119 | self.assertThat(resultsList.visible, Eventually(Equals(True), timeout=30)) |
403 | 117 | firstResult = self.select_single_retry("Standard", objectName="searchResult0") | 120 | firstResult = self.select_single_retry("Standard", objectName="searchResult0") |
404 | 121 | self.assertThat(lambda: firstResult, Eventually(NotEquals(None))) | ||
405 | 118 | self.assertThat(firstResult.text, Eventually(Equals("Hamburg, DE"))) | 122 | self.assertThat(firstResult.text, Eventually(Equals("Hamburg, DE"))) |
406 | 119 | 123 | ||
407 | 120 | def test_cancel_adding_location(self): | 124 | def test_cancel_adding_location(self): |
408 | @@ -130,8 +134,9 @@ | |||
409 | 130 | 134 | ||
410 | 131 | # insert city name to search for | 135 | # insert city name to search for |
411 | 132 | searchField = self.main_window.get_object("TextField", "SearchField") | 136 | searchField = self.main_window.get_object("TextField", "SearchField") |
414 | 133 | self.pointing_device.move_to_object(searchField) | 137 | self.assertThat(lambda: searchField, Eventually(NotEquals(None))) |
415 | 134 | self.pointing_device.click() | 138 | self.pointing_device.click_object(searchField) |
416 | 139 | self.assertThat(searchField.focus, Eventually(Equals(True))) | ||
417 | 135 | self.keyboard.type("UbuntuCity") # Unfortunately, no UbuntuCity in the world | 140 | self.keyboard.type("UbuntuCity") # Unfortunately, no UbuntuCity in the world |
418 | 136 | self.assertThat(searchField.text, Eventually(Equals("UbuntuCity"))) | 141 | self.assertThat(searchField.text, Eventually(Equals("UbuntuCity"))) |
419 | 137 | self.keyboard.press_and_release('Enter') | 142 | self.keyboard.press_and_release('Enter') |
420 | @@ -146,27 +151,20 @@ | |||
421 | 146 | self.clean_db() | 151 | self.clean_db() |
422 | 147 | self.launch_and_quit_app() | 152 | self.launch_and_quit_app() |
423 | 148 | # add one location to storage | 153 | # add one location to storage |
424 | 149 | #self.save_locations_to_storage([locations_data[0]]) | ||
425 | 150 | self.save_locations_to_storage(locations_data) | 154 | self.save_locations_to_storage(locations_data) |
426 | 151 | super(TestLocationManagerWithLocation, self).setUp() | 155 | super(TestLocationManagerWithLocation, self).setUp() |
427 | 152 | self.assertThat( | 156 | self.assertThat( |
429 | 153 | self.main_window.get_qml_view().visible, Eventually(Equals(True))) | 157 | self.get_qml_view().visible, Eventually(Equals(True))) |
430 | 154 | 158 | ||
431 | 155 | def _open_location_manager(self): | 159 | def _open_location_manager(self): |
432 | 156 | """Opens the location manager""" | 160 | """Opens the location manager""" |
441 | 157 | toolbar = self.main_window.get_toolbar() | 161 | self.main_window.open_toolbar().click_button("EditButton") |
434 | 158 | self.main_window.open_toolbar() | ||
435 | 159 | self.assertThat(toolbar.animating, Eventually(Equals(False))) | ||
436 | 160 | self.assertThat(toolbar.state, Eventually(Equals("spread"))) | ||
437 | 161 | self.main_window.click_toolbar_button("EditButton") | ||
438 | 162 | location_manager_sheet = self.main_window.get_object( | ||
439 | 163 | "ComposerSheet", "LocationManagerSheet") | ||
440 | 164 | self.assertThat(location_manager_sheet.opacity, Eventually(Equals(1))) | ||
442 | 165 | 162 | ||
443 | 166 | def _swipe_location_to_remove(self): | 163 | def _swipe_location_to_remove(self): |
444 | 167 | """Swipe right to delete the first location""" | 164 | """Swipe right to delete the first location""" |
445 | 168 | number_of_locations = self._get_number_of_locations() | 165 | number_of_locations = self._get_number_of_locations() |
446 | 169 | firstLocation = self.app.select_single("Standard", objectName="existingLocation0") | 166 | firstLocation = self.app.select_single("Standard", objectName="existingLocation0") |
447 | 167 | self.assertThat(lambda: firstLocation, Eventually(NotEquals(None))) | ||
448 | 170 | 168 | ||
449 | 171 | x, y, w, h = firstLocation.globalRect | 169 | x, y, w, h = firstLocation.globalRect |
450 | 172 | tx = x + (w / 8) | 170 | tx = x + (w / 8) |
451 | @@ -223,8 +221,3 @@ | |||
452 | 223 | tabObjects = self.main_window.get_objects('LocationTab','LocationTab') | 221 | tabObjects = self.main_window.get_objects('LocationTab','LocationTab') |
453 | 224 | self.assertEqual(tabsSumStart, len(tabObjects)) | 222 | self.assertEqual(tabsSumStart, len(tabObjects)) |
454 | 225 | 223 | ||
455 | 226 | def test_toolbar_opened_when_location_is_defined(self): | ||
456 | 227 | """Toolbar is visible since there's a location defined""" | ||
457 | 228 | self._open_location_manager() | ||
458 | 229 | toolbar = self.main_window.get_toolbar() | ||
459 | 230 | self.assertThat(toolbar.opened, Eventually(Equals(True))) | ||
460 | 231 | 224 | ||
461 | === modified file 'tests/autopilot/ubuntu_weather_app/tests/test_mainview.py' | |||
462 | --- tests/autopilot/ubuntu_weather_app/tests/test_mainview.py 2013-07-27 16:31:15 +0000 | |||
463 | +++ tests/autopilot/ubuntu_weather_app/tests/test_mainview.py 2013-08-07 17:39:25 +0000 | |||
464 | @@ -4,6 +4,8 @@ | |||
465 | 4 | # This program is free software: you can redistribute it and/or modify it | 4 | # This program is free software: you can redistribute it and/or modify it |
466 | 5 | # under the terms of the GNU General Public License version 3, as published | 5 | # under the terms of the GNU General Public License version 3, as published |
467 | 6 | # by the Free Software Foundation. | 6 | # by the Free Software Foundation. |
468 | 7 | # | ||
469 | 8 | # Authored by: Martin Borho <martin@borho.net> | ||
470 | 7 | 9 | ||
471 | 8 | """Tests for Weather app""" | 10 | """Tests for Weather app""" |
472 | 9 | 11 | ||
473 | @@ -26,7 +28,7 @@ | |||
474 | 26 | self.save_locations_to_storage(locations_data) | 28 | self.save_locations_to_storage(locations_data) |
475 | 27 | super(TestMainView, self).setUp() | 29 | super(TestMainView, self).setUp() |
476 | 28 | self.assertThat( | 30 | self.assertThat( |
478 | 29 | self.main_window.get_qml_view().visible, Eventually(Equals(True))) | 31 | self.get_qml_view().visible, Eventually(Equals(True))) |
479 | 30 | 32 | ||
480 | 31 | def tearDown(self): | 33 | def tearDown(self): |
481 | 32 | super(TestMainView, self).tearDown() | 34 | super(TestMainView, self).tearDown() |
482 | @@ -42,7 +44,7 @@ | |||
483 | 42 | self.assertThat(tabObjects[1].visible, Eventually(Equals(False))) | 44 | self.assertThat(tabObjects[1].visible, Eventually(Equals(False))) |
484 | 43 | self.assertThat(tabObjects[0].title, Eventually(Equals("London"))) | 45 | self.assertThat(tabObjects[0].title, Eventually(Equals("London"))) |
485 | 44 | # switch to next tab | 46 | # switch to next tab |
487 | 45 | self.main_window.switch_to_tab(1) | 47 | self.main_window.switch_to_tab_by_index(1) |
488 | 46 | self.assertThat(tabs.selectedTabIndex, Eventually(Equals(1))) | 48 | self.assertThat(tabs.selectedTabIndex, Eventually(Equals(1))) |
489 | 47 | self.assertThat(tabObjects[0].visible, Eventually(Equals(False))) | 49 | self.assertThat(tabObjects[0].visible, Eventually(Equals(False))) |
490 | 48 | self.assertThat(tabObjects[1].visible, Eventually(Equals(True))) | 50 | self.assertThat(tabObjects[1].visible, Eventually(Equals(True))) |
491 | @@ -55,7 +57,7 @@ | |||
492 | 55 | tab2_curr_date = curr_dates[2].text | 57 | tab2_curr_date = curr_dates[2].text |
493 | 56 | 58 | ||
494 | 57 | # refresh and wait till loading has finished | 59 | # refresh and wait till loading has finished |
496 | 58 | self.main_window.click_toolbar_button("RefreshButton") | 60 | self.main_window.open_toolbar().click_button("RefreshButton") |
497 | 59 | load_indicator = self.main_window.get_object('ActivityIndicator', 'LoadingSpinner') | 61 | load_indicator = self.main_window.get_object('ActivityIndicator', 'LoadingSpinner') |
498 | 60 | self.assertThat(load_indicator.running, Eventually(Equals(False))) | 62 | self.assertThat(load_indicator.running, Eventually(Equals(False))) |
499 | 61 | 63 | ||
500 | 62 | 64 | ||
501 | === modified file 'tests/autopilot/ubuntu_weather_app/tests/test_settings.py' | |||
502 | --- tests/autopilot/ubuntu_weather_app/tests/test_settings.py 2013-07-27 16:31:15 +0000 | |||
503 | +++ tests/autopilot/ubuntu_weather_app/tests/test_settings.py 2013-08-07 17:39:25 +0000 | |||
504 | @@ -9,7 +9,7 @@ | |||
505 | 9 | 9 | ||
506 | 10 | from __future__ import absolute_import | 10 | from __future__ import absolute_import |
507 | 11 | 11 | ||
509 | 12 | from testtools.matchers import Equals | 12 | from testtools.matchers import Equals, NotEquals |
510 | 13 | from autopilot.matchers import Eventually | 13 | from autopilot.matchers import Eventually |
511 | 14 | 14 | ||
512 | 15 | from ubuntu_weather_app.tests import WeatherTestCase, DatabaseMixin, SheetMixin | 15 | from ubuntu_weather_app.tests import WeatherTestCase, DatabaseMixin, SheetMixin |
513 | @@ -22,28 +22,27 @@ | |||
514 | 22 | self.save_locations_to_storage(locations_data) | 22 | self.save_locations_to_storage(locations_data) |
515 | 23 | super(TestSettings, self).setUp() | 23 | super(TestSettings, self).setUp() |
516 | 24 | self.assertThat( | 24 | self.assertThat( |
518 | 25 | self.main_window.get_qml_view().visible, Eventually(Equals(True))) | 25 | self.get_qml_view().visible, Eventually(Equals(True))) |
519 | 26 | 26 | ||
520 | 27 | def _open_settings_sheet(self): | 27 | def _open_settings_sheet(self): |
521 | 28 | """Opens the settings sheet""" | 28 | """Opens the settings sheet""" |
525 | 29 | self.main_window.open_toolbar() | 29 | self.main_window.open_toolbar().click_button("SettingsButton") |
523 | 30 | self.assertThat(self.main_window.get_toolbar().opened, Eventually(Equals(True))) | ||
524 | 31 | self.main_window.click_toolbar_button("SettingsButton") | ||
526 | 32 | 30 | ||
527 | 33 | def _move_pointer_around(self): | 31 | def _move_pointer_around(self): |
528 | 34 | """Helper method to move the pointer around, to assure selector is opened""" | 32 | """Helper method to move the pointer around, to assure selector is opened""" |
529 | 35 | sheet = self.main_window.get_object('ComposerSheet', 'SettingsSheet') | 33 | sheet = self.main_window.get_object('ComposerSheet', 'SettingsSheet') |
530 | 34 | self.assertThat(lambda: sheet, Eventually(NotEquals(None))) | ||
531 | 36 | self.pointing_device.move_to_object(sheet) | 35 | self.pointing_device.move_to_object(sheet) |
532 | 37 | 36 | ||
533 | 38 | def _check_units(self, units): | 37 | def _check_units(self, units): |
534 | 39 | """Checks selected units by values from the first location tab""" | 38 | """Checks selected units by values from the first location tab""" |
535 | 40 | current_temps = self.main_window.get_objects('QQuickText', 'CurrentTempText') | 39 | current_temps = self.main_window.get_objects('QQuickText', 'CurrentTempText') |
536 | 41 | if units == "imperial": | 40 | if units == "imperial": |
539 | 42 | self.assertThat(current_temps[0].text, Eventually(Equals(u'76°F'))) | 41 | self.assertThat(current_temps[0].text, Eventually(Equals(u'70°F'))) |
540 | 43 | self.assertThat(current_temps[2].text, Eventually(Equals(u'78°F'))) | 42 | self.assertThat(current_temps[2].text, Eventually(Equals(u'72°F'))) |
541 | 44 | else: | 43 | else: |
544 | 45 | self.assertThat(current_temps[0].text, Eventually(Equals(u'25°C'))) | 44 | self.assertThat(current_temps[0].text, Eventually(Equals(u'21°C'))) |
545 | 46 | self.assertThat(current_temps[2].text, Eventually(Equals(u'25°C'))) | 45 | self.assertThat(current_temps[2].text, Eventually(Equals(u'22°C'))) |
546 | 47 | 46 | ||
547 | 48 | def test_switch_scale(self): | 47 | def test_switch_scale(self): |
548 | 49 | """Tests switching the scale in the settings""" | 48 | """Tests switching the scale in the settings""" |
549 | @@ -59,6 +58,7 @@ | |||
550 | 59 | # choose second option, fahrenheit | 58 | # choose second option, fahrenheit |
551 | 60 | self._move_pointer_around() | 59 | self._move_pointer_around() |
552 | 61 | imperial_option = units_selector.get_children()[3] | 60 | imperial_option = units_selector.get_children()[3] |
553 | 61 | self.assertThat(lambda: imperial_option, Eventually(NotEquals(None))) | ||
554 | 62 | self.pointing_device.click_object(imperial_option) | 62 | self.pointing_device.click_object(imperial_option) |
555 | 63 | self.assertThat(units_selector.selectedIndex, Eventually(Equals(1))) | 63 | self.assertThat(units_selector.selectedIndex, Eventually(Equals(1))) |
556 | 64 | self._click_sheet_confirm() | 64 | self._click_sheet_confirm() |
557 | @@ -71,6 +71,7 @@ | |||
558 | 71 | # switch back to metric values again | 71 | # switch back to metric values again |
559 | 72 | self._open_settings_sheet() | 72 | self._open_settings_sheet() |
560 | 73 | units_selector = self.main_window.get_object('ValueSelector', "UnitsSelector") | 73 | units_selector = self.main_window.get_object('ValueSelector', "UnitsSelector") |
561 | 74 | self.assertThat(lambda: units_selector, Eventually(NotEquals(None))) | ||
562 | 74 | self.assertThat(units_selector.selectedIndex, Eventually(Equals(1))) | 75 | self.assertThat(units_selector.selectedIndex, Eventually(Equals(1))) |
563 | 75 | self.pointing_device.click_object(units_selector) | 76 | self.pointing_device.click_object(units_selector) |
564 | 76 | self.assertThat(units_selector.expanded, Eventually(Equals(True))) | 77 | self.assertThat(units_selector.expanded, Eventually(Equals(True))) |
565 | @@ -78,6 +79,7 @@ | |||
566 | 78 | # click celsius option | 79 | # click celsius option |
567 | 79 | self._move_pointer_around() | 80 | self._move_pointer_around() |
568 | 80 | metric_option = units_selector.get_children()[4] | 81 | metric_option = units_selector.get_children()[4] |
569 | 82 | self.assertThat(lambda: metric_option, Eventually(NotEquals(None))) | ||
570 | 81 | self.pointing_device.click_object(metric_option) | 83 | self.pointing_device.click_object(metric_option) |
571 | 82 | 84 | ||
572 | 83 | # confirm | 85 | # confirm |
573 | @@ -96,12 +98,14 @@ | |||
574 | 96 | self._open_settings_sheet() | 98 | self._open_settings_sheet() |
575 | 97 | 99 | ||
576 | 98 | units_selector = self.main_window.get_object('ValueSelector', "UnitsSelector") | 100 | units_selector = self.main_window.get_object('ValueSelector', "UnitsSelector") |
577 | 101 | self.assertThat(lambda: units_selector, Eventually(NotEquals(None))) | ||
578 | 99 | self.assertThat(units_selector.selectedIndex, Eventually(Equals(0))) | 102 | self.assertThat(units_selector.selectedIndex, Eventually(Equals(0))) |
579 | 100 | self.pointing_device.click_object(units_selector) | 103 | self.pointing_device.click_object(units_selector) |
580 | 101 | 104 | ||
581 | 102 | # choose second option, fahrenheit | 105 | # choose second option, fahrenheit |
582 | 103 | self._move_pointer_around() | 106 | self._move_pointer_around() |
583 | 104 | imperial_option = units_selector.get_children()[3] | 107 | imperial_option = units_selector.get_children()[3] |
584 | 108 | self.assertThat(lambda: imperial_option, Eventually(NotEquals(None))) | ||
585 | 105 | self.pointing_device.click_object(imperial_option) | 109 | self.pointing_device.click_object(imperial_option) |
586 | 106 | self.assertThat(units_selector.selectedIndex, Eventually(Equals(1))) | 110 | self.assertThat(units_selector.selectedIndex, Eventually(Equals(1))) |
587 | 107 | 111 | ||
588 | 108 | 112 | ||
589 | === modified file 'tests/autopilot/ubuntu_weather_app/tests/weatherdata.py' | |||
590 | --- tests/autopilot/ubuntu_weather_app/tests/weatherdata.py 2013-07-27 16:31:15 +0000 | |||
591 | +++ tests/autopilot/ubuntu_weather_app/tests/weatherdata.py 2013-08-07 17:39:25 +0000 | |||
592 | @@ -6,8 +6,7 @@ | |||
593 | 6 | # by the Free Software Foundation. | 6 | # by the Free Software Foundation. |
594 | 7 | locations_data = [] | 7 | locations_data = [] |
595 | 8 | 8 | ||
600 | 9 | locations_data.append("""{"location":{"service_id":2643743,"name":"London","country":"GB","service":"openweathermap"},"db":{"updated":"2013-07-27T16:06:14.606Z","id":1},"format":20130727,"data":[{"date":"2013-07-27","timestamp":1374926400,"metric":{"tempMin":15.55,"tempMax":24.5},"imperial":{"tempMin":59.99,"tempMax":76.1},"pressure":1009.81,"humidity":63,"condition":{"id":502,"main":"Rain","description":"heavy intensity rain","icon":"10d"},"wind_speed":3.3,"wind_deg":101,"hourly":[],"current":{"timestamp":1374940874,"date":"2013-07-27 18:01","metric":{"temp":24.5},"imperial":{"temp":76.1},"humidity":64,"pressure":1004,"wind_speed_kmh":6.2,"wind_speed_mph":3.852494,"wind_deg":110,"condition":{"id":520,"main":"Rain","description":"light intensity shower rain","icon":"09d"},"service":"openweathermap","service_id":2643743}},{"date":"2013-07-28","timestamp":1375012800,"metric":{"tempMin":14.7,"tempMax":19.86},"imperial":{"tempMin":58.46,"tempMax":67.74799999999999},"pressure":1013.76,"humidity":91,"condition":{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"},"wind_speed":4.46,"wind_deg":213,"hourly":[]},{"date":"2013-07-29","timestamp":1375099200,"metric":{"tempMin":14.67,"tempMax":17.63},"imperial":{"tempMin":58.406,"tempMax":63.733999999999995},"pressure":1016.16,"humidity":95,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"wind_speed":4.73,"wind_deg":213,"hourly":[]},{"date":"2013-07-30","timestamp":1375185600,"metric":{"tempMin":14.29,"tempMax":19.79},"imperial":{"tempMin":57.721999999999994,"tempMax":67.622},"pressure":1023.8,"humidity":70,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"wind_speed":3.98,"wind_deg":252,"hourly":[]},{"date":"2013-07-31","timestamp":1375272000,"metric":{"tempMin":15.19,"tempMax":24.08},"imperial":{"tempMin":59.342,"tempMax":75.344},"pressure":1021.26,"humidity":69,"condition":{"id":800,"main":"Clear","description":"sky is clear","icon":"01d"},"wind_speed":4.3,"wind_deg":217,"hourly":[]},{"date":"2013-08-01","timestamp":1375358400,"metric":{"tempMin":19.05,"tempMax":28.47},"imperial":{"tempMin":66.28999999999999,"tempMax":83.24600000000001},"pressure":1018.91,"humidity":59,"condition":{"id":800,"main":"Clear","description":"sky is clear","icon":"01d"},"wind_speed":3.45,"wind_deg":176,"hourly":[]},{"date":"2013-08-02","timestamp":1375444800,"metric":{"tempMin":14.26,"tempMax":18.83},"imperial":{"tempMin":57.668,"tempMax":65.894},"pressure":1016.86,"humidity":0,"condition":{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"},"wind_speed":7.11,"wind_deg":207,"hourly":[]},{"date":"2013-08-03","timestamp":1375531200,"metric":{"tempMin":13.28,"tempMax":20.37},"imperial":{"tempMin":55.903999999999996,"tempMax":68.666},"pressure":1024.05,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"wind_speed":3.05,"wind_deg":249,"hourly":[]},{"date":"2013-08-04","timestamp":1375617600,"metric":{"tempMin":14.07,"tempMax":21.59},"imperial":{"tempMin":57.326,"tempMax":70.862},"pressure":1020.85,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"wind_speed":3.55,"wind_deg":165,"hourly":[]},{"date":"2013-08-05","timestamp":1375704000,"metric":{"tempMin":13.76,"tempMax":19.47},"imperial":{"tempMin":56.768,"tempMax":67.04599999999999},"pressure":1014.62,"humidity":0,"condition":{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"},"wind_speed":5.38,"wind_deg":196,"hourly":[]}],"save":true}""") | 9 | locations_data.append("""{"location":{"service_id":2643743,"name":"London","country":"GB","service":"openweathermap"},"db":{"updated":"2013-08-06T18:31:16.155Z","id":1},"format":20130801,"data":[{"date":"2013-08-06","timestamp":1375738207,"metric":{"tempMin":17.38,"tempMax":21.29,"windSpeed":5.22},"imperial":{"tempMin":63.284,"tempMax":70.322,"windSpeed":3.248,"rain":null},"pressure":1020.63,"humidity":58,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"windDeg":272,"hourly":[],"current":{"timestamp":1375813805,"date":"2013-08-06 20:30","metric":{"temp":21.29,"windSpeed":null},"imperial":{"temp":70.322,"windSpeed":null,"rain":null},"humidity":56,"pressure":1013,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"service":"openweathermap","service_id":2643743}},{"date":"2013-08-07","timestamp":1375876800,"metric":{"tempMin":14.25,"tempMax":22.14,"windSpeed":9.54},"imperial":{"tempMin":57.650000000000006,"tempMax":71.852,"windSpeed":5.936,"rain":null},"pressure":1019.36,"humidity":58,"condition":{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"},"windDeg":66,"hourly":[]},{"date":"2013-08-08","timestamp":1375963200,"metric":{"tempMin":13.13,"tempMax":22.86,"windSpeed":5.796},"imperial":{"tempMin":55.634,"tempMax":73.148,"windSpeed":3.6064000000000007,"rain":null},"pressure":1026.02,"humidity":58,"condition":{"id":800,"main":"Clear","description":"sky is clear","icon":"01d"},"windDeg":357,"hourly":[]},{"date":"2013-08-09","timestamp":1376049600,"metric":{"tempMin":14.09,"tempMax":23.71,"windSpeed":12.276000000000002},"imperial":{"tempMin":57.362,"tempMax":74.678,"windSpeed":7.638400000000001,"rain":null},"pressure":1025.05,"humidity":56,"condition":{"id":800,"main":"Clear","description":"sky is clear","icon":"01d"},"windDeg":260,"hourly":[]},{"date":"2013-08-10","timestamp":1376136000,"metric":{"tempMin":11.82,"tempMax":21.31,"windSpeed":9.395999999999999,"rain":1},"imperial":{"tempMin":53.275999999999996,"tempMax":70.358,"windSpeed":5.8464,"rain":0.03937007874015748},"pressure":1026.7,"humidity":69,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":224,"hourly":[]},{"date":"2013-08-11","timestamp":1376222400,"metric":{"tempMin":15.38,"tempMax":22.5,"windSpeed":11.916},"imperial":{"tempMin":59.684,"tempMax":72.5,"windSpeed":7.4144000000000005,"rain":null},"pressure":1021.58,"humidity":61,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"windDeg":255,"hourly":[]},{"date":"2013-08-12","timestamp":1376308800,"metric":{"tempMin":12.79,"tempMax":20.71,"windSpeed":14.148000000000001,"rain":1.14},"imperial":{"tempMin":55.022,"tempMax":69.278,"windSpeed":8.8032,"rain":0.04488188976377953},"pressure":1025.21,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":40,"hourly":[]},{"date":"2013-08-13","timestamp":1376395200,"metric":{"tempMin":11.61,"tempMax":22.22,"windSpeed":11.448,"rain":0.73},"imperial":{"tempMin":52.897999999999996,"tempMax":71.99600000000001,"windSpeed":7.123200000000001,"rain":0.02874015748031496},"pressure":1025.5,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":201,"hourly":[]},{"date":"2013-08-14","timestamp":1376481600,"metric":{"tempMin":16.09,"tempMax":22.97,"windSpeed":28.08,"rain":0.21},"imperial":{"tempMin":60.962,"tempMax":73.346,"windSpeed":17.472,"rain":0.00826771653543307},"pressure":1023.75,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":252,"hourly":[]},{"date":"2013-08-15","timestamp":1376568000,"metric":{"tempMin":14.36,"tempMax":22.61,"windSpeed":16.02,"rain":1.08},"imperial":{"tempMin":57.848,"tempMax":72.69800000000001,"windSpeed":9.968000000000002,"rain":0.042519685039370085},"pressure":1023.89,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":229,"hourly":[]}],"save":true}""") |
601 | 10 | 10 | ||
602 | 11 | locations_data.append( """{"location":{"coord":{"lon":10,"lat":53.549999},"service_id":2911298,"name":"Hamburg","country":"DE","service":"openweathermap"},"db":{"updated":"2013-07-27T16:06:14.628Z","id":2},"format":20130727,"data":[{"date":"2013-07-27","timestamp":1374922800,"metric":{"tempMin":16.77,"tempMax":25.3},"imperial":{"tempMin":62.186,"tempMax":77.53999999999999},"pressure":1018.72,"humidity":66,"condition":{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"},"wind_speed":2.15,"wind_deg":102,"hourly":[],"current":{"timestamp":1374940200,"date":"2013-07-27 17:50","metric":{"temp":25.3},"imperial":{"temp":77.53999999999999},"humidity":94,"pressure":1009,"wind_speed_kmh":6.2,"wind_speed_mph":3.852494,"wind_deg":240,"condition":{"id":200,"main":"Thunderstorm","description":"thunderstorm with light rain","icon":"11d"},"service":"openweathermap","service_id":2911298}},{"date":"2013-07-28","timestamp":1375009200,"metric":{"tempMin":17.73,"tempMax":22.74},"imperial":{"tempMin":63.914,"tempMax":72.93199999999999},"pressure":1020.48,"humidity":87,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"wind_speed":6.21,"wind_deg":249,"hourly":[]},{"date":"2013-07-29","timestamp":1375095600,"metric":{"tempMin":15.53,"tempMax":23.35},"imperial":{"tempMin":59.954,"tempMax":74.03},"pressure":1024.02,"humidity":82,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"wind_speed":2.05,"wind_deg":172,"hourly":[]},{"date":"2013-07-30","timestamp":1375182000,"metric":{"tempMin":15.57,"tempMax":18.14},"imperial":{"tempMin":60.025999999999996,"tempMax":64.652},"pressure":1022.58,"humidity":95,"condition":{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"},"wind_speed":7.5,"wind_deg":267,"hourly":[]},{"date":"2013-07-31","timestamp":1375268400,"metric":{"tempMin":15.09,"tempMax":23.08},"imperial":{"tempMin":59.162,"tempMax":73.544},"pressure":1028.48,"humidity":78,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"wind_speed":5,"wind_deg":258,"hourly":[]},{"date":"2013-08-01","timestamp":1375354800,"metric":{"tempMin":19.15,"tempMax":27.67},"imperial":{"tempMin":66.47,"tempMax":81.80600000000001},"pressure":1030.67,"humidity":73,"condition":{"id":800,"main":"Clear","description":"sky is clear","icon":"01d"},"wind_speed":0.85,"wind_deg":99,"hourly":[]},{"date":"2013-08-02","timestamp":1375441200,"metric":{"tempMin":13.19,"tempMax":18.78},"imperial":{"tempMin":55.742000000000004,"tempMax":65.804},"pressure":1022.53,"humidity":0,"condition":{"id":502,"main":"Rain","description":"heavy intensity rain","icon":"10d"},"wind_speed":6.02,"wind_deg":253,"hourly":[]},{"date":"2013-08-03","timestamp":1375527600,"metric":{"tempMin":14.58,"tempMax":21.82},"imperial":{"tempMin":58.244,"tempMax":71.27600000000001},"pressure":1027.5,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"wind_speed":3.21,"wind_deg":261,"hourly":[]},{"date":"2013-08-04","timestamp":1375614000,"metric":{"tempMin":12.47,"tempMax":19.72},"imperial":{"tempMin":54.446,"tempMax":67.49600000000001},"pressure":1027.54,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"wind_speed":2.71,"wind_deg":1,"hourly":[]},{"date":"2013-08-05","timestamp":1375700400,"metric":{"tempMin":13.23,"tempMax":21.94},"imperial":{"tempMin":55.814,"tempMax":71.492},"pressure":1023.33,"humidity":0,"condition":{"id":800,"main":"Clear","description":"sky is clear","icon":"01d"},"wind_speed":2.09,"wind_deg":94,"hourly":[]}],"save":true}""") | 11 | locations_data.append("""{"location":{"coord":{"lon":10,"lat":53.549999},"service_id":2911298,"name":"Hamburg","country":"DE","service":"openweathermap"},"db":{"updated":"2013-08-06T18:35:14.332Z","id":2},"format":20130801,"data":[{"date":"2013-08-06","timestamp":1375738207,"metric":{"tempMin":13.37,"tempMax":20,"windSpeed":18.18},"imperial":{"tempMin":56.066,"tempMax":68,"windSpeed":11.312000000000001,"rain":null},"pressure":1024.52,"humidity":55,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"windDeg":302,"hourly":[],"current":{"timestamp":1375813203,"date":"2013-08-06 20:20","metric":{"temp":20,"windSpeed":null},"imperial":{"temp":68,"windSpeed":null,"rain":null},"humidity":64,"pressure":1015,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"service":"openweathermap","service_id":2911298}},{"date":"2013-08-07","timestamp":1375873200,"metric":{"tempMin":11.38,"tempMax":16.98,"windSpeed":13.860000000000001,"rain":22},"imperial":{"tempMin":52.484,"tempMax":62.564,"windSpeed":8.624,"rain":0.8661417322834646},"pressure":1025.03,"humidity":100,"condition":{"id":502,"main":"Rain","description":"heavy intensity rain","icon":"10d"},"windDeg":7,"hourly":[]},{"date":"2013-08-08","timestamp":1375959600,"metric":{"tempMin":13.56,"tempMax":15.36,"windSpeed":15.515999999999998,"rain":13},"imperial":{"tempMin":56.408,"tempMax":59.647999999999996,"windSpeed":9.6544,"rain":0.5118110236220472},"pressure":1026.42,"humidity":100,"condition":{"id":502,"main":"Rain","description":"heavy intensity rain","icon":"10d"},"windDeg":31,"hourly":[]},{"date":"2013-08-09","timestamp":1376046000,"metric":{"tempMin":11.19,"tempMax":20.06,"windSpeed":14.436},"imperial":{"tempMin":52.141999999999996,"tempMax":68.108,"windSpeed":8.9824,"rain":null},"pressure":1030.49,"humidity":91,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"windDeg":304,"hourly":[]},{"date":"2013-08-10","timestamp":1376132400,"metric":{"tempMin":13.81,"tempMax":21.32,"windSpeed":17.136},"imperial":{"tempMin":56.858000000000004,"tempMax":70.376,"windSpeed":10.6624,"rain":null},"pressure":1030.51,"humidity":80,"condition":{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"},"windDeg":250,"hourly":[]},{"date":"2013-08-11","timestamp":1376218800,"metric":{"tempMin":16.51,"tempMax":23.68,"windSpeed":22.715999999999998,"rain":3},"imperial":{"tempMin":61.718,"tempMax":74.624,"windSpeed":14.134400000000001,"rain":0.11811023622047245},"pressure":1024.9,"humidity":68,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":238,"hourly":[]},{"date":"2013-08-12","timestamp":1376305200,"metric":{"tempMin":14.79,"tempMax":20.61,"windSpeed":10.044,"rain":0.59},"imperial":{"tempMin":58.622,"tempMax":69.098,"windSpeed":6.249600000000001,"rain":0.023228346456692913},"pressure":1028.45,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":275,"hourly":[]},{"date":"2013-08-13","timestamp":1376391600,"metric":{"tempMin":13.23,"tempMax":21.47,"windSpeed":5.184},"imperial":{"tempMin":55.814,"tempMax":70.646,"windSpeed":3.2256,"rain":null},"pressure":1029.35,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":48,"hourly":[]},{"date":"2013-08-14","timestamp":1376478000,"metric":{"tempMin":15.49,"tempMax":22.37,"windSpeed":7.704000000000001,"rain":0.33},"imperial":{"tempMin":59.882000000000005,"tempMax":72.266,"windSpeed":4.7936000000000005,"rain":0.01299212598425197},"pressure":1027.6,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":226,"hourly":[]},{"date":"2013-08-15","timestamp":1376564400,"metric":{"tempMin":15.3,"tempMax":23.26,"windSpeed":26.316},"imperial":{"tempMin":59.540000000000006,"tempMax":73.868,"windSpeed":16.3744,"rain":null},"pressure":1027.33,"humidity":0,"condition":{"id":500,"main":"Rain","description":"light rain","icon":"10d"},"windDeg":253,"hourly":[]}],"save":true}""") |
599 | 12 | |||
603 | 13 | 12 |
PASSED: Continuous integration, rev:88 91.189. 93.70:8080/ job/ubuntu- weather- app-ci/ 28/ 91.189. 93.70:8080/ job/ubuntu- weather- app-precise- amd64-ci/ 20 91.189. 93.70:8080/ job/ubuntu- weather- app-quantal- amd64-ci/ 27 91.189. 93.70:8080/ job/ubuntu- weather- app-raring- amd64-ci/ 27 91.189. 93.70:8080/ job/ubuntu- weather- app-saucy- amd64-ci/ 20
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/ubuntu- weather- app-ci/ 28/rebuild
http://