Merge lp:~elopio/ubuntu-system-settings/refactor_about_tests into lp:ubuntu-system-settings
- refactor_about_tests
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~elopio/ubuntu-system-settings/refactor_about_tests |
Merge into: | lp:ubuntu-system-settings |
Prerequisite: | lp:~elopio/ubuntu-system-settings/python3 |
Diff against target: |
707 lines (+320/-149) 7 files modified
tests/autopilot/ubuntu_system_settings/__init__.py (+152/-27) tests/autopilot/ubuntu_system_settings/tests/__init__.py (+46/-56) tests/autopilot/ubuntu_system_settings/tests/test_about.py (+67/-47) tests/autopilot/ubuntu_system_settings/tests/test_cellular.py (+17/-5) tests/autopilot/ubuntu_system_settings/tests/test_datetime.py (+4/-3) tests/autopilot/ubuntu_system_settings/tests/test_search.py (+16/-6) tests/autopilot/ubuntu_system_settings/tests/test_sound.py (+18/-5) |
To merge this branch: | bzr merge lp:~elopio/ubuntu-system-settings/refactor_about_tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brendan Donegan (community) | Approve | ||
Sebastien Bacher (community) | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email: mp+225425@code.launchpad.net |
This proposal has been superseded by a proposal from 2014-07-11.
Commit message
Refactored the About autopilot tests to use the page object pattern. Added the click_item public helper to be used by UX tests.
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:761
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:765
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:767
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:767
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:767
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:767
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:767
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Sebastien Bacher (seb128) wrote : | # |
thanks, looks fine to me
Brendan Donegan (brendan-donegan) wrote : | # |
Great - thanks!
- 767. By Leo Arias
-
Merged with jonas branch.
- 768. By Leo Arias
-
Reverted the license changes for now.
- 769. By Leo Arias
-
Merged with trunk.
- 770. By Leo Arias
-
Updated the pointing device attribute.
- 771. By Leo Arias
-
Added the CellularPage to make the tests work with jonas' additions
- 772. By Leo Arias
-
Merged with trunk.
Unmerged revisions
Preview Diff
1 | === modified file 'tests/autopilot/ubuntu_system_settings/__init__.py' | |||
2 | --- tests/autopilot/ubuntu_system_settings/__init__.py 2014-07-09 00:25:18 +0000 | |||
3 | +++ tests/autopilot/ubuntu_system_settings/__init__.py 2014-07-09 00:25:18 +0000 | |||
4 | @@ -2,17 +2,20 @@ | |||
5 | 2 | # | 2 | # |
6 | 3 | # Copyright (C) 2014 Canonical Ltd. | 3 | # Copyright (C) 2014 Canonical Ltd. |
7 | 4 | # | 4 | # |
10 | 5 | # This program is free software; you can redistribute it and/or modify | 5 | # |
11 | 6 | # it under the terms of the GNU Lesser General Public License as published by | 6 | # This file is part of ubuntu-system-settings |
12 | 7 | # | ||
13 | 8 | # ubuntu-system-settings is free software: you can redistribute it and/or | ||
14 | 9 | # modify it under the terms of the GNU General Public License as published by | ||
15 | 7 | # the Free Software Foundation; version 3. | 10 | # the Free Software Foundation; version 3. |
16 | 8 | # | 11 | # |
18 | 9 | # This program is distributed in the hope that it will be useful, | 12 | # ubuntu-system-settings is distributed in the hope that it will be useful, |
19 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
22 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
23 | 12 | # GNU Lesser General Public License for more details. | 15 | # GNU General Public License for more details. |
24 | 13 | # | 16 | # |
27 | 14 | # You should have received a copy of the GNU Lesser General Public License | 17 | # You should have received a copy of the GNU General Public License |
28 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
29 | 16 | 19 | ||
30 | 17 | import logging | 20 | import logging |
31 | 18 | 21 | ||
32 | @@ -23,8 +26,12 @@ | |||
33 | 23 | 26 | ||
34 | 24 | from time import sleep | 27 | from time import sleep |
35 | 25 | 28 | ||
38 | 26 | from autopilot import platform | 29 | import autopilot.logging |
39 | 27 | from ubuntuuitoolkit import emulators as toolkit_emulators | 30 | import ubuntuuitoolkit |
40 | 31 | from autopilot import introspection, platform | ||
41 | 32 | |||
42 | 33 | |||
43 | 34 | logger = logging.getLogger(__name__) | ||
44 | 28 | 35 | ||
45 | 29 | 36 | ||
46 | 30 | class SystemSettings(): | 37 | class SystemSettings(): |
47 | @@ -72,7 +79,7 @@ | |||
48 | 72 | app = testobj.launch_test_application( | 79 | app = testobj.launch_test_application( |
49 | 73 | *params, | 80 | *params, |
50 | 74 | app_type='qt', | 81 | app_type='qt', |
52 | 75 | emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase) | 82 | emulator_base=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase) |
53 | 76 | 83 | ||
54 | 77 | return app | 84 | return app |
55 | 78 | 85 | ||
56 | @@ -82,13 +89,34 @@ | |||
57 | 82 | return self.app.select_single(MainWindow) | 89 | return self.app.select_single(MainWindow) |
58 | 83 | 90 | ||
59 | 84 | 91 | ||
61 | 85 | class MainWindow(toolkit_emulators.MainView): | 92 | class MainWindow(ubuntuuitoolkit.MainView): |
62 | 86 | """An emulator class that makes it easy to interact with the UI.""" | 93 | """An emulator class that makes it easy to interact with the UI.""" |
63 | 87 | 94 | ||
68 | 88 | @property | 95 | @autopilot.logging.log_action(logger.debug) |
69 | 89 | def pointer(self): | 96 | def click_item(self, object_name): |
70 | 90 | """ Return pointer """ | 97 | """Click a system settings item. |
71 | 91 | return toolkit_emulators.get_pointing_device() | 98 | |
72 | 99 | :param object_name: The objectName property of the item to click. | ||
73 | 100 | |||
74 | 101 | """ | ||
75 | 102 | item = self.select_single(objectName=object_name) | ||
76 | 103 | item.swipe_into_view() | ||
77 | 104 | self.pointing_device.click_object(item) | ||
78 | 105 | |||
79 | 106 | @autopilot.logging.log_action(logger.info) | ||
80 | 107 | def go_to_about_page(self): | ||
81 | 108 | """Open the About page. | ||
82 | 109 | |||
83 | 110 | :return: The About page. | ||
84 | 111 | |||
85 | 112 | """ | ||
86 | 113 | return self._go_to_page('entryComponent-about', 'aboutPage') | ||
87 | 114 | |||
88 | 115 | def _go_to_page(self, item_object_name, page_object_name): | ||
89 | 116 | self.click_item(item_object_name) | ||
90 | 117 | page = self.wait_select_single(objectName=page_object_name) | ||
91 | 118 | page.active.wait_for(True) | ||
92 | 119 | return page | ||
93 | 92 | 120 | ||
94 | 93 | def scroll_to(self, obj): | 121 | def scroll_to(self, obj): |
95 | 94 | page = self.select_single(objectName='systemSettingsPage') | 122 | page = self.select_single(objectName='systemSettingsPage') |
96 | @@ -97,7 +125,7 @@ | |||
97 | 97 | page_center_x = int(page_right / 2) | 125 | page_center_x = int(page_right / 2) |
98 | 98 | page_center_y = int(page_bottom / 2) | 126 | page_center_y = int(page_bottom / 2) |
99 | 99 | while obj.globalRect[1] + obj.height > page_bottom: | 127 | while obj.globalRect[1] + obj.height > page_bottom: |
101 | 100 | self.pointer.drag( | 128 | self.pointing_device.drag( |
102 | 101 | page_center_x, | 129 | page_center_x, |
103 | 102 | page_center_y, | 130 | page_center_y, |
104 | 103 | page_center_x, | 131 | page_center_x, |
105 | @@ -108,12 +136,7 @@ | |||
106 | 108 | 136 | ||
107 | 109 | def scroll_to_and_click(self, obj): | 137 | def scroll_to_and_click(self, obj): |
108 | 110 | self.scroll_to(obj) | 138 | self.scroll_to(obj) |
115 | 111 | self.pointer.click_object(obj) | 139 | self.pointing_device.click_object(obj) |
110 | 112 | |||
111 | 113 | @property | ||
112 | 114 | def about_page(self): | ||
113 | 115 | """ Return 'About' page """ | ||
114 | 116 | return self.select_single(objectName='aboutPage') | ||
116 | 117 | 140 | ||
117 | 118 | @property | 141 | @property |
118 | 119 | def cellular_page(self): | 142 | def cellular_page(self): |
119 | @@ -126,11 +149,6 @@ | |||
120 | 126 | return self.select_single(objectName="chooseCarrierPage") | 149 | return self.select_single(objectName="chooseCarrierPage") |
121 | 127 | 150 | ||
122 | 128 | @property | 151 | @property |
123 | 129 | def licenses_page(self): | ||
124 | 130 | """ Return 'License' page """ | ||
125 | 131 | return self.select_single(objectName='licensesPage') | ||
126 | 132 | |||
127 | 133 | @property | ||
128 | 134 | def storage_page(self): | 152 | def storage_page(self): |
129 | 135 | """ Return 'Storage' page """ | 153 | """ Return 'Storage' page """ |
130 | 136 | return self.select_single(objectName='storagePage') | 154 | return self.select_single(objectName='storagePage') |
131 | @@ -144,3 +162,110 @@ | |||
132 | 144 | def sound_page(self): | 162 | def sound_page(self): |
133 | 145 | """ Return 'Sound' page """ | 163 | """ Return 'Sound' page """ |
134 | 146 | return self.select_single(objectName='soundPage') | 164 | return self.select_single(objectName='soundPage') |
135 | 165 | |||
136 | 166 | |||
137 | 167 | class SoundPage(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): | ||
138 | 168 | |||
139 | 169 | """Autopilot helper for the Sound page.""" | ||
140 | 170 | |||
141 | 171 | @classmethod | ||
142 | 172 | def validate_dbus_object(cls, path, state): | ||
143 | 173 | name = introspection.get_classname_from_path(path) | ||
144 | 174 | if name == b'ItemPage': | ||
145 | 175 | if state['objectName'][1] == 'soundPage': | ||
146 | 176 | return True | ||
147 | 177 | return False | ||
148 | 178 | |||
149 | 179 | |||
150 | 180 | class AboutPage(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): | ||
151 | 181 | |||
152 | 182 | """Autopilot helper for the About page.""" | ||
153 | 183 | |||
154 | 184 | @classmethod | ||
155 | 185 | def validate_dbus_object(cls, path, state): | ||
156 | 186 | name = introspection.get_classname_from_path(path) | ||
157 | 187 | if name == b'ItemPage': | ||
158 | 188 | if state['objectName'][1] == 'aboutPage': | ||
159 | 189 | return True | ||
160 | 190 | return False | ||
161 | 191 | |||
162 | 192 | def get_device_name(self): | ||
163 | 193 | device_label = self.select_single(objectName='deviceLabel') | ||
164 | 194 | return device_label.text | ||
165 | 195 | |||
166 | 196 | def is_serial_visible(self): | ||
167 | 197 | serial_item = self._get_serial_item() | ||
168 | 198 | return serial_item.visible | ||
169 | 199 | |||
170 | 200 | def _get_serial_item(self): | ||
171 | 201 | return self.select_single(objectName='serialItem') | ||
172 | 202 | |||
173 | 203 | def get_serial(self): | ||
174 | 204 | serial_item = self._get_serial_item() | ||
175 | 205 | return serial_item.value | ||
176 | 206 | |||
177 | 207 | def is_imei_visible(self): | ||
178 | 208 | imei_item = self._get_imei_item() | ||
179 | 209 | return imei_item.visible | ||
180 | 210 | |||
181 | 211 | def _get_imei_item(self): | ||
182 | 212 | return self.wait_select_single(objectName='imeiItem') | ||
183 | 213 | |||
184 | 214 | def get_imei(self): | ||
185 | 215 | imei_item = self._get_imei_item() | ||
186 | 216 | return imei_item.value | ||
187 | 217 | |||
188 | 218 | def get_os_information(self): | ||
189 | 219 | os_item = self.select_single(objectName='osItem') | ||
190 | 220 | return os_item.value | ||
191 | 221 | |||
192 | 222 | def get_last_updated_date(self): | ||
193 | 223 | last_updated_item = self.select_single(objectName='lastUpdatedItem') | ||
194 | 224 | return last_updated_item.value | ||
195 | 225 | |||
196 | 226 | @autopilot.logging.log_action(logger.info) | ||
197 | 227 | def go_to_check_for_updates(self): | ||
198 | 228 | check_for_updates_button = self.select_single( | ||
199 | 229 | objectName='updateButton') | ||
200 | 230 | self.pointing_device.click_object(check_for_updates_button) | ||
201 | 231 | system_updates_page = self.get_root_instance().wait_select_single( | ||
202 | 232 | objectName='systemUpdatesPage') | ||
203 | 233 | system_updates_page.active.wait_for(True) | ||
204 | 234 | return system_updates_page | ||
205 | 235 | |||
206 | 236 | @autopilot.logging.log_action(logger.info) | ||
207 | 237 | def go_to_software_licenses(self): | ||
208 | 238 | license_item = self.select_single( | ||
209 | 239 | ubuntuuitoolkit.listitems.Standard, objectName='licenseItem') | ||
210 | 240 | license_item.swipe_into_view() | ||
211 | 241 | self.pointing_device.click_object(license_item) | ||
212 | 242 | licenses_page = self.get_root_instance().wait_select_single( | ||
213 | 243 | objectName='licensesPage') | ||
214 | 244 | licenses_page.active.wait_for(True) | ||
215 | 245 | return licenses_page | ||
216 | 246 | |||
217 | 247 | |||
218 | 248 | class LicensesPage(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): | ||
219 | 249 | |||
220 | 250 | """Autopilot helper for the Licenses page.""" | ||
221 | 251 | |||
222 | 252 | @classmethod | ||
223 | 253 | def validate_dbus_object(cls, path, state): | ||
224 | 254 | name = introspection.get_classname_from_path(path) | ||
225 | 255 | if name == b'ItemPage': | ||
226 | 256 | if state['objectName'][1] == 'licensesPage': | ||
227 | 257 | return True | ||
228 | 258 | return False | ||
229 | 259 | |||
230 | 260 | |||
231 | 261 | class SystemUpdatesPage(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): | ||
232 | 262 | |||
233 | 263 | """Autopilot helper for the System Updates page.""" | ||
234 | 264 | |||
235 | 265 | @classmethod | ||
236 | 266 | def validate_dbus_object(cls, path, state): | ||
237 | 267 | name = introspection.get_classname_from_path(path) | ||
238 | 268 | if name == b'ItemPage': | ||
239 | 269 | if state['objectName'][1] == 'systemUpdatesPage': | ||
240 | 270 | return True | ||
241 | 271 | return False | ||
242 | 147 | 272 | ||
243 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/__init__.py' | |||
244 | --- tests/autopilot/ubuntu_system_settings/tests/__init__.py 2014-06-11 09:36:44 +0000 | |||
245 | +++ tests/autopilot/ubuntu_system_settings/tests/__init__.py 2014-07-09 00:25:18 +0000 | |||
246 | @@ -1,35 +1,42 @@ | |||
247 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
253 | 2 | # Copyright 2013 Canonical | 2 | # |
254 | 3 | # | 3 | # Copyright 2013, 2014 Canonical |
255 | 4 | # This program is free software: you can redistribute it and/or modify it | 4 | # |
256 | 5 | # under the terms of the GNU General Public License version 3, as published | 5 | # This file is part of ubuntu-system-settings |
257 | 6 | # by the Free Software Foundation. | 6 | # |
258 | 7 | # ubuntu-system-settings is free software: you can redistribute it and/or | ||
259 | 8 | # modify it under the terms of the GNU General Public License as published by | ||
260 | 9 | # the Free Software Foundation; version 3. | ||
261 | 10 | # | ||
262 | 11 | # ubuntu-system-settings is distributed in the hope that it will be useful, | ||
263 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
264 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
265 | 14 | # GNU General Public License for more details. | ||
266 | 15 | # | ||
267 | 16 | # You should have received a copy of the GNU General Public License | ||
268 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
269 | 18 | |||
270 | 7 | 19 | ||
271 | 8 | """ Tests for Ubuntu System Settings """ | 20 | """ Tests for Ubuntu System Settings """ |
272 | 9 | 21 | ||
273 | 10 | from __future__ import absolute_import | 22 | from __future__ import absolute_import |
274 | 11 | 23 | ||
275 | 12 | from ubuntu_system_settings import SystemSettings | ||
276 | 13 | |||
277 | 14 | from autopilot.input import Mouse, Touch | ||
278 | 15 | from autopilot.platform import model | ||
279 | 16 | from autopilot.matchers import Eventually | ||
280 | 17 | from testtools.matchers import Equals, NotEquals, GreaterThan | ||
281 | 18 | |||
282 | 19 | from ubuntuuitoolkit.base import UbuntuUIToolkitAppTestCase | ||
283 | 20 | 24 | ||
284 | 21 | import dbus | 25 | import dbus |
285 | 22 | import dbusmock | 26 | import dbusmock |
286 | 23 | import subprocess | 27 | import subprocess |
287 | 24 | 28 | ||
296 | 25 | 29 | import ubuntuuitoolkit | |
297 | 26 | class UbuntuSystemSettingsTestCase(UbuntuUIToolkitAppTestCase): | 30 | from autopilot.matchers import Eventually |
298 | 27 | """ Base class for Ubuntu System Settings """ | 31 | from testtools.matchers import Equals, NotEquals, GreaterThan |
299 | 28 | 32 | ||
300 | 29 | if model() == 'Desktop': | 33 | from ubuntu_system_settings import SystemSettings |
301 | 30 | scenarios = [('with mouse', dict(input_device_class=Mouse))] | 34 | |
302 | 31 | else: | 35 | |
303 | 32 | scenarios = [('with touch', dict(input_device_class=Touch))] | 36 | class UbuntuSystemSettingsTestCase( |
304 | 37 | ubuntuuitoolkit.base.UbuntuUIToolkitAppTestCase): | ||
305 | 38 | |||
306 | 39 | """Base class for Ubuntu System Settings.""" | ||
307 | 33 | 40 | ||
308 | 34 | def setUp(self, panel=None): | 41 | def setUp(self, panel=None): |
309 | 35 | super(UbuntuSystemSettingsTestCase, self).setUp() | 42 | super(UbuntuSystemSettingsTestCase, self).setUp() |
310 | @@ -128,28 +135,23 @@ | |||
311 | 128 | 135 | ||
312 | 129 | 136 | ||
313 | 130 | class AboutBaseTestCase(UbuntuSystemSettingsTestCase): | 137 | class AboutBaseTestCase(UbuntuSystemSettingsTestCase): |
315 | 131 | """ Base class for About this phone tests """ | 138 | |
316 | 139 | """Base class for About this phone tests.""" | ||
317 | 132 | 140 | ||
318 | 133 | def setUp(self): | 141 | def setUp(self): |
323 | 134 | """ Go to About page """ | 142 | """Go to About page.""" |
324 | 135 | super(AboutBaseTestCase, self).setUp('about') | 143 | super(AboutBaseTestCase, self).setUp() |
325 | 136 | self.assertThat(self.system_settings.main_view.about_page.active, | 144 | self.about_page = self.system_settings.main_view.go_to_about_page() |
322 | 137 | Eventually(Equals(True))) | ||
326 | 138 | 145 | ||
327 | 139 | 146 | ||
328 | 140 | class StorageBaseTestCase(AboutBaseTestCase): | 147 | class StorageBaseTestCase(AboutBaseTestCase): |
330 | 141 | """ Base class for Storage page tests """ | 148 | |
331 | 149 | """Base class for Storage page tests.""" | ||
332 | 142 | 150 | ||
333 | 143 | def setUp(self): | 151 | def setUp(self): |
335 | 144 | """ Go to Storage Page """ | 152 | """Go to Storage Page.""" |
336 | 145 | super(StorageBaseTestCase, self).setUp() | 153 | super(StorageBaseTestCase, self).setUp() |
344 | 146 | # Click on 'Storage' option | 154 | self.system_settings.main_view.click_item('storageItem') |
338 | 147 | button = self.system_settings.main_view.about_page.select_single( | ||
339 | 148 | 'Standard', | ||
340 | 149 | objectName='storageItem' | ||
341 | 150 | ) | ||
342 | 151 | self.assertThat(button, NotEquals(None)) | ||
343 | 152 | self.system_settings.main_view.scroll_to_and_click(button) | ||
345 | 153 | self.assertThat(self.storage_page.active, Eventually(Equals(True))) | 155 | self.assertThat(self.storage_page.active, Eventually(Equals(True))) |
346 | 154 | 156 | ||
347 | 155 | def assert_space_item(self, object_name, text): | 157 | def assert_space_item(self, object_name, text): |
348 | @@ -180,36 +182,24 @@ | |||
349 | 180 | 182 | ||
350 | 181 | 183 | ||
351 | 182 | class LicenseBaseTestCase(AboutBaseTestCase): | 184 | class LicenseBaseTestCase(AboutBaseTestCase): |
353 | 183 | """ Base class for Licenses page tests """ | 185 | |
354 | 186 | """Base class for Licenses page tests.""" | ||
355 | 184 | 187 | ||
356 | 185 | def setUp(self): | 188 | def setUp(self): |
358 | 186 | """ Go to License Page """ | 189 | """Go to License Page.""" |
359 | 187 | super(LicenseBaseTestCase, self).setUp() | 190 | super(LicenseBaseTestCase, self).setUp() |
372 | 188 | # Click on 'Software licenses' option | 191 | self.licenses_page = self.about_page.go_to_software_licenses() |
361 | 189 | button = self.system_settings.main_view.select_single( | ||
362 | 190 | 'Standard', | ||
363 | 191 | objectName='licenseItem') | ||
364 | 192 | self.system_settings.main_view.scroll_to_and_click(button) | ||
365 | 193 | |||
366 | 194 | @property | ||
367 | 195 | def licenses_page(self): | ||
368 | 196 | """ Return 'License' page """ | ||
369 | 197 | return self.main_view.wait_select_single( | ||
370 | 198 | 'ItemPage', objectName='licensesPage' | ||
371 | 199 | ) | ||
373 | 200 | 192 | ||
374 | 201 | 193 | ||
375 | 202 | class SystemUpdatesBaseTestCase(UbuntuSystemSettingsTestCase): | 194 | class SystemUpdatesBaseTestCase(UbuntuSystemSettingsTestCase): |
377 | 203 | """ Base class for SystemUpdates page tests """ | 195 | |
378 | 196 | """Base class for SystemUpdates page tests.""" | ||
379 | 204 | 197 | ||
380 | 205 | def setUp(self): | 198 | def setUp(self): |
382 | 206 | """ Go to SystemUpdates Page """ | 199 | """Go to SystemUpdates Page.""" |
383 | 207 | super(SystemUpdatesBaseTestCase, self).setUp() | 200 | super(SystemUpdatesBaseTestCase, self).setUp() |
389 | 208 | # Click on 'System Updates' option | 201 | self.system_settings.main_view.click_item( |
390 | 209 | button = self.system_settings.main_view.select_single( | 202 | 'entryComponent-system-update') |
386 | 210 | objectName='entryComponent-system-update') | ||
387 | 211 | self.assertThat(button, NotEquals(None)) | ||
388 | 212 | self.system_settings.main_view.scroll_to_and_click(button) | ||
391 | 213 | 203 | ||
392 | 214 | 204 | ||
393 | 215 | class SoundBaseTestCase(UbuntuSystemSettingsTestCase): | 205 | class SoundBaseTestCase(UbuntuSystemSettingsTestCase): |
394 | 216 | 206 | ||
395 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_about.py' | |||
396 | --- tests/autopilot/ubuntu_system_settings/tests/test_about.py 2014-07-09 00:25:18 +0000 | |||
397 | +++ tests/autopilot/ubuntu_system_settings/tests/test_about.py 2014-07-09 00:25:18 +0000 | |||
398 | @@ -1,9 +1,20 @@ | |||
399 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
405 | 2 | # Copyright 2013 Canonical | 2 | # |
406 | 3 | # | 3 | # Copyright 2013, 2014 Canonical |
407 | 4 | # This program is free software: you can redistribute it and/or modify it | 4 | # |
408 | 5 | # under the terms of the GNU General Public License version 3, as published | 5 | # This file is part of ubuntu-system-settings |
409 | 6 | # by the Free Software Foundation. | 6 | # |
410 | 7 | # ubuntu-system-settings is free software: you can redistribute it and/or | ||
411 | 8 | # modify it under the terms of the GNU General Public License as published by | ||
412 | 9 | # the Free Software Foundation; version 3. | ||
413 | 10 | # | ||
414 | 11 | # ubuntu-system-settings is distributed in the hope that it will be useful, | ||
415 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
416 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
417 | 14 | # GNU General Public License for more details. | ||
418 | 15 | # | ||
419 | 16 | # You should have received a copy of the GNU General Public License | ||
420 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
421 | 7 | 18 | ||
422 | 8 | import os | 19 | import os |
423 | 9 | import subprocess | 20 | import subprocess |
424 | @@ -27,7 +38,8 @@ | |||
425 | 27 | 38 | ||
426 | 28 | 39 | ||
427 | 29 | class AboutTestCase(AboutBaseTestCase): | 40 | class AboutTestCase(AboutBaseTestCase): |
429 | 30 | """ Tests for About this phone Page """ | 41 | |
430 | 42 | """Tests for About this phone Page.""" | ||
431 | 31 | 43 | ||
432 | 32 | def _get_imei_from_dbus(self): | 44 | def _get_imei_from_dbus(self): |
433 | 33 | bus = dbus.SystemBus() | 45 | bus = dbus.SystemBus() |
434 | @@ -93,37 +105,48 @@ | |||
435 | 93 | else: | 105 | else: |
436 | 94 | return str(info.split()[0]) | 106 | return str(info.split()[0]) |
437 | 95 | 107 | ||
439 | 96 | def test_serial(self): | 108 | def test_device_with_serial_number_must_display_it(self): |
440 | 97 | """Checks whether the UI is showing the correct serial number.""" | 109 | """Checks whether the UI is showing the correct serial number.""" |
448 | 98 | item = self.system_settings.main_view.about_page.select_single( | 110 | device_serial = self._get_device_serial_number() |
449 | 99 | objectName='serialItem' | 111 | if not device_serial: |
450 | 100 | ) | 112 | self.skipTest('The device has no serial number.') |
444 | 101 | serial = self._get_device_serial_number() | ||
445 | 102 | |||
446 | 103 | if not serial: | ||
447 | 104 | self.assertThat(item.visible, Equals(False)) | ||
451 | 105 | else: | 113 | else: |
452 | 114 | self.assertTrue(self.about_page.is_serial_visible()) | ||
453 | 115 | displayed_serial = self.about_page.get_serial() | ||
454 | 106 | self.assertThat( | 116 | self.assertThat( |
459 | 107 | item.value, Equals(self._get_device_serial_number()) | 117 | displayed_serial, Equals(device_serial)) |
460 | 108 | ) | 118 | |
461 | 109 | 119 | def test_device_without_serial_must_not_display_it(self): | |
462 | 110 | def test_imei_information_is_correct(self): | 120 | device_serial = self._get_device_serial_number() |
463 | 121 | if device_serial: | ||
464 | 122 | self.skipTest('The device has serial number.') | ||
465 | 123 | else: | ||
466 | 124 | self.assertFalse(self.about_page.is_serial_visible()) | ||
467 | 125 | |||
468 | 126 | def test_device_with_imei_must_display_it(self): | ||
469 | 111 | """Checks whether the UI is exposing the right IMEI.""" | 127 | """Checks whether the UI is exposing the right IMEI.""" |
473 | 112 | imei_item = self.system_settings.main_view.about_page.wait_select_single( | 128 | device_imei = self._get_imei_from_dbus() |
474 | 113 | objectName='imeiItem') | 129 | if not device_imei: |
475 | 114 | imei_ofono = self._get_imei_from_dbus() | 130 | self.skipTest('The device has no imei.') |
476 | 131 | else: | ||
477 | 132 | self.assertTrue(self.about_page.is_imei_visible()) | ||
478 | 133 | displayed_imei = self.about_page.get_imei() | ||
479 | 134 | self.assertThat(displayed_imei, Equals(device_imei)) | ||
480 | 115 | 135 | ||
483 | 116 | if not imei_ofono: | 136 | def test_device_without_imei_must_not_display_it(self): |
484 | 117 | self.assertThat(imei_item.visible, Equals(False)) | 137 | device_imei = self._get_imei_from_dbus() |
485 | 138 | if device_imei: | ||
486 | 139 | self.skipTest('The device has imei.') | ||
487 | 118 | else: | 140 | else: |
489 | 119 | self.assertEquals(imei_item.value, imei_ofono) | 141 | self.assertFalse(self.about_page.is_imei_visible()) |
490 | 120 | 142 | ||
491 | 121 | def test_settings_show_correct_version_of_the_os(self): | 143 | def test_settings_show_correct_version_of_the_os(self): |
492 | 122 | """Ensure the UI is showing the correct version of the OS.""" | 144 | """Ensure the UI is showing the correct version of the OS.""" |
494 | 123 | item = self.system_settings.main_view.about_page.select_single(objectName='osItem') | 145 | device_os_version = self._get_os_name() |
495 | 146 | displayed_os_info = self.about_page.get_os_information() | ||
496 | 124 | # TODO: find a way to check the image build number as well | 147 | # TODO: find a way to check the image build number as well |
497 | 125 | # -- om26er 10-03-2014 | 148 | # -- om26er 10-03-2014 |
499 | 126 | self.assertTrue(self._get_os_name() in item.value) | 149 | self.assertTrue(device_os_version in displayed_os_info) |
500 | 127 | 150 | ||
501 | 128 | @skipIf(subprocess.call( | 151 | @skipIf(subprocess.call( |
502 | 129 | ['which', 'getprop'], stdout=subprocess.PIPE) != 0, | 152 | ['which', 'getprop'], stdout=subprocess.PIPE) != 0, |
503 | @@ -131,31 +154,26 @@ | |||
504 | 131 | ) | 154 | ) |
505 | 132 | def test_hardware_name(self): | 155 | def test_hardware_name(self): |
506 | 133 | """Ensure the UI is showing the correct device name.""" | 156 | """Ensure the UI is showing the correct device name.""" |
510 | 134 | device_label = self.system_settings.main_view.about_page.select_single( | 157 | displayed_device_name = self.about_page.get_device_name() |
508 | 135 | objectName='deviceLabel' | ||
509 | 136 | ).text | ||
511 | 137 | device_name_from_getprop = self._get_device_manufacturer_and_model() | 158 | device_name_from_getprop = self._get_device_manufacturer_and_model() |
512 | 138 | 159 | ||
514 | 139 | self.assertEquals(device_label, device_name_from_getprop) | 160 | self.assertEquals(displayed_device_name, device_name_from_getprop) |
515 | 140 | 161 | ||
516 | 141 | def test_last_updated(self): | 162 | def test_last_updated(self): |
517 | 142 | """Checks whether Last Updated info is correct.""" | 163 | """Checks whether Last Updated info is correct.""" |
523 | 143 | last_updated = self.system_settings.main_view.about_page.select_single( | 164 | last_updated_date_displayed = self.about_page.get_last_updated_date() |
524 | 144 | objectName='lastUpdatedItem' | 165 | self.assertEquals( |
525 | 145 | ).value | 166 | last_updated_date_displayed, self._get_last_updated_date()) |
521 | 146 | |||
522 | 147 | self.assertEquals(last_updated, self._get_last_updated_date()) | ||
526 | 148 | 167 | ||
527 | 149 | def test_check_for_updates(self): | 168 | def test_check_for_updates(self): |
528 | 150 | """ | 169 | """ |
529 | 151 | Checks whether clicking on Check for Updates brings us | 170 | Checks whether clicking on Check for Updates brings us |
530 | 152 | to the Updates page. | 171 | to the Updates page. |
531 | 153 | """ | 172 | """ |
537 | 154 | update_button = self.system_settings.main_view.about_page.select_single( | 173 | system_updates_page = self.about_page.go_to_check_for_updates() |
538 | 155 | objectName='updateButton') | 174 | self.assertThat( |
539 | 156 | self.system_settings.main_view.pointer.click_object(update_button) | 175 | system_updates_page.visible, Eventually(Equals(True))) |
540 | 157 | self.assertThat(self.system_settings.main_view.updates_page.visible, | 176 | |
536 | 158 | Eventually(Equals(True))) | ||
541 | 159 | 177 | ||
542 | 160 | class StorageTestCase(StorageBaseTestCase): | 178 | class StorageTestCase(StorageBaseTestCase): |
543 | 161 | """ Tests for Storage """ | 179 | """ Tests for Storage """ |
544 | @@ -261,10 +279,12 @@ | |||
545 | 261 | 279 | ||
546 | 262 | 280 | ||
547 | 263 | class LicenseTestCase(LicenseBaseTestCase): | 281 | class LicenseTestCase(LicenseBaseTestCase): |
555 | 264 | """ Tests for Licenses """ | 282 | |
556 | 265 | 283 | """Tests for Licenses.""" | |
557 | 266 | def test_licenses_page(self): | 284 | |
558 | 267 | """ Check whether Storage page is available """ | 285 | def test_open_licenses_page(self): |
559 | 268 | self.assertThat( | 286 | """Check whether Storage page is available.""" |
560 | 269 | self.system_settings.main_view.licenses_page.active, | 287 | # FIXME this is not a good Autopilot tests. It would be better if it |
561 | 270 | Eventually(Equals(True))) | 288 | # opens one of the licenses and checks that it is visible. |
562 | 289 | # --elopio - 2014-07-02 | ||
563 | 290 | self.assertThat(self.licenses_page.active, Equals(True)) | ||
564 | 271 | 291 | ||
565 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_cellular.py' | |||
566 | --- tests/autopilot/ubuntu_system_settings/tests/test_cellular.py 2014-07-09 00:25:18 +0000 | |||
567 | +++ tests/autopilot/ubuntu_system_settings/tests/test_cellular.py 2014-07-09 00:25:18 +0000 | |||
568 | @@ -1,9 +1,20 @@ | |||
569 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
570 | 2 | # | ||
571 | 2 | # Copyright 2014 Canonical | 3 | # Copyright 2014 Canonical |
572 | 3 | # | 4 | # |
576 | 4 | # This program is free software: you can redistribute it and/or modify it | 5 | # This file is part of ubuntu-system-settings |
577 | 5 | # under the terms of the GNU General Public License version 3, as published | 6 | # |
578 | 6 | # by the Free Software Foundation. | 7 | # ubuntu-system-settings is free software: you can redistribute it and/or |
579 | 8 | # modify it under the terms of the GNU General Public License as published by | ||
580 | 9 | # the Free Software Foundation; version 3. | ||
581 | 10 | # | ||
582 | 11 | # ubuntu-system-settings is distributed in the hope that it will be useful, | ||
583 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
584 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
585 | 14 | # GNU General Public License for more details. | ||
586 | 15 | # | ||
587 | 16 | # You should have received a copy of the GNU General Public License | ||
588 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
589 | 7 | 18 | ||
590 | 8 | from autopilot.introspection.dbus import StateNotFoundError | 19 | from autopilot.introspection.dbus import StateNotFoundError |
591 | 9 | from testtools.matchers import Equals, NotEquals, raises | 20 | from testtools.matchers import Equals, NotEquals, raises |
592 | @@ -23,10 +34,11 @@ | |||
593 | 23 | objectName="autoChooseCarrierSelector" | 34 | objectName="autoChooseCarrierSelector" |
594 | 24 | ) | 35 | ) |
595 | 25 | manual = selector.select_single('Label', text=_("Manually")) | 36 | manual = selector.select_single('Label', text=_("Manually")) |
597 | 26 | self.system_settings.main_view.pointer.click_object(manual) | 37 | self.system_settings.main_view.pointing_device.click_object(manual) |
598 | 27 | choosecarrier = self.system_settings.main_view.cellular_page.\ | 38 | choosecarrier = self.system_settings.main_view.cellular_page.\ |
599 | 28 | select_single(objectName="chooseCarrier") | 39 | select_single(objectName="chooseCarrier") |
601 | 29 | self.system_settings.main_view.pointer.click_object(choosecarrier) | 40 | self.system_settings.main_view.pointing_device.click_object( |
602 | 41 | choosecarrier) | ||
603 | 30 | self.assertThat( | 42 | self.assertThat( |
604 | 31 | self.system_settings.main_view.choose_page.title, | 43 | self.system_settings.main_view.choose_page.title, |
605 | 32 | Equals(_("Carrier")) | 44 | Equals(_("Carrier")) |
606 | 33 | 45 | ||
607 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_datetime.py' | |||
608 | --- tests/autopilot/ubuntu_system_settings/tests/test_datetime.py 2014-06-12 10:33:31 +0000 | |||
609 | +++ tests/autopilot/ubuntu_system_settings/tests/test_datetime.py 2014-07-09 00:25:18 +0000 | |||
610 | @@ -65,7 +65,8 @@ | |||
611 | 65 | text_field = self.system_settings.main_view.select_single( | 65 | text_field = self.system_settings.main_view.select_single( |
612 | 66 | objectName='selectTimeZoneField' | 66 | objectName='selectTimeZoneField' |
613 | 67 | ) | 67 | ) |
615 | 68 | self.system_settings.main_view.pointer.move_to_object(text_field) | 68 | self.system_settings.main_view.pointing_device.move_to_object( |
616 | 69 | text_field) | ||
617 | 69 | 70 | ||
618 | 70 | def test_time_date_page(self): | 71 | def test_time_date_page(self): |
619 | 71 | """ Checks whether Time & Date page is available """ | 72 | """ Checks whether Time & Date page is available """ |
620 | @@ -108,7 +109,7 @@ | |||
621 | 108 | objectName='locationsListView' | 109 | objectName='locationsListView' |
622 | 109 | ) | 110 | ) |
623 | 110 | london = TimeDateTestCase.wait_select_listview_first(listview) | 111 | london = TimeDateTestCase.wait_select_listview_first(listview) |
625 | 111 | self.system_settings.main_view.pointer.click_object(london) | 112 | self.system_settings.main_view.pointing_device.click_object(london) |
626 | 112 | header = self.system_settings.main_view.select_single( | 113 | header = self.system_settings.main_view.select_single( |
627 | 113 | objectName='MainView_Header' | 114 | objectName='MainView_Header' |
628 | 114 | ) | 115 | ) |
629 | @@ -128,7 +129,7 @@ | |||
630 | 128 | ) | 129 | ) |
631 | 129 | 130 | ||
632 | 130 | preston = TimeDateTestCase.wait_select_listview_first(listview) | 131 | preston = TimeDateTestCase.wait_select_listview_first(listview) |
634 | 131 | self.system_settings.main_view.pointer.click_object(preston) | 132 | self.system_settings.main_view.pointing_device.click_object(preston) |
635 | 132 | 133 | ||
636 | 133 | # The timer is 1 second, wait and see that we haven't moved pages | 134 | # The timer is 1 second, wait and see that we haven't moved pages |
637 | 134 | sleep(2) | 135 | sleep(2) |
638 | 135 | 136 | ||
639 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_search.py' | |||
640 | --- tests/autopilot/ubuntu_system_settings/tests/test_search.py 2014-05-27 15:56:15 +0000 | |||
641 | +++ tests/autopilot/ubuntu_system_settings/tests/test_search.py 2014-07-09 00:25:18 +0000 | |||
642 | @@ -1,11 +1,21 @@ | |||
643 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
649 | 2 | # Copyright 2013 Canonical | 2 | # |
650 | 3 | # | 3 | # Copyright 2013, 2014 Canonical |
651 | 4 | # This program is free software: you can redistribute it and/or modify it | 4 | # |
652 | 5 | # under the terms of the GNU General Public License version 3, as published | 5 | # This file is part of ubuntu-system-settings |
653 | 6 | # by the Free Software Foundation. | 6 | # |
654 | 7 | # ubuntu-system-settings is free software: you can redistribute it and/or | ||
655 | 8 | # modify it under the terms of the GNU General Public License as published by | ||
656 | 9 | # the Free Software Foundation; version 3. | ||
657 | 10 | # | ||
658 | 11 | # ubuntu-system-settings is distributed in the hope that it will be useful, | ||
659 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
660 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
661 | 14 | # GNU General Public License for more details. | ||
662 | 15 | # | ||
663 | 16 | # You should have received a copy of the GNU General Public License | ||
664 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
665 | 7 | 18 | ||
666 | 8 | from autopilot.introspection.dbus import StateNotFoundError | ||
667 | 9 | from testtools.matchers import Equals | 19 | from testtools.matchers import Equals |
668 | 10 | from autopilot.matchers import Eventually | 20 | from autopilot.matchers import Eventually |
669 | 11 | 21 | ||
670 | 12 | 22 | ||
671 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_sound.py' | |||
672 | --- tests/autopilot/ubuntu_system_settings/tests/test_sound.py 2014-06-11 09:38:03 +0000 | |||
673 | +++ tests/autopilot/ubuntu_system_settings/tests/test_sound.py 2014-07-09 00:25:18 +0000 | |||
674 | @@ -1,9 +1,21 @@ | |||
675 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
676 | 2 | # | ||
677 | 2 | # Copyright 2014 Canonical | 3 | # Copyright 2014 Canonical |
678 | 3 | # | 4 | # |
682 | 4 | # This program is free software: you can redistribute it and/or modify it | 5 | # This file is part of ubuntu-system-settings |
683 | 5 | # under the terms of the GNU General Public License version 3, as published | 6 | # |
684 | 6 | # by the Free Software Foundation. | 7 | # ubuntu-system-settings is free software: you can redistribute it and/or |
685 | 8 | # modify it under the terms of the GNU General Public License as published by | ||
686 | 9 | # the Free Software Foundation; version 3. | ||
687 | 10 | # | ||
688 | 11 | # ubuntu-system-settings is distributed in the hope that it will be useful, | ||
689 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
690 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
691 | 14 | # GNU General Public License for more details. | ||
692 | 15 | # | ||
693 | 16 | # You should have received a copy of the GNU General Public License | ||
694 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
695 | 18 | |||
696 | 7 | 19 | ||
697 | 8 | from testtools.matchers import Equals, NotEquals | 20 | from testtools.matchers import Equals, NotEquals |
698 | 9 | 21 | ||
699 | @@ -30,5 +42,6 @@ | |||
700 | 30 | kbd_snd = self.system_settings.main_view.sound_page.select_single( | 42 | kbd_snd = self.system_settings.main_view.sound_page.select_single( |
701 | 31 | objectName="keyboardSoundSwitch") | 43 | objectName="keyboardSoundSwitch") |
702 | 32 | current_value = kbd_snd.get_properties()["checked"] | 44 | current_value = kbd_snd.get_properties()["checked"] |
705 | 33 | self.system_settings.main_view.pointer.click_object(kbd_snd) | 45 | self.system_settings.main_view.pointing_device.click_object(kbd_snd) |
706 | 34 | self.assertThat(kbd_snd.get_properties()["checked"], NotEquals(current_value)) | 46 | self.assertThat( |
707 | 47 | kbd_snd.get_properties()["checked"], NotEquals(current_value)) |
FAILED: Continuous integration, rev:760 jenkins. qa.ubuntu. com/job/ ubuntu- system- settings- ci/923/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- utopic- touch/1513 jenkins. qa.ubuntu. com/job/ generic- mediumtests- utopic/ 1309 jenkins. qa.ubuntu. com/job/ ubuntu- system- settings- utopic- amd64-ci/ 115 jenkins. qa.ubuntu. com/job/ ubuntu- system- settings- utopic- armhf-ci/ 115 jenkins. qa.ubuntu. com/job/ ubuntu- system- settings- utopic- armhf-ci/ 115/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ ubuntu- system- settings- utopic- i386-ci/ 115 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- mako/1795 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/2490 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/2490/ artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 9224 jenkins. qa.ubuntu. com/job/ autopilot- testrunner- otto-utopic/ 1080 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- amd64/1469 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- amd64/1469/ artifact/ work/output/ *zip*/output. zip
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/ubuntu- system- settings- ci/923/ rebuild
http://