Merge lp:~ken-vandine/ubuntu-system-settings/rtm-less_flaky into lp:ubuntu-system-settings/rtm-14.09
- rtm-less_flaky
- Merge into rtm-14.09
Status: | Merged |
---|---|
Approved by: | Ken VanDine |
Approved revision: | 960 |
Merged at revision: | 961 |
Proposed branch: | lp:~ken-vandine/ubuntu-system-settings/rtm-less_flaky |
Merge into: | lp:ubuntu-system-settings/rtm-14.09 |
Diff against target: |
1519 lines (+321/-299) 14 files modified
debian/control (+1/-0) tests/autopilot/ubuntu_system_settings/__init__.py (+40/-27) tests/autopilot/ubuntu_system_settings/tests/__init__.py (+54/-66) tests/autopilot/ubuntu_system_settings/tests/test_about.py (+10/-15) tests/autopilot/ubuntu_system_settings/tests/test_background.py (+5/-5) tests/autopilot/ubuntu_system_settings/tests/test_datetime.py (+19/-24) tests/autopilot/ubuntu_system_settings/tests/test_main.py (+4/-4) tests/autopilot/ubuntu_system_settings/tests/test_phone.py (+3/-20) tests/autopilot/ubuntu_system_settings/tests/test_phone_sound.py (+32/-0) tests/autopilot/ubuntu_system_settings/tests/test_plugins.py (+18/-18) tests/autopilot/ubuntu_system_settings/tests/test_search.py (+4/-4) tests/autopilot/ubuntu_system_settings/tests/test_security.py (+88/-67) tests/autopilot/ubuntu_system_settings/tests/test_sound.py (+36/-42) tests/autopilot/ubuntu_system_settings/tests/test_wifi.py (+7/-7) |
To merge this branch: | bzr merge lp:~ken-vandine/ubuntu-system-settings/rtm-less_flaky |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Needs Fixing | |
Jonas G. Drange (community) | Approve | ||
Review via email: mp+244357@code.launchpad.net |
Commit message
Tiny step towards improved use of the preferred page-object model, hopefully making some tests more reliable.
Description of the change
Tiny step towards improved use of the preferred page-object model, hopefully making some tests more reliable.
- 946. By Ken VanDine
-
Support UPower 0.99
Fixes: #1337200, #1390629 - 947. By CI Train Bot Account
-
Releasing 0.3+15.
04.20141210~ rtm-0ubuntu1
PS Jenkins bot (ps-jenkins) wrote : | # |
- 948. By Ken VanDine
-
[cellular] split "Cellular Data" and "Connection type" into two separate pieces in the UI for both single and multi SIM Fixes: #1377455, #1378812
Approved by: Jonas G. Drange - 949. By Jonas G. Drange
-
[cellular] Use a repeater to lay out two separate ItemSelectors for modems, making sure it works well between connMan power cycles Fixes: #1377455
- 950. By CI Train Bot Account
-
Releasing 0.3+15.
04.20141211~ rtm-0ubuntu1 - 951. By Ted Gould
-
Make silent mode use the action state in the sound user service Fixes: #1382089, #1388804, #1395709
Approved by: Ken VanDine - 952. By Ken VanDine
-
[system-update] remember the latest SystemUpdate downloaded and compare
the version when checking again and set updateReady appropriately. This
fixes the handling of downloaded updates when auto-download is false. Fixes: #1392051
Approved by: PS Jenkins bot - 953. By Ken VanDine
-
[orientation] String change to Rotation Lock
Approved by: Sebastien Bacher, PS Jenkins bot
- 954. By CI Train Bot <${CITRAIN_USER}@canonical.com>
-
Releasing 0.3+15.
04.20150106~ rtm-0ubuntu1
- 955. By Ken VanDine
-
[about] use SingleValueStacked for all information bits in the version panel
Approved by: Sebastien Bacher - 956. By CI Train Bot <${CITRAIN_USER}@canonical.com>
-
Releasing 0.3+15.
04.20150107~ rtm-0ubuntu1 - 957. By Jonas G. Drange
-
[about] use networkinfo to pull the wifi device MAC Fixes: #1399723
Approved by: Ken VanDine - 958. By CI Train Bot Account
-
Releasing 0.3+15.
04.20150109~ rtm-0ubuntu1 - 959. By Ken VanDine
-
Tiny step towards improved use of the preferred page-object model, hopefully making some tests more reliable.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:959
http://
Executed test runs:
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 960. By Ken VanDine
-
AboutPage is an ItemPage, fix the test accordingly.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:960
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 961. By Ken VanDine
-
Make ubuntu-
system- settings- autopilot explicitly depend on python3-evdev
Preview Diff
1 | === modified file 'debian/control' |
2 | --- debian/control 2014-12-04 14:58:47 +0000 |
3 | +++ debian/control 2015-01-14 02:48:46 +0000 |
4 | @@ -139,6 +139,7 @@ |
5 | python3-autopilot, |
6 | python3-dbusmock (>= 0.10.1), |
7 | python3-dateutil, |
8 | + python3-evdev, |
9 | libautopilot-qt, |
10 | ubuntu-ui-toolkit-autopilot, |
11 | dpkg-dev, |
12 | |
13 | === modified file 'tests/autopilot/ubuntu_system_settings/__init__.py' |
14 | --- tests/autopilot/ubuntu_system_settings/__init__.py 2014-11-18 20:13:35 +0000 |
15 | +++ tests/autopilot/ubuntu_system_settings/__init__.py 2015-01-14 02:48:46 +0000 |
16 | @@ -119,6 +119,27 @@ |
17 | def go_to_cellular_page(self): |
18 | return self._go_to_page('entryComponent-cellular', 'cellularPage') |
19 | |
20 | + @autopilot.logging.log_action(logger.debug) |
21 | + def go_to_phone_page(self): |
22 | + return self._go_to_page('entryComponent-phone', 'phonePage') |
23 | + |
24 | + @autopilot.logging.log_action(logger.debug) |
25 | + def go_to_about_page(self): |
26 | + return self._go_to_page('entryComponent-about', 'aboutPage') |
27 | + |
28 | + @autopilot.logging.log_action(logger.debug) |
29 | + def go_to_sound_page(self): |
30 | + return self._go_to_page('entryComponent-sound', 'soundPage') |
31 | + |
32 | + @autopilot.logging.log_action(logger.debug) |
33 | + def go_to_security_page(self): |
34 | + return self._go_to_page('entryComponent-security-privacy', |
35 | + 'securityPrivacyPage') |
36 | + |
37 | + @autopilot.logging.log_action(logger.debug) |
38 | + def go_to_datetime_page(self): |
39 | + return self._go_to_page('entryComponent-time-date', 'timeDatePage') |
40 | + |
41 | def _go_to_page(self, item_object_name, page_object_name): |
42 | self.click_item(item_object_name) |
43 | page = self.wait_select_single(objectName=page_object_name) |
44 | @@ -150,11 +171,6 @@ |
45 | return self.select_single(objectName='systemSettingsPage') |
46 | |
47 | @property |
48 | - def cellular_page(self): |
49 | - """ Return 'Cellular' page """ |
50 | - return self.select_single(objectName='cellularPage') |
51 | - |
52 | - @property |
53 | def choose_page(self): |
54 | """ Return 'Choose carrier' page """ |
55 | return self.select_single(objectName="chooseCarrierPage") |
56 | @@ -175,26 +191,6 @@ |
57 | return self.select_single(objectName='backgroundPage') |
58 | |
59 | @property |
60 | - def sound_page(self): |
61 | - """ Return 'Sound' page """ |
62 | - return self.select_single(objectName='soundPage') |
63 | - |
64 | - @property |
65 | - def security_page(self): |
66 | - """ Return 'Security' page """ |
67 | - return self.select_single(objectName='securityPrivacyPage') |
68 | - |
69 | - @property |
70 | - def about_page(self): |
71 | - """ Return 'About' page """ |
72 | - return self.select_single(objectName='aboutPage') |
73 | - |
74 | - @property |
75 | - def wifi_page(self): |
76 | - """ Return 'Wifi' page """ |
77 | - return self.select_single(objectName='wifiPage') |
78 | - |
79 | - @property |
80 | def _orientation_lock_switch(self): |
81 | return self.wait_select_single( |
82 | ubuntuuitoolkit.CheckBox, |
83 | @@ -209,7 +205,7 @@ |
84 | |
85 | class CellularPage(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): |
86 | |
87 | - """Autopilot helper for the Sound page.""" |
88 | + """Autopilot helper for the Cellular page.""" |
89 | |
90 | @classmethod |
91 | def validate_dbus_object(cls, path, state): |
92 | @@ -380,7 +376,7 @@ |
93 | |
94 | class TimeAndDatePage(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): |
95 | |
96 | - """Autopilot helper for the Sound page.""" |
97 | + """Autopilot helper for the TimeAndDate page.""" |
98 | |
99 | @classmethod |
100 | def validate_dbus_object(cls, path, state): |
101 | @@ -454,6 +450,7 @@ |
102 | def go_to_check_for_updates(self): |
103 | check_for_updates_button = self.select_single( |
104 | objectName='updateButton') |
105 | + check_for_updates_button.swipe_into_view() |
106 | self.pointing_device.click_object(check_for_updates_button) |
107 | system_updates_page = self.get_root_instance().wait_select_single( |
108 | objectName='systemUpdatesPage') |
109 | @@ -471,6 +468,10 @@ |
110 | licenses_page.active.wait_for(True) |
111 | return licenses_page |
112 | |
113 | + def get_number(self, obj): |
114 | + number = self.select_single(objectName=obj) |
115 | + return number.value |
116 | + |
117 | |
118 | class LicensesPage(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): |
119 | |
120 | @@ -566,6 +567,18 @@ |
121 | |
122 | return self._go_to_page(find, 'servicesPage') |
123 | |
124 | + @property |
125 | + def _dialpad_sounds(self): |
126 | + return self.wait_select_single( |
127 | + ubuntuuitoolkit.CheckBox, |
128 | + objectName='dialpadSounds') |
129 | + |
130 | + def enable_dialpad_sounds(self): |
131 | + self._dialpad_sounds.check() |
132 | + |
133 | + def disable_dialpad_sounds(self): |
134 | + self._dialpad_sounds.uncheck() |
135 | + |
136 | |
137 | class CallWaiting(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): |
138 | |
139 | |
140 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/__init__.py' |
141 | --- tests/autopilot/ubuntu_system_settings/tests/__init__.py 2015-01-06 21:40:27 +0000 |
142 | +++ tests/autopilot/ubuntu_system_settings/tests/__init__.py 2015-01-14 02:48:46 +0000 |
143 | @@ -60,8 +60,9 @@ |
144 | def setUp(self, panel=None): |
145 | super(UbuntuSystemSettingsTestCase, self).setUp() |
146 | self.system_settings = SystemSettings(self, panel=panel) |
147 | + self.main_view = self.system_settings.main_view |
148 | self.assertThat( |
149 | - self.system_settings.main_view.visible, |
150 | + self.main_view.visible, |
151 | Eventually(Equals(True))) |
152 | |
153 | def set_orientation(self, gsettings, value): |
154 | @@ -109,10 +110,6 @@ |
155 | def setUp(self): |
156 | super(UbuntuSystemSettingsBatteryTestCase, self).setUp() |
157 | self.add_mock_battery() |
158 | - self.system_settings = SystemSettings(self) |
159 | - self.assertThat( |
160 | - self.system_settings.main_view.visible, |
161 | - Eventually(Equals(True))) |
162 | |
163 | |
164 | class UbuntuSystemSettingsOfonoTestCase(UbuntuSystemSettingsTestCase, |
165 | @@ -124,14 +121,14 @@ |
166 | @property |
167 | def choose_carrier_page(self): |
168 | """Return carrier selection page""" |
169 | - return self.system_settings.main_view.select_single( |
170 | + return self.main_view.select_single( |
171 | objectName='chooseCarrierPage' |
172 | ) |
173 | |
174 | @property |
175 | def choose_carriers_page(self): |
176 | """Return carriers selection page""" |
177 | - return self.system_settings.main_view.select_single( |
178 | + return self.main_view.select_single( |
179 | objectName='chooseCarriersPage' |
180 | ) |
181 | |
182 | @@ -289,6 +286,12 @@ |
183 | template, stdout=subprocess.PIPE) |
184 | cls.dbusmock = dbus.Interface(cls.obj_ofono, dbusmock.MOCK_IFACE) |
185 | |
186 | + @classmethod |
187 | + def tearDownClass(cls): |
188 | + super(UbuntuSystemSettingsOfonoTestCase, cls).tearDownClass() |
189 | + cls.p_mock.terminate() |
190 | + cls.p_mock.wait() |
191 | + |
192 | def setUp(self, panel=None): |
193 | self.obj_ofono.Reset() |
194 | |
195 | @@ -296,7 +299,7 @@ |
196 | if self.use_sims == 2: |
197 | self.add_sim2() |
198 | |
199 | - super(UbuntuSystemSettingsOfonoTestCase, self).setUp(panel) |
200 | + super(UbuntuSystemSettingsOfonoTestCase, self).setUp() |
201 | |
202 | def set_default_for_calls(self, gsettings, default): |
203 | gsettings.set_value('default-sim-for-calls', default) |
204 | @@ -309,12 +312,12 @@ |
205 | sleep(1) |
206 | |
207 | def get_default_sim_for_calls_selector(self, text): |
208 | - return self.system_settings.main_view.cellular_page.select_single( |
209 | + return self.cellular_page.select_single( |
210 | objectName="defaultForCalls" + text |
211 | ) |
212 | |
213 | def get_default_sim_for_messages_selector(self, text): |
214 | - return self.system_settings.main_view.cellular_page.select_single( |
215 | + return self.cellular_page.select_single( |
216 | objectName="defaultForMessages" + text |
217 | ) |
218 | |
219 | @@ -324,35 +327,28 @@ |
220 | def setUp(self): |
221 | """ Go to Cellular page """ |
222 | super(CellularBaseTestCase, self).setUp() |
223 | - self.cellular_page = self.system_settings.\ |
224 | - main_view.go_to_cellular_page() |
225 | + self.cellular_page = self.main_view.go_to_cellular_page() |
226 | |
227 | |
228 | class PhoneOfonoBaseTestCase(UbuntuSystemSettingsOfonoTestCase): |
229 | def setUp(self): |
230 | """ Go to Phone page """ |
231 | - super(PhoneOfonoBaseTestCase, self).setUp('phone') |
232 | - self.phone_page = self.system_settings.main_view.select_single( |
233 | - objectName='phonePage' |
234 | - ) |
235 | + super(PhoneOfonoBaseTestCase, self).setUp() |
236 | + self.phone_page = self.main_view.go_to_phone_page() |
237 | |
238 | |
239 | class AboutBaseTestCase(UbuntuSystemSettingsTestCase): |
240 | def setUp(self): |
241 | """Go to About page.""" |
242 | - super(AboutBaseTestCase, self).setUp('about') |
243 | - self.about_page = self.system_settings.main_view.select_single( |
244 | - objectName='aboutPage' |
245 | - ) |
246 | + super(AboutBaseTestCase, self).setUp() |
247 | + self.about_page = self.main_view.go_to_about_page() |
248 | |
249 | |
250 | class AboutOfonoBaseTestCase(UbuntuSystemSettingsOfonoTestCase): |
251 | def setUp(self): |
252 | """Go to About page.""" |
253 | - super(AboutOfonoBaseTestCase, self).setUp('about') |
254 | - self.about_page = self.system_settings.main_view.select_single( |
255 | - objectName='aboutPage' |
256 | - ) |
257 | + super(AboutOfonoBaseTestCase, self).setUp() |
258 | + self.about_page = self.main_view.go_to_about_page() |
259 | |
260 | |
261 | class AboutSystemImageBaseTestCase(AboutBaseTestCase, |
262 | @@ -396,12 +392,15 @@ |
263 | def setUp(self): |
264 | """Go to Storage Page.""" |
265 | super(StorageBaseTestCase, self).setUp() |
266 | - self.system_settings.main_view.click_item('storageItem') |
267 | + self.main_view.click_item('storageItem') |
268 | + self.storage_page = self.main_view.select_single( |
269 | + 'Storage', objectName='storagePage' |
270 | + ) |
271 | self.assertThat(self.storage_page.active, Eventually(Equals(True))) |
272 | |
273 | def assert_space_item(self, object_name, text): |
274 | """ Checks whether an space item exists and returns a value """ |
275 | - item = self.system_settings.main_view.storage_page.select_single( |
276 | + item = self.main_view.storage_page.select_single( |
277 | objectName=object_name |
278 | ) |
279 | self.assertThat(item, NotEquals(None)) |
280 | @@ -417,13 +416,6 @@ |
281 | return self.main_view.wait_select_single( |
282 | 'StorageItem', objectName=objectName).value |
283 | |
284 | - @property |
285 | - def storage_page(self): |
286 | - """ Return 'Storage' page """ |
287 | - return self.system_settings.main_view.select_single( |
288 | - 'Storage', objectName='storagePage' |
289 | - ) |
290 | - |
291 | |
292 | class LicenseBaseTestCase(AboutBaseTestCase): |
293 | |
294 | @@ -442,8 +434,7 @@ |
295 | def setUp(self): |
296 | """Go to SystemUpdates Page.""" |
297 | super(SystemUpdatesBaseTestCase, self).setUp() |
298 | - self.system_settings.main_view.click_item( |
299 | - 'entryComponent-system-update') |
300 | + self.main_view.click_item('entryComponent-system-update') |
301 | |
302 | |
303 | class BackgroundBaseTestCase( |
304 | @@ -515,7 +506,7 @@ |
305 | 'SYSTEM_SETTINGS_UBUNTU_ART_DIR', art_dir)) |
306 | |
307 | super(BackgroundBaseTestCase, self).setUp('background') |
308 | - self.assertThat(self.system_settings.main_view.background_page.active, |
309 | + self.assertThat(self.main_view.background_page.active, |
310 | Eventually(Equals(True))) |
311 | |
312 | def tearDown(self): |
313 | @@ -532,11 +523,14 @@ |
314 | @classmethod |
315 | def setUpClass(klass): |
316 | klass.start_system_bus() |
317 | - klass.start_session_bus() |
318 | klass.dbus_con = klass.get_dbus(True) |
319 | klass.dbus_con_session = klass.get_dbus(False) |
320 | |
321 | def setUp(self, panel='sound'): |
322 | + # TODO only do this if the sound indicator is running. |
323 | + # --elopio - 2015-01-08 |
324 | + self.stop_sound_indicator() |
325 | + self.addCleanup(self.start_sound_indicator) |
326 | |
327 | user_obj = '/user/foo' |
328 | |
329 | @@ -562,7 +556,9 @@ |
330 | GTK_ACTIONS_IFACE, |
331 | stdout=subprocess.PIPE) |
332 | |
333 | - sleep(2) |
334 | + self.wait_for_bus_object(ACCOUNTS_IFACE, |
335 | + ACCOUNTS_OBJ, |
336 | + system_bus=True) |
337 | |
338 | self.dbus_mock = dbus.Interface(self.dbus_con.get_object( |
339 | ACCOUNTS_IFACE, |
340 | @@ -570,6 +566,9 @@ |
341 | ACCOUNTS_IFACE), |
342 | dbusmock.MOCK_IFACE) |
343 | |
344 | + self.wait_for_bus_object(ISOUND_SERVICE, |
345 | + ISOUND_ACTION_PATH) |
346 | + |
347 | self.dbus_mock_isound = dbus.Interface( |
348 | self.dbus_con_session.get_object( |
349 | ISOUND_SERVICE, |
350 | @@ -626,8 +625,8 @@ |
351 | ACCOUNTS_SOUND_IFACE) |
352 | ]) |
353 | |
354 | - self.obj_test = self.dbus_con.get_object(ACCOUNTS_IFACE, user_obj, |
355 | - ACCOUNTS_IFACE) |
356 | + self.obj_snd = self.dbus_con.get_object(ACCOUNTS_IFACE, user_obj, |
357 | + ACCOUNTS_IFACE) |
358 | |
359 | self.dbus_mock_isound.AddMethods( |
360 | GTK_ACTIONS_IFACE, |
361 | @@ -661,9 +660,11 @@ |
362 | |
363 | super(SoundBaseTestCase, self).setUp(panel) |
364 | |
365 | - """ Go to Sound page """ |
366 | if panel == 'sound': |
367 | - self.assertThat(self.system_settings.main_view.sound_page.active, |
368 | + self.sound_page = self.main_view.select_single( |
369 | + objectName='soundPage' |
370 | + ) |
371 | + self.assertThat(self.sound_page.active, |
372 | Eventually(Equals(True))) |
373 | |
374 | def tearDown(self): |
375 | @@ -673,6 +674,12 @@ |
376 | self.mock_isound.wait() |
377 | super(SoundBaseTestCase, self).tearDown() |
378 | |
379 | + def start_sound_indicator(self): |
380 | + subprocess.call(['initctl', 'start', 'indicator-sound']) |
381 | + |
382 | + def stop_sound_indicator(self): |
383 | + subprocess.call(['initctl', 'stop', 'indicator-sound']) |
384 | + |
385 | |
386 | class ResetBaseTestCase(UbuntuSystemSettingsTestCase, |
387 | dbusmock.DBusTestCase): |
388 | @@ -698,7 +705,7 @@ |
389 | def setUp(self): |
390 | self.mock_for_factory_reset() |
391 | super(ResetBaseTestCase, self).setUp() |
392 | - self.reset_page = self.system_settings.main_view.go_to_reset_phone() |
393 | + self.reset_page = self.main_view.go_to_reset_phone() |
394 | |
395 | def tearDown(self): |
396 | self.mock_server.terminate() |
397 | @@ -710,30 +717,13 @@ |
398 | """ Base class for security and privacy settings tests""" |
399 | |
400 | def setUp(self): |
401 | - super(SecurityBaseTestCase, self).setUp('security-privacy') |
402 | - """ Go to Security & Privacy page """ |
403 | - self.security_page = self.system_settings.main_view.select_single( |
404 | - objectName='securityPrivacyPage' |
405 | - ) |
406 | - self.assertThat(self.security_page.active, |
407 | - Eventually(Equals(True))) |
408 | + super(SecurityBaseTestCase, self).setUp() |
409 | + self.security_page = self.main_view.go_to_security_page() |
410 | |
411 | def tearDown(self): |
412 | super(SecurityBaseTestCase, self).tearDown() |
413 | |
414 | |
415 | -class PhoneSoundBaseTestCase(SoundBaseTestCase): |
416 | - def setUp(self): |
417 | - """ Go to Phone page """ |
418 | - super(PhoneSoundBaseTestCase, self).setUp('phone') |
419 | - self.phone_page = self.system_settings.main_view.select_single( |
420 | - objectName='phonePage' |
421 | - ) |
422 | - |
423 | - def tearDown(self): |
424 | - super(PhoneSoundBaseTestCase, self).tearDown() |
425 | - |
426 | - |
427 | class LanguageBaseTestCase(UbuntuSystemSettingsTestCase, |
428 | dbusmock.DBusTestCase): |
429 | """ Base class for language settings tests""" |
430 | @@ -759,8 +749,7 @@ |
431 | self.mock_loginmanager() |
432 | |
433 | super(LanguageBaseTestCase, self).setUp() |
434 | - self.language_page = self.system_settings.\ |
435 | - main_view.go_to_language_page() |
436 | + self.language_page = self.main_view.go_to_language_page() |
437 | |
438 | def tearDown(self): |
439 | self.mock_server.terminate() |
440 | @@ -799,8 +788,7 @@ |
441 | pass |
442 | |
443 | super(WifiBaseTestCase, self).setUp() |
444 | - self.wifi_page = self.system_settings.\ |
445 | - main_view.go_to_wifi_page() |
446 | + self.wifi_page = self.main_view.go_to_wifi_page() |
447 | |
448 | def add_previous_networks(self, networks): |
449 | dev_path = str(self.obj_nm.GetDevices()[0]) |
450 | |
451 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_about.py' |
452 | --- tests/autopilot/ubuntu_system_settings/tests/test_about.py 2014-09-03 14:48:02 +0000 |
453 | +++ tests/autopilot/ubuntu_system_settings/tests/test_about.py 2015-01-14 02:48:46 +0000 |
454 | @@ -140,10 +140,8 @@ |
455 | self.assertFalse(self.about_page.is_imei_visible()) |
456 | |
457 | def test_phone_number(self): |
458 | - number = self.system_settings.main_view.about_page.select_single( |
459 | - objectName="numberItem" |
460 | - ) |
461 | - self.assertEqual(str(number.value), "123456789") |
462 | + self.assertEqual(str(self.about_page.get_number('numberItem')), |
463 | + '123456789') |
464 | |
465 | |
466 | class AboutOfonoMultiSimTestCase(AboutOfonoBaseTestCase): |
467 | @@ -151,14 +149,10 @@ |
468 | use_sims = 2 |
469 | |
470 | def test_phone_numbers(self): |
471 | - number1 = self.system_settings.main_view.about_page.select_single( |
472 | - objectName="numberItem1" |
473 | - ) |
474 | - number2 = self.system_settings.main_view.about_page.select_single( |
475 | - objectName="numberItem2" |
476 | - ) |
477 | - self.assertEqual(str(number1.value), "123456789") |
478 | - self.assertEqual(str(number2.value), "08123") |
479 | + self.assertEqual(str(self.about_page.get_number('numberItem1')), |
480 | + '123456789') |
481 | + self.assertEqual(str(self.about_page.get_number('numberItem2')), |
482 | + '08123') |
483 | |
484 | |
485 | class AboutSystemImageTestCase(AboutSystemImageBaseTestCase): |
486 | @@ -226,7 +220,7 @@ |
487 | |
488 | def test_disk(self): |
489 | """ Checks whether disk item is available """ |
490 | - disk_item = self.system_settings.main_view.storage_page.select_single( |
491 | + disk_item = self.storage_page.select_single( |
492 | objectName='diskItem' |
493 | ) |
494 | self.assertThat(disk_item.text, Equals('Total storage')) |
495 | @@ -293,8 +287,9 @@ |
496 | |
497 | def test_installed_apps(self): |
498 | """ Checks whether Installed Apps list is available """ |
499 | - installed_apps_list_view = self.system_settings.main_view.\ |
500 | - storage_page.select_single(objectName='installedAppsListView') |
501 | + installed_apps_list_view = self.storage_page.select_single( |
502 | + objectName='installedAppsListView' |
503 | + ) |
504 | self.assertThat(installed_apps_list_view, NotEquals(None)) |
505 | |
506 | |
507 | |
508 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_background.py' |
509 | --- tests/autopilot/ubuntu_system_settings/tests/test_background.py 2014-07-22 21:44:35 +0000 |
510 | +++ tests/autopilot/ubuntu_system_settings/tests/test_background.py 2015-01-14 02:48:46 +0000 |
511 | @@ -24,7 +24,7 @@ |
512 | |
513 | def setUp(self): |
514 | super(BackgroundTestCase, self).setUp() |
515 | - self.background_page = self.system_settings.main_view.background_page |
516 | + self.background_page = self.main_view.background_page |
517 | |
518 | def get_wallpapergrid(self, name): |
519 | """Return a WallpaperGrid with given name, or |
520 | @@ -64,9 +64,9 @@ |
521 | |
522 | def save_wallpaper(self): |
523 | """Click on Set/Save button when previewing a wallpaper""" |
524 | - save = self.system_settings.main_view.wait_select_single( |
525 | + save = self.main_view.wait_select_single( |
526 | objectName='saveButton') |
527 | - self.system_settings.main_view.scroll_to_and_click(save) |
528 | + self.main_view.scroll_to_and_click(save) |
529 | |
530 | def test_background_page_title_is_correct(self): |
531 | """ Checks whether Background page is available """ |
532 | @@ -79,7 +79,7 @@ |
533 | old = self.selected_wallpaper.source |
534 | |
535 | # click a wallpaper that is not selected |
536 | - self.system_settings.main_view.scroll_to_and_click( |
537 | + self.main_view.scroll_to_and_click( |
538 | self.all_wallpapers[3]) |
539 | |
540 | # click set/save |
541 | @@ -112,5 +112,5 @@ |
542 | objectName='CustomHeader') |
543 | |
544 | self.assertEqual(custom.state, 'collapsed') |
545 | - self.system_settings.main_view.scroll_to_and_click(custom_header) |
546 | + self.main_view.scroll_to_and_click(custom_header) |
547 | self.assertEqual(custom.state, '') |
548 | |
549 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_datetime.py' |
550 | --- tests/autopilot/ubuntu_system_settings/tests/test_datetime.py 2014-07-18 12:57:19 +0000 |
551 | +++ tests/autopilot/ubuntu_system_settings/tests/test_datetime.py 2015-01-14 02:48:46 +0000 |
552 | @@ -39,17 +39,12 @@ |
553 | def setUp(self): |
554 | """ Go to Time & Date page """ |
555 | self.obj_timedate1.Reset() |
556 | - super(TimeDateTestCase, self).setUp("time-date") |
557 | - |
558 | - @property |
559 | - def time_date_page(self): |
560 | - return self.system_settings.main_view.select_single( |
561 | - objectName='timeDatePage' |
562 | - ) |
563 | + super(TimeDateTestCase, self).setUp() |
564 | + self.page = self.main_view.go_to_datetime_page() |
565 | |
566 | @property |
567 | def tz_page(self): |
568 | - return self.system_settings.main_view.select_single( |
569 | + return self.main_view.select_single( |
570 | objectName='timeZone' |
571 | ) |
572 | |
573 | @@ -67,22 +62,22 @@ |
574 | raise e |
575 | |
576 | def click_tz_search_field(self): |
577 | - self.system_settings.main_view.scroll_to_and_click(self.tz_page) |
578 | - text_field = self.system_settings.main_view.select_single( |
579 | + self.main_view.scroll_to_and_click(self.tz_page) |
580 | + text_field = self.main_view.wait_select_single( |
581 | objectName='selectTimeZoneField' |
582 | ) |
583 | - self.system_settings.main_view.pointing_device.move_to_object( |
584 | + self.main_view.pointing_device.move_to_object( |
585 | text_field) |
586 | |
587 | def test_time_date_page(self): |
588 | """ Checks whether Time & Date page is available """ |
589 | - self.assertThat(self.time_date_page, NotEquals(None)) |
590 | - self.assertThat(self.time_date_page.title, Equals(_('Time & Date'))) |
591 | + self.assertThat(self.page, NotEquals(None)) |
592 | + self.assertThat(self.page.title, Equals(_('Time & Date'))) |
593 | |
594 | def test_tz_list_initially_empty(self): |
595 | """ Checks that no list is displayed initially """ |
596 | - self.system_settings.main_view.scroll_to_and_click(self.tz_page) |
597 | - labelVisible = self.system_settings.main_view.wait_select_single( |
598 | + self.main_view.scroll_to_and_click(self.tz_page) |
599 | + labelVisible = self.main_view.wait_select_single( |
600 | objectName='nothingLabel').visible |
601 | self.assertThat(labelVisible, Equals(True)) |
602 | |
603 | @@ -90,7 +85,7 @@ |
604 | """ Check that searching for a valid location shows something """ |
605 | self.click_tz_search_field() |
606 | self.keyboard.type('London, United Kingdom') |
607 | - listview = self.system_settings.main_view.select_single( |
608 | + listview = self.main_view.select_single( |
609 | objectName='locationsListView' |
610 | ) |
611 | self.assertThat(listview.count, Eventually(GreaterThan(0))) |
612 | @@ -99,11 +94,11 @@ |
613 | """ Check that searching for an invalid location shows nothing """ |
614 | self.click_tz_search_field() |
615 | self.keyboard.type('Oh no you don\'t!') |
616 | - listview = self.system_settings.main_view.select_single( |
617 | + listview = self.main_view.select_single( |
618 | objectName='locationsListView' |
619 | ) |
620 | self.assertThat(listview.count, Equals(0)) |
621 | - labelVisible = self.system_settings.main_view.select_single( |
622 | + labelVisible = self.main_view.select_single( |
623 | objectName='nothingLabel').visible |
624 | self.assertThat(labelVisible, Equals(True)) |
625 | |
626 | @@ -111,12 +106,12 @@ |
627 | """ Check that manually selecting a timezone sets it properly """ |
628 | self.click_tz_search_field() |
629 | self.keyboard.type('London, United Kingdom') |
630 | - listview = self.system_settings.main_view.select_single( |
631 | + listview = self.main_view.select_single( |
632 | objectName='locationsListView' |
633 | ) |
634 | london = TimeDateTestCase.wait_select_listview_first(listview) |
635 | - self.system_settings.main_view.pointing_device.click_object(london) |
636 | - header = self.system_settings.main_view.select_single( |
637 | + self.main_view.pointing_device.click_object(london) |
638 | + header = self.main_view.select_single( |
639 | objectName='MainView_Header' |
640 | ) |
641 | self.assertThat(header.title, Eventually(Equals(_('Time & Date')))) |
642 | @@ -130,16 +125,16 @@ |
643 | self.click_tz_search_field() |
644 | # This is also in Europe/London |
645 | self.keyboard.type('Preston, United Kingdom') |
646 | - listview = self.system_settings.main_view.select_single( |
647 | + listview = self.main_view.select_single( |
648 | objectName='locationsListView' |
649 | ) |
650 | |
651 | preston = TimeDateTestCase.wait_select_listview_first(listview) |
652 | - self.system_settings.main_view.pointing_device.click_object(preston) |
653 | + self.main_view.pointing_device.click_object(preston) |
654 | |
655 | # The timer is 1 second, wait and see that we haven't moved pages |
656 | sleep(2) |
657 | - header = self.system_settings.main_view.select_single( |
658 | + header = self.main_view.select_single( |
659 | objectName='MainView_Header' |
660 | ) |
661 | self.assertThat(header.title, Eventually(Equals(_('Time zone')))) |
662 | |
663 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_main.py' |
664 | --- tests/autopilot/ubuntu_system_settings/tests/test_main.py 2014-08-25 12:33:13 +0000 |
665 | +++ tests/autopilot/ubuntu_system_settings/tests/test_main.py 2015-01-14 02:48:46 +0000 |
666 | @@ -26,8 +26,8 @@ |
667 | self.addCleanup( |
668 | self.set_orientation, gsettings, GLib.Variant('b', current)) |
669 | |
670 | - self.system_settings.main_view.disable_orientation_lock() |
671 | - self.system_settings.main_view.enable_orientation_lock() |
672 | + self.main_view.disable_orientation_lock() |
673 | + self.main_view.enable_orientation_lock() |
674 | |
675 | self.assertThat( |
676 | lambda: gsettings.get_value('rotation-lock').get_boolean(), |
677 | @@ -40,8 +40,8 @@ |
678 | self.addCleanup( |
679 | self.set_orientation, gsettings, GLib.Variant('b', current)) |
680 | |
681 | - self.system_settings.main_view.enable_orientation_lock() |
682 | - self.system_settings.main_view.disable_orientation_lock() |
683 | + self.main_view.enable_orientation_lock() |
684 | + self.main_view.disable_orientation_lock() |
685 | |
686 | self.assertThat( |
687 | lambda: gsettings.get_value('rotation-lock').get_boolean(), |
688 | |
689 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_phone.py' |
690 | --- tests/autopilot/ubuntu_system_settings/tests/test_phone.py 2014-08-28 17:33:40 +0000 |
691 | +++ tests/autopilot/ubuntu_system_settings/tests/test_phone.py 2015-01-14 02:48:46 +0000 |
692 | @@ -8,22 +8,20 @@ |
693 | from __future__ import absolute_import |
694 | |
695 | from autopilot.matchers import Eventually |
696 | -from testtools.matchers import Contains, Equals, NotEquals |
697 | +from testtools.matchers import Contains, Equals |
698 | |
699 | from ubuntu_system_settings.tests import ( |
700 | PhoneOfonoBaseTestCase, |
701 | - PhoneSoundBaseTestCase, |
702 | CALL_FWD_IFACE, |
703 | CALL_SETTINGS_IFACE |
704 | ) |
705 | |
706 | |
707 | class PhoneTestCase(PhoneOfonoBaseTestCase): |
708 | - """Tests for Phone Page""" |
709 | |
710 | def test_call_fwd(self): |
711 | call_fwd_page = self.phone_page.go_to_call_forwarding() |
712 | - call_fwd_page.set_forward("41444424") |
713 | + call_fwd_page.set_forward('41444424') |
714 | |
715 | # Check that the forward has been set |
716 | self.assertThat( |
717 | @@ -52,7 +50,6 @@ |
718 | |
719 | |
720 | class PhoneDualSimTestCase(PhoneOfonoBaseTestCase): |
721 | - """Tests for Phone Page""" |
722 | |
723 | use_sims = 2 |
724 | |
725 | @@ -73,7 +70,7 @@ |
726 | |
727 | def test_call_fwd_sim_2(self): |
728 | call_fwd_page = self.phone_page.go_to_call_forwarding(sim=2) |
729 | - call_fwd_page.set_forward("41444424") |
730 | + call_fwd_page.set_forward('41444424') |
731 | |
732 | # Check that the forward has been set |
733 | self.assertThat( |
734 | @@ -113,17 +110,3 @@ |
735 | lambda: str(self.modem_1.Get(CALL_SETTINGS_IFACE, |
736 | 'VoiceCallWaiting')), |
737 | Eventually(Contains('enabled'))) |
738 | - |
739 | - |
740 | -class PhoneSoundTestCase(PhoneSoundBaseTestCase): |
741 | - """Tests for Phone Page""" |
742 | - |
743 | - def test_dialpad_sounds_switch(self): |
744 | - """ Check that dialpad_sounds is present and clickable""" |
745 | - snd = self.phone_page.select_single( |
746 | - objectName="dialpadSounds") |
747 | - prev_value = self.obj_test.GetDialpadSoundsEnabled() |
748 | - self.system_settings.main_view.scroll_to_and_click(snd) |
749 | - self.assertThat( |
750 | - lambda: self.obj_test.GetDialpadSoundsEnabled(), |
751 | - Eventually(NotEquals(prev_value))) |
752 | |
753 | === added file 'tests/autopilot/ubuntu_system_settings/tests/test_phone_sound.py' |
754 | --- tests/autopilot/ubuntu_system_settings/tests/test_phone_sound.py 1970-01-01 00:00:00 +0000 |
755 | +++ tests/autopilot/ubuntu_system_settings/tests/test_phone_sound.py 2015-01-14 02:48:46 +0000 |
756 | @@ -0,0 +1,32 @@ |
757 | +# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
758 | +# Copyright 2014 Canonical |
759 | +# |
760 | +# This program is free software: you can redistribute it and/or modify it |
761 | +# under the terms of the GNU General Public License version 3, as published |
762 | +# by the Free Software Foundation. |
763 | + |
764 | +from __future__ import absolute_import |
765 | + |
766 | +from autopilot.matchers import Eventually |
767 | +from testtools.matchers import NotEquals |
768 | + |
769 | +from ubuntu_system_settings.tests import SoundBaseTestCase |
770 | + |
771 | + |
772 | +class PhoneSoundTestCase(SoundBaseTestCase): |
773 | + """Tests for Phone Page""" |
774 | + |
775 | + def setUp(self): |
776 | + super(PhoneSoundTestCase, self).setUp(panel=None) |
777 | + self.page = self.main_view.go_to_phone_page() |
778 | + |
779 | + def test_dialpad_sounds_switch(self): |
780 | + """ Check that dialpad_sounds is present and clickable""" |
781 | + prev_value = self.obj_snd.GetDialpadSoundsEnabled() |
782 | + if not prev_value: |
783 | + self.page.enable_dialpad_sounds() |
784 | + else: |
785 | + self.page.disable_dialpad_sounds() |
786 | + self.assertThat( |
787 | + lambda: self.obj_snd.GetDialpadSoundsEnabled(), |
788 | + Eventually(NotEquals(prev_value))) |
789 | |
790 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_plugins.py' |
791 | --- tests/autopilot/ubuntu_system_settings/tests/test_plugins.py 2014-04-04 15:31:49 +0000 |
792 | +++ tests/autopilot/ubuntu_system_settings/tests/test_plugins.py 2015-01-14 02:48:46 +0000 |
793 | @@ -25,7 +25,7 @@ |
794 | |
795 | def test_title(self): |
796 | """ Checks whether the app title is correct """ |
797 | - header = self.system_settings.main_view.select_single( |
798 | + header = self.main_view.select_single( |
799 | objectName='systemSettingsPage' |
800 | ) |
801 | self.assertThat(header, NotEquals(None)) |
802 | @@ -33,14 +33,14 @@ |
803 | |
804 | def test_search(self): |
805 | """ Checks whether the Search box is available """ |
806 | - search = self.system_settings.main_view.select_single( |
807 | + search = self.main_view.select_single( |
808 | objectName='searchTextField' |
809 | ) |
810 | self.assertThat(search, NotEquals(None)) |
811 | |
812 | def test_network_category(self): |
813 | """ Checks whether the Network category is available """ |
814 | - category = self.system_settings.main_view.select_single( |
815 | + category = self.main_view.select_single( |
816 | objectName='categoryGrid-network' |
817 | ) |
818 | self.assertThat(category, NotEquals(None)) |
819 | @@ -50,7 +50,7 @@ |
820 | |
821 | def test_personal_category(self): |
822 | """ Checks whether the Personal category is available """ |
823 | - category = self.system_settings.main_view.select_single( |
824 | + category = self.main_view.select_single( |
825 | objectName='categoryGrid-personal' |
826 | ) |
827 | self.assertThat(category, NotEquals(None)) |
828 | @@ -60,7 +60,7 @@ |
829 | |
830 | def test_system_category(self): |
831 | """ Checks whether the System category is available """ |
832 | - category = self.system_settings.main_view.select_single( |
833 | + category = self.main_view.select_single( |
834 | objectName='categoryGrid-system' |
835 | ) |
836 | self.assertThat(category, NotEquals(None)) |
837 | @@ -68,70 +68,70 @@ |
838 | |
839 | def test_wifi_plugin(self): |
840 | """ Checks whether the Wi-Fi plugin is available """ |
841 | - plugin = self.system_settings.main_view.select_single( |
842 | + plugin = self.main_view.select_single( |
843 | objectName='entryComponent-wifi' |
844 | ) |
845 | self.assertThat(plugin, NotEquals(None)) |
846 | |
847 | def test_cellular_plugin(self): |
848 | """ Checks whether the Cellunar plugin is available """ |
849 | - plugin = self.system_settings.main_view.select_single( |
850 | + plugin = self.main_view.select_single( |
851 | objectName='entryComponent-cellular' |
852 | ) |
853 | self.assertThat(plugin, NotEquals(None)) |
854 | |
855 | def test_bluetooth_plugin(self): |
856 | """ Checks whether the Bluetooth plugin is available """ |
857 | - plugin = self.system_settings.main_view.select_single( |
858 | + plugin = self.main_view.select_single( |
859 | objectName='entryComponent-bluetooth' |
860 | ) |
861 | self.assertThat(plugin, NotEquals(None)) |
862 | |
863 | def test_background_plugin(self): |
864 | """ Checks whether the Background plugin is available """ |
865 | - plugin = self.system_settings.main_view.select_single( |
866 | + plugin = self.main_view.select_single( |
867 | objectName='entryComponent-background' |
868 | ) |
869 | self.assertThat(plugin, NotEquals(None)) |
870 | |
871 | def test_sound_plugin(self): |
872 | """ Checks whether the Sound plugin is available """ |
873 | - plugin = self.system_settings.main_view.select_single( |
874 | + plugin = self.main_view.select_single( |
875 | objectName='entryComponent-sound' |
876 | ) |
877 | self.assertThat(plugin, NotEquals(None)) |
878 | |
879 | def test_language_plugin(self): |
880 | """ Checks whether the Language plugin is available """ |
881 | - plugin = self.system_settings.main_view.select_single( |
882 | + plugin = self.main_view.select_single( |
883 | objectName='entryComponent-language' |
884 | ) |
885 | self.assertThat(plugin, NotEquals(None)) |
886 | |
887 | def test_accounts_plugin(self): |
888 | """ Checks whether the Accounts plugin is available """ |
889 | - plugin = self.system_settings.main_view.select_single( |
890 | + plugin = self.main_view.select_single( |
891 | objectName='entryComponent-online-accounts' |
892 | ) |
893 | self.assertThat(plugin, NotEquals(None)) |
894 | |
895 | def test_timedate_plugin(self): |
896 | """ Checks whether the Time & Date plugin is available """ |
897 | - plugin = self.system_settings.main_view.select_single( |
898 | + plugin = self.main_view.select_single( |
899 | objectName='entryComponent-time-date' |
900 | ) |
901 | self.assertThat(plugin, NotEquals(None)) |
902 | |
903 | def test_security_plugin(self): |
904 | """ Checks whether the Security plugin is available """ |
905 | - plugin = self.system_settings.main_view.select_single( |
906 | + plugin = self.main_view.select_single( |
907 | objectName='entryComponent-security-privacy' |
908 | ) |
909 | self.assertThat(plugin, NotEquals(None)) |
910 | |
911 | def test_updates_plugin(self): |
912 | """ Checks whether the Updates plugin is available """ |
913 | - plugin = self.system_settings.main_view.select_single( |
914 | + plugin = self.main_view.select_single( |
915 | objectName='entryComponent-system-update' |
916 | ) |
917 | self.assertThat(plugin, NotEquals(None)) |
918 | @@ -144,7 +144,7 @@ |
919 | def test_no_battery_plugin_without_battery(self): |
920 | """ Checks whether the Battery plugin is not available |
921 | as we have no battery """ |
922 | - self.assertThat(lambda: self.system_settings.main_view.select_single( |
923 | + self.assertThat(lambda: self.main_view.select_single( |
924 | objectName='entryComponent-battery'), |
925 | raises(StateNotFoundError) |
926 | ) |
927 | @@ -152,7 +152,7 @@ |
928 | def test_battery_plugin_battery_hotplugging(self): |
929 | """ Checks whether hotplugging a battery makes the panel visible """ |
930 | self.add_mock_battery() |
931 | - plugin = self.system_settings.main_view.select_single( |
932 | + plugin = self.main_view.select_single( |
933 | objectName='entryComponent-battery' |
934 | ) |
935 | self.assertThat(plugin, NotEquals(None)) |
936 | @@ -164,7 +164,7 @@ |
937 | |
938 | def test_battery_plugin(self): |
939 | """ Checks whether the Battery plugin is available """ |
940 | - plugin = self.system_settings.main_view.select_single( |
941 | + plugin = self.main_view.select_single( |
942 | objectName='entryComponent-battery' |
943 | ) |
944 | self.assertThat(plugin, NotEquals(None)) |
945 | |
946 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_search.py' |
947 | --- tests/autopilot/ubuntu_system_settings/tests/test_search.py 2014-08-22 16:20:46 +0000 |
948 | +++ tests/autopilot/ubuntu_system_settings/tests/test_search.py 2015-01-14 02:48:46 +0000 |
949 | @@ -22,19 +22,19 @@ |
950 | super(SearchTestCases, self).setUp() |
951 | |
952 | def _get_entry_component(self, name): |
953 | - return self.system_settings.main_view.wait_select_single( |
954 | + return self.main_view.wait_select_single( |
955 | objectName='entryComponent-' + name |
956 | ) |
957 | |
958 | def _get_all_entry_components(self): |
959 | - return self.system_settings.main_view.select_many( |
960 | + return self.main_view.select_many( |
961 | 'EntryComponent') |
962 | |
963 | def _type_into_search_box(self, text): |
964 | - search_box = self.system_settings.main_view.select_single( |
965 | + search_box = self.main_view.select_single( |
966 | objectName='searchTextField' |
967 | ) |
968 | - self.system_settings.main_view.scroll_to_and_click(search_box) |
969 | + self.main_view.scroll_to_and_click(search_box) |
970 | self.keyboard.type(_(text)) |
971 | self.assertThat(search_box.text, Eventually(Equals(text))) |
972 | |
973 | |
974 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_security.py' |
975 | --- tests/autopilot/ubuntu_system_settings/tests/test_security.py 2014-08-27 16:13:12 +0000 |
976 | +++ tests/autopilot/ubuntu_system_settings/tests/test_security.py 2015-01-14 02:48:46 +0000 |
977 | @@ -25,7 +25,7 @@ |
978 | def setUp(self): |
979 | super(SecurityTestCase, self).setUp() |
980 | self.assertEqual(['pin'], self.modem_0.Get(SIM_IFACE, 'LockedPins')) |
981 | - prps = self.system_settings.main_view.security_page.get_properties() |
982 | + prps = self.security_page.get_properties() |
983 | self.use_powerd = prps['usePowerd'] |
984 | if self.use_powerd: |
985 | gsettings = Gio.Settings.new('com.ubuntu.touch.system') |
986 | @@ -64,47 +64,49 @@ |
987 | |
988 | def _go_to_phone_lock(self): |
989 | selector = self.security_page.select_single( |
990 | - objectName="lockingControl" |
991 | + objectName='lockingControl' |
992 | ) |
993 | - self.system_settings.main_view.scroll_to_and_click(selector) |
994 | + self.main_view.scroll_to_and_click(selector) |
995 | |
996 | def _go_to_sim_lock(self): |
997 | selector = self.security_page.select_single( |
998 | - objectName="simControl" |
999 | + objectName='simControl' |
1000 | ) |
1001 | - self.system_settings.main_view.scroll_to_and_click(selector) |
1002 | + self.main_view.scroll_to_and_click(selector) |
1003 | |
1004 | def _go_to_sleep_values(self): |
1005 | self._go_to_phone_lock() |
1006 | - selector = self.system_settings.main_view.select_single( |
1007 | - objectName="lockTimeout" |
1008 | + selector = self.main_view.select_single( |
1009 | + objectName='lockTimeout' |
1010 | ) |
1011 | - self.system_settings.main_view.scroll_to_and_click(selector) |
1012 | + self.main_view.scroll_to_and_click(selector) |
1013 | |
1014 | def _get_sleep_selector(self): |
1015 | self._go_to_sleep_values() |
1016 | - sleep_values_page = self.system_settings.main_view.select_single( |
1017 | - objectName='sleepValues') |
1018 | + sleep_values_page = self.main_view.select_single( |
1019 | + objectName='sleepValues' |
1020 | + ) |
1021 | self.assertThat( |
1022 | sleep_values_page, |
1023 | NotEquals(None) |
1024 | ) |
1025 | self._go_to_sleep_values() |
1026 | - sleep_values_page = self.system_settings.main_view.select_single( |
1027 | - objectName='sleepValues') |
1028 | + sleep_values_page = self.main_view.select_single( |
1029 | + objectName='sleepValues' |
1030 | + ) |
1031 | return sleep_values_page.select_single( |
1032 | toolkit_emulators.ItemSelector, |
1033 | - objectName="sleepSelector" |
1034 | + objectName='sleepSelector' |
1035 | ) |
1036 | |
1037 | def test_security_page(self): |
1038 | """ Checks whether Security page is available """ |
1039 | self.assertThat( |
1040 | - self.system_settings.main_view.security_page, |
1041 | + self.security_page, |
1042 | NotEquals(None) |
1043 | ) |
1044 | self.assertThat( |
1045 | - self.system_settings.main_view.security_page.title, |
1046 | + self.security_page.title, |
1047 | Equals(_('Security & Privacy')) |
1048 | ) |
1049 | |
1050 | @@ -125,8 +127,9 @@ |
1051 | |
1052 | def test_phone_lock_page(self): |
1053 | self._go_to_phone_lock() |
1054 | - phone_lock_page = self.system_settings.main_view.select_single( |
1055 | - objectName='phoneLockingPage') |
1056 | + phone_lock_page = self.main_view.select_single( |
1057 | + objectName='phoneLockingPage' |
1058 | + ) |
1059 | self.assertThat( |
1060 | phone_lock_page, |
1061 | NotEquals(None) |
1062 | @@ -138,8 +141,9 @@ |
1063 | |
1064 | def test_phone_lock_value(self): |
1065 | self._go_to_phone_lock() |
1066 | - phone_lock_page = self.system_settings.main_view.select_single( |
1067 | - objectName='phoneLockingPage') |
1068 | + phone_lock_page = self.main_view.select_single( |
1069 | + objectName='phoneLockingPage' |
1070 | + ) |
1071 | actTimeout = self._get_activity_timeout() |
1072 | activityTimeout = phone_lock_page.select_single( |
1073 | objectName='lockTimeout').value |
1074 | @@ -160,7 +164,7 @@ |
1075 | selector = self._get_sleep_selector() |
1076 | to_select = selector.select_single( |
1077 | 'OptionSelectorDelegate', text='Never') |
1078 | - self.system_settings.main_view.pointing_device.click_object(to_select) |
1079 | + self.main_view.pointing_device.click_object(to_select) |
1080 | to_select.selected.wait_for(True) |
1081 | sleep(1) |
1082 | actTimeout = self._get_activity_timeout() |
1083 | @@ -173,7 +177,7 @@ |
1084 | selector = self._get_sleep_selector() |
1085 | to_select = selector.select_single( |
1086 | 'OptionSelectorDelegate', text='After 4 minutes') |
1087 | - self.system_settings.main_view.pointing_device.click_object(to_select) |
1088 | + self.main_view.pointing_device.click_object(to_select) |
1089 | to_select.selected.wait_for(True) |
1090 | sleep(1) |
1091 | actTimeout = self._get_activity_timeout() |
1092 | @@ -196,31 +200,36 @@ |
1093 | |
1094 | def test_sim_pin_lock_control(self): |
1095 | self._go_to_sim_lock() |
1096 | - sim_lock_control = self.system_settings.main_view.select_single( |
1097 | - objectName='simPinSwitch') |
1098 | + sim_lock_control = self.main_view.select_single( |
1099 | + objectName='simPinSwitch' |
1100 | + ) |
1101 | locked = len(self.modem_0.Get(SIM_IFACE, 'LockedPins')) > 0 |
1102 | self.assertEquals(locked, sim_lock_control.checked) |
1103 | |
1104 | def test_sim_pin_lock_control_unlock(self): |
1105 | self._go_to_sim_lock() |
1106 | - sim_lock_control = self.system_settings.main_view.select_single( |
1107 | - objectName='simPinSwitch') |
1108 | + sim_lock_control = self.main_view.select_single( |
1109 | + objectName='simPinSwitch' |
1110 | + ) |
1111 | |
1112 | self.assertTrue(sim_lock_control.checked) |
1113 | |
1114 | - self.system_settings.main_view.scroll_to_and_click(sim_lock_control) |
1115 | + self.main_view.scroll_to_and_click(sim_lock_control) |
1116 | |
1117 | - lock_dialog = self.system_settings.main_view.select_single( |
1118 | - objectName='lockDialogComponent') |
1119 | + lock_dialog = self.main_view.select_single( |
1120 | + objectName='lockDialogComponent' |
1121 | + ) |
1122 | self.assertEqual( |
1123 | lock_dialog.title, |
1124 | _("Enter SIM PIN") |
1125 | ) |
1126 | |
1127 | - prev_input = self.system_settings.main_view.select_single( |
1128 | - objectName='prevInput') |
1129 | - submit_button = self.system_settings.main_view.select_single( |
1130 | - objectName='lockButton') |
1131 | + prev_input = self.main_view.select_single( |
1132 | + objectName='prevInput' |
1133 | + ) |
1134 | + submit_button = self.main_view.select_single( |
1135 | + objectName='lockButton' |
1136 | + ) |
1137 | |
1138 | self.assertEqual( |
1139 | submit_button.text, |
1140 | @@ -230,7 +239,7 @@ |
1141 | self.assertFalse( |
1142 | submit_button.get_properties()['enabled'] |
1143 | ) |
1144 | - self.system_settings.main_view.scroll_to_and_click(prev_input) |
1145 | + self.main_view.scroll_to_and_click(prev_input) |
1146 | self.keyboard.type("246") |
1147 | self.assertFalse( |
1148 | submit_button.get_properties()['enabled'] |
1149 | @@ -241,7 +250,7 @@ |
1150 | submit_button.get_properties()['enabled'] |
1151 | ) |
1152 | |
1153 | - self.system_settings.main_view.scroll_to_and_click(submit_button) |
1154 | + self.main_view.scroll_to_and_click(submit_button) |
1155 | |
1156 | self.assertFalse(sim_lock_control.checked) |
1157 | |
1158 | @@ -252,24 +261,28 @@ |
1159 | def test_sim_pin_lock_control_lock(self): |
1160 | self.modem_0.Set(SIM_IFACE, 'LockedPins', "") |
1161 | self._go_to_sim_lock() |
1162 | - sim_lock_control = self.system_settings.main_view.select_single( |
1163 | - objectName='simPinSwitch') |
1164 | + sim_lock_control = self.main_view.select_single( |
1165 | + objectName='simPinSwitch' |
1166 | + ) |
1167 | |
1168 | self.assertFalse(sim_lock_control.checked) |
1169 | |
1170 | - self.system_settings.main_view.scroll_to_and_click(sim_lock_control) |
1171 | + self.main_view.scroll_to_and_click(sim_lock_control) |
1172 | |
1173 | - lock_dialog = self.system_settings.main_view.select_single( |
1174 | - objectName='lockDialogComponent') |
1175 | + lock_dialog = self.main_view.select_single( |
1176 | + objectName='lockDialogComponent' |
1177 | + ) |
1178 | self.assertEqual( |
1179 | lock_dialog.title, |
1180 | _("Enter SIM PIN") |
1181 | ) |
1182 | |
1183 | - prev_input = self.system_settings.main_view.select_single( |
1184 | - objectName='prevInput') |
1185 | - submit_button = self.system_settings.main_view.select_single( |
1186 | - objectName='lockButton') |
1187 | + prev_input = self.main_view.select_single( |
1188 | + objectName='prevInput' |
1189 | + ) |
1190 | + submit_button = self.main_view.select_single( |
1191 | + objectName='lockButton' |
1192 | + ) |
1193 | |
1194 | self.assertEqual( |
1195 | submit_button.text, |
1196 | @@ -279,7 +292,7 @@ |
1197 | self.assertFalse( |
1198 | submit_button.get_properties()['enabled'] |
1199 | ) |
1200 | - self.system_settings.main_view.scroll_to_and_click(prev_input) |
1201 | + self.main_view.scroll_to_and_click(prev_input) |
1202 | self.keyboard.type("246") |
1203 | self.assertFalse( |
1204 | submit_button.get_properties()['enabled'] |
1205 | @@ -290,7 +303,7 @@ |
1206 | submit_button.get_properties()['enabled'] |
1207 | ) |
1208 | |
1209 | - self.system_settings.main_view.scroll_to_and_click(submit_button) |
1210 | + self.main_view.scroll_to_and_click(submit_button) |
1211 | |
1212 | self.assertTrue(sim_lock_control.checked) |
1213 | |
1214 | @@ -300,27 +313,31 @@ |
1215 | |
1216 | def test_sim_pin_lock_control_unlock_fail(self): |
1217 | self._go_to_sim_lock() |
1218 | - sim_lock_control = self.system_settings.main_view.select_single( |
1219 | - objectName='simPinSwitch') |
1220 | + sim_lock_control = self.main_view.select_single( |
1221 | + objectName='simPinSwitch' |
1222 | + ) |
1223 | |
1224 | self.assertTrue( |
1225 | len(self.modem_0.Get(SIM_IFACE, 'LockedPins')) > 0 |
1226 | ) |
1227 | self.assertTrue(sim_lock_control.checked) |
1228 | |
1229 | - self.system_settings.main_view.scroll_to_and_click(sim_lock_control) |
1230 | + self.main_view.scroll_to_and_click(sim_lock_control) |
1231 | |
1232 | - lock_dialog = self.system_settings.main_view.select_single( |
1233 | - objectName='lockDialogComponent') |
1234 | + lock_dialog = self.main_view.select_single( |
1235 | + objectName='lockDialogComponent' |
1236 | + ) |
1237 | self.assertEqual( |
1238 | lock_dialog.title, |
1239 | _("Enter SIM PIN") |
1240 | ) |
1241 | |
1242 | - prev_input = self.system_settings.main_view.select_single( |
1243 | - objectName='prevInput') |
1244 | - submit_button = self.system_settings.main_view.select_single( |
1245 | - objectName='lockButton') |
1246 | + prev_input = self.main_view.select_single( |
1247 | + objectName='prevInput' |
1248 | + ) |
1249 | + submit_button = self.main_view.select_single( |
1250 | + objectName='lockButton' |
1251 | + ) |
1252 | |
1253 | self.assertEqual( |
1254 | submit_button.text, |
1255 | @@ -330,14 +347,14 @@ |
1256 | self.assertFalse( |
1257 | submit_button.get_properties()['enabled'] |
1258 | ) |
1259 | - self.system_settings.main_view.scroll_to_and_click(prev_input) |
1260 | + self.main_view.scroll_to_and_click(prev_input) |
1261 | self.keyboard.type("1234") |
1262 | |
1263 | self.assertTrue( |
1264 | submit_button.get_properties()['enabled'] |
1265 | ) |
1266 | |
1267 | - self.system_settings.main_view.scroll_to_and_click(submit_button) |
1268 | + self.main_view.scroll_to_and_click(submit_button) |
1269 | |
1270 | self.assertTrue( |
1271 | len(self.modem_0.Get(SIM_IFACE, 'LockedPins')) > 0 |
1272 | @@ -347,26 +364,30 @@ |
1273 | def test_sim_pin_lock_control_lock_fail(self): |
1274 | self.modem_0.Set(SIM_IFACE, 'LockedPins', "") |
1275 | self._go_to_sim_lock() |
1276 | - sim_lock_control = self.system_settings.main_view.select_single( |
1277 | - objectName='simPinSwitch') |
1278 | + sim_lock_control = self.main_view.select_single( |
1279 | + objectName='simPinSwitch' |
1280 | + ) |
1281 | |
1282 | self.assertFalse( |
1283 | len(self.modem_0.Get(SIM_IFACE, 'LockedPins')) > 0 |
1284 | ) |
1285 | |
1286 | - self.system_settings.main_view.scroll_to_and_click(sim_lock_control) |
1287 | + self.main_view.scroll_to_and_click(sim_lock_control) |
1288 | |
1289 | - lock_dialog = self.system_settings.main_view.select_single( |
1290 | - objectName='lockDialogComponent') |
1291 | + lock_dialog = self.main_view.select_single( |
1292 | + objectName='lockDialogComponent' |
1293 | + ) |
1294 | self.assertEqual( |
1295 | lock_dialog.title, |
1296 | _("Enter SIM PIN") |
1297 | ) |
1298 | |
1299 | - prev_input = self.system_settings.main_view.select_single( |
1300 | - objectName='prevInput') |
1301 | - submit_button = self.system_settings.main_view.select_single( |
1302 | - objectName='lockButton') |
1303 | + prev_input = self.main_view.select_single( |
1304 | + objectName='prevInput' |
1305 | + ) |
1306 | + submit_button = self.main_view.select_single( |
1307 | + objectName='lockButton' |
1308 | + ) |
1309 | |
1310 | self.assertEqual( |
1311 | submit_button.text, |
1312 | @@ -376,14 +397,14 @@ |
1313 | self.assertFalse( |
1314 | submit_button.get_properties()['enabled'] |
1315 | ) |
1316 | - self.system_settings.main_view.scroll_to_and_click(prev_input) |
1317 | + self.main_view.scroll_to_and_click(prev_input) |
1318 | self.keyboard.type("1234") |
1319 | |
1320 | self.assertTrue( |
1321 | submit_button.get_properties()['enabled'] |
1322 | ) |
1323 | |
1324 | - self.system_settings.main_view.scroll_to_and_click(submit_button) |
1325 | + self.main_view.scroll_to_and_click(submit_button) |
1326 | |
1327 | self.assertFalse( |
1328 | len(self.modem_0.Get(SIM_IFACE, 'LockedPins')) > 0 |
1329 | |
1330 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_sound.py' |
1331 | --- tests/autopilot/ubuntu_system_settings/tests/test_sound.py 2014-11-13 16:52:09 +0000 |
1332 | +++ tests/autopilot/ubuntu_system_settings/tests/test_sound.py 2015-01-14 02:48:46 +0000 |
1333 | @@ -19,19 +19,20 @@ |
1334 | def test_sound_page(self): |
1335 | """ Checks whether Sound page is available """ |
1336 | self.assertThat( |
1337 | - self.system_settings.main_view.sound_page, |
1338 | + self.sound_page, |
1339 | NotEquals(None) |
1340 | ) |
1341 | self.assertThat( |
1342 | - self.system_settings.main_view.sound_page.title, |
1343 | + self.sound_page.title, |
1344 | Equals(_('Sound')) |
1345 | ) |
1346 | |
1347 | def test_silent_mode_sound_switch(self): |
1348 | """ Check that silent_mode is present and clickable""" |
1349 | - snd = self.system_settings.main_view.sound_page.select_single( |
1350 | - objectName="silentMode") |
1351 | - self.system_settings.main_view.scroll_to_and_click(snd) |
1352 | + snd = self.sound_page.select_single( |
1353 | + objectName="silentMode" |
1354 | + ) |
1355 | + self.main_view.scroll_to_and_click(snd) |
1356 | sleep(0.2) |
1357 | calls = self.dbus_mock_isound.GetCalls() |
1358 | self.assertThat( |
1359 | @@ -45,63 +46,56 @@ |
1360 | |
1361 | def test_call_vibrate_sound_switch(self): |
1362 | """ Check that call vibrate is present and clickable""" |
1363 | - snd = self.system_settings.main_view.sound_page.select_single( |
1364 | - objectName="callVibrate") |
1365 | - prev_value = self.obj_test.GetIncomingCallVibrate() |
1366 | - self.system_settings.main_view.scroll_to_and_click(snd) |
1367 | - sleep(0.2) |
1368 | - self.assertNotEqual( |
1369 | - self.obj_test.GetIncomingCallVibrate(), |
1370 | - prev_value) |
1371 | - |
1372 | - def test_call_vibrate_silent_mode_sound_switch(self): |
1373 | - """ Check that call vibrate silent mode is present and clickable""" |
1374 | - snd = self.system_settings.main_view.sound_page.select_single( |
1375 | - objectName="callVibrateSilentMode") |
1376 | - prev_value = self.obj_test.GetIncomingCallVibrateSilentMode() |
1377 | - self.system_settings.main_view.scroll_to_and_click(snd) |
1378 | - sleep(0.2) |
1379 | - self.assertNotEqual( |
1380 | - self.obj_test.GetIncomingCallVibrateSilentMode(), |
1381 | + snd = self.sound_page.select_single( |
1382 | + objectName="callVibrate" |
1383 | + ) |
1384 | + prev_value = self.obj_snd.GetIncomingCallVibrate() |
1385 | + self.main_view.scroll_to_and_click(snd) |
1386 | + sleep(0.2) |
1387 | + self.assertNotEqual( |
1388 | + self.obj_snd.GetIncomingCallVibrate(), |
1389 | prev_value) |
1390 | |
1391 | def test_message_vibrate_sound_switch(self): |
1392 | """ Check that message vibrate is present and clickable""" |
1393 | - snd = self.system_settings.main_view.sound_page.select_single( |
1394 | - objectName="messageVibrate") |
1395 | - prev_value = self.obj_test.GetIncomingMessageVibrate() |
1396 | - self.system_settings.main_view.scroll_to_and_click(snd) |
1397 | + snd = self.sound_page.select_single( |
1398 | + objectName="messageVibrate" |
1399 | + ) |
1400 | + prev_value = self.obj_snd.GetIncomingMessageVibrate() |
1401 | + self.main_view.scroll_to_and_click(snd) |
1402 | sleep(0.2) |
1403 | self.assertNotEqual( |
1404 | - self.obj_test.GetIncomingMessageVibrate(), |
1405 | + self.obj_snd.GetIncomingMessageVibrate(), |
1406 | prev_value) |
1407 | |
1408 | def test_message_vibrate_silent_mode_sound_switch(self): |
1409 | """ Check that message vibrate silent mode is present and clickable""" |
1410 | - snd = self.system_settings.main_view.sound_page.select_single( |
1411 | - objectName="messageVibrateSilentMode") |
1412 | - prev_value = self.obj_test.GetIncomingMessageVibrateSilentMode() |
1413 | - self.system_settings.main_view.scroll_to_and_click(snd) |
1414 | + snd = self.sound_page.select_single( |
1415 | + objectName="messageVibrateSilentMode" |
1416 | + ) |
1417 | + prev_value = self.obj_snd.GetIncomingMessageVibrateSilentMode() |
1418 | + self.main_view.scroll_to_and_click(snd) |
1419 | sleep(0.2) |
1420 | self.assertNotEqual( |
1421 | - self.obj_test.GetIncomingMessageVibrateSilentMode(), |
1422 | + self.obj_snd.GetIncomingMessageVibrateSilentMode(), |
1423 | prev_value) |
1424 | |
1425 | def test_keyboard_sound_switch(self): |
1426 | """ Check that keyboard sound is present and clickable""" |
1427 | - kbd_snd = self.system_settings.main_view.sound_page.select_single( |
1428 | - objectName="keyboardSoundSwitch") |
1429 | + kbd_snd = self.sound_page.select_single( |
1430 | + objectName="keyboardSoundSwitch" |
1431 | + ) |
1432 | current_value = kbd_snd.get_properties()["checked"] |
1433 | - self.system_settings.main_view.scroll_to_and_click(kbd_snd) |
1434 | + self.main_view.scroll_to_and_click(kbd_snd) |
1435 | self.assertThat( |
1436 | kbd_snd.get_properties()["checked"], NotEquals(current_value)) |
1437 | |
1438 | def test_dialpad_sounds_switch(self): |
1439 | - """ Check that dialpad_sounds is present and clickable""" |
1440 | - snd = self.system_settings.main_view.sound_page.select_single( |
1441 | - objectName="dialpadSounds") |
1442 | - prev_value = self.obj_test.GetDialpadSoundsEnabled() |
1443 | - self.system_settings.main_view.scroll_to_and_click(snd) |
1444 | + snd = self.sound_page.select_single( |
1445 | + objectName="dialpadSounds" |
1446 | + ) |
1447 | + prev_value = self.obj_snd.GetDialpadSoundsEnabled() |
1448 | + self.main_view.scroll_to_and_click(snd) |
1449 | self.assertThat( |
1450 | - lambda: self.obj_test.GetDialpadSoundsEnabled(), |
1451 | + lambda: self.obj_snd.GetDialpadSoundsEnabled(), |
1452 | Eventually(NotEquals(prev_value))) |
1453 | |
1454 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/test_wifi.py' |
1455 | --- tests/autopilot/ubuntu_system_settings/tests/test_wifi.py 2014-09-26 12:52:31 +0000 |
1456 | +++ tests/autopilot/ubuntu_system_settings/tests/test_wifi.py 2015-01-14 02:48:46 +0000 |
1457 | @@ -27,7 +27,7 @@ |
1458 | def test_connect_to_hidden_network(self): |
1459 | dialog = self.wifi_page.connect_to_hidden_network( |
1460 | 'yeah', |
1461 | - scroll_to_and_click=self.system_settings.main_view |
1462 | + scroll_to_and_click=self.main_view |
1463 | .scroll_to_and_click) |
1464 | |
1465 | # allow backend to set up listeners |
1466 | @@ -50,7 +50,7 @@ |
1467 | |
1468 | dialog = self.wifi_page.connect_to_hidden_network( |
1469 | 'yeah', |
1470 | - scroll_to_and_click=self.system_settings.main_view |
1471 | + scroll_to_and_click=self.main_view |
1472 | .scroll_to_and_click) |
1473 | |
1474 | # allow backend to set up listeners |
1475 | @@ -74,7 +74,7 @@ |
1476 | def test_connect_to_hidden_network_using_secrets(self): |
1477 | dialog = self.wifi_page.connect_to_hidden_network( |
1478 | 'yeah', security='wpa', password='abcdefgh', |
1479 | - scroll_to_and_click=self.system_settings.main_view |
1480 | + scroll_to_and_click=self.main_view |
1481 | .scroll_to_and_click) |
1482 | |
1483 | # allow backend to set up listeners |
1484 | @@ -97,7 +97,7 @@ |
1485 | def test_connect_to_hidden_network_using_incorrect_secrets(self): |
1486 | dialog = self.wifi_page.connect_to_hidden_network( |
1487 | 'yeah', security='wpa', password='abcdefgh', |
1488 | - scroll_to_and_click=self.system_settings.main_view |
1489 | + scroll_to_and_click=self.main_view |
1490 | .scroll_to_and_click) |
1491 | # allow backend to set up listeners |
1492 | sleep(0.3) |
1493 | @@ -120,7 +120,7 @@ |
1494 | |
1495 | dialog = self.wifi_page.connect_to_hidden_network( |
1496 | 'foo', |
1497 | - scroll_to_and_click=self.system_settings.main_view |
1498 | + scroll_to_and_click=self.main_view |
1499 | .scroll_to_and_click) |
1500 | |
1501 | # allow backend to set up listeners |
1502 | @@ -138,7 +138,7 @@ |
1503 | The NetworkManager dbusmock template does not currently support deletion |
1504 | of connections.""" |
1505 | def test_remove_previous_network(self): |
1506 | - click_method = self.system_settings.main_view.scroll_to_and_click |
1507 | + click_method = self.main_view.scroll_to_and_click |
1508 | previous_networks = [{ |
1509 | 'ssid': 'Series of Tubes', |
1510 | 'connection_name': 'conn_0' |
1511 | @@ -155,7 +155,7 @@ |
1512 | self.wifi_page.remove_previous_network( |
1513 | previous_networks[0]['ssid'], scroll_to_and_click=click_method) |
1514 | |
1515 | - self.system_settings.main_view.go_back() |
1516 | + self.main_view.go_back() |
1517 | |
1518 | self.wifi_page.remove_previous_network( |
1519 | previous_networks[2]['ssid'], scroll_to_and_click=click_method) |
PASSED: Continuous integration, rev:947 jenkins. qa.ubuntu. com/job/ ubuntu- system- settings- rtm-14. 09-ci/7/ jenkins. qa.ubuntu. com/job/ ubuntu- system- settings- rtm-14. 09-14.09- armhf-ci/ 8 jenkins. qa.ubuntu. com/job/ ubuntu- system- settings- rtm-14. 09-14.09- armhf-ci/ 8/artifact/ work/output/ *zip*/output. zip
http://
Executed test runs:
SUCCESS: http://
deb: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/ubuntu- system- settings- rtm-14. 09-ci/7/ rebuild
http://