Merge lp:~canonical-platform-qa/unity8/click_item_with_swipe into lp:unity8

Proposed by Leo Arias on 2014-12-17
Status: Superseded
Proposed branch: lp:~canonical-platform-qa/unity8/click_item_with_swipe
Merge into: lp:unity8
Diff against target: 579 lines (+94/-59)
15 files modified
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py (+0/-2)
tests/autopilot/unity8/fixture_setup.py (+2/-0)
tests/autopilot/unity8/greeter/tests/__init__.py (+3/-1)
tests/autopilot/unity8/greeter/tests/test_args.py (+4/-2)
tests/autopilot/unity8/indicators/__init__.py (+8/-7)
tests/autopilot/unity8/indicators/tests/__init__.py (+1/-0)
tests/autopilot/unity8/indicators/tests/test_action_latency.py (+21/-18)
tests/autopilot/unity8/shell/emulators/dash.py (+29/-16)
tests/autopilot/unity8/shell/emulators/greeter.py (+0/-1)
tests/autopilot/unity8/shell/emulators/tutorial.py (+0/-1)
tests/autopilot/unity8/shell/tests/__init__.py (+1/-0)
tests/autopilot/unity8/shell/tests/test_emulators.py (+6/-0)
tests/autopilot/unity8/shell/tests/test_lock_screen.py (+4/-4)
tests/autopilot/unity8/shell/tests/test_notifications.py (+14/-6)
tests/autopilot/unity8/shell/tests/test_tutorial.py (+1/-1)
To merge this branch: bzr merge lp:~canonical-platform-qa/unity8/click_item_with_swipe
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing on 2015-04-21
Christopher Lee (community) 2014-12-17 Needs Fixing on 2015-04-16
Review via email: mp+245051@code.launchpad.net

This proposal has been superseded by a proposal from 2015-04-21.

Commit Message

On the autopilot helpers, swipe if the item to open from the dash is not visible.

Description of the Change

This branch requires https://code.launchpad.net/~canonical-platform-qa/ubuntu-ui-toolkit/fix1401517-overwrite_swipe_borders/+merge/245049 to be published.

We need it in order to open apps from the dash in order to automate the sanity tests.

To post a comment you must log in.
Leo Arias (elopio) wrote :

Once the branch in the toolkit lands, we have to update this branch to use grid units for the margin.

Christopher Lee (veebers) wrote :

I have a query regarding consistency between this and what was/is used in the sanity suite.

review: Needs Fixing
Brendan Donegan (brendan-donegan) wrote :

Followed up on veebers question. Update to use the grid units, then it's a LGTM

Leo Arias (elopio) wrote :

Thanks for noticing that veebers. I made the wrong paste, sorry about that.
I will give a run on the sanity once this branch is ready for review.

1526. By Leo Arias on 2015-04-21

Merged with the flake8 fixes.

1527. By Leo Arias on 2015-04-22

Removed extra whitespace.

1528. By Leo Arias on 2015-04-22

Added the required version for uitk.

1529. By Leo Arias on 2015-05-20

Merged with trunk.

1530. By Leo Arias on 2015-05-22

Merged with trunk.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py'
2--- tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py 2015-04-02 08:16:34 +0000
3+++ tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py 2015-04-21 15:29:15 +0000
4@@ -22,9 +22,7 @@
5 import logging
6 import os
7
8-from autopilot.matchers import Eventually
9 from autopilot.platform import model
10-from testtools.matchers import Equals
11
12 from unity8 import process_helpers
13 from unity8.application_lifecycle import tests
14
15=== modified file 'tests/autopilot/unity8/fixture_setup.py'
16--- tests/autopilot/unity8/fixture_setup.py 2015-04-07 11:48:34 +0000
17+++ tests/autopilot/unity8/fixture_setup.py 2015-04-21 15:29:15 +0000
18@@ -31,6 +31,7 @@
19
20 logger = logging.getLogger(__name__)
21
22+
23 class LaunchDashApp(fixtures.Fixture):
24
25 """Fixture to launch the Dash app."""
26@@ -102,6 +103,7 @@
27 ]
28 subprocess.check_output(command)
29
30+
31 class LaunchMockIndicatorService(fixtures.Fixture):
32
33 """Fixture to launch the indicator test service."""
34
35=== modified file 'tests/autopilot/unity8/greeter/tests/__init__.py'
36--- tests/autopilot/unity8/greeter/tests/__init__.py 2015-03-23 23:40:27 +0000
37+++ tests/autopilot/unity8/greeter/tests/__init__.py 2015-04-21 15:29:15 +0000
38@@ -20,7 +20,9 @@
39 from unity8.shell.emulators import main_window as main_window_emulator
40 from unity8.shell.tests import UnityTestCase
41
42+
43 class GreeterTestCase(UnityTestCase):
44 def get_shell(self, unity_proxy):
45- main_window = unity_proxy.select_single(main_window_emulator.QQuickView)
46+ main_window = (
47+ unity_proxy.select_single(main_window_emulator.QQuickView))
48 return main_window.select_single('Shell')
49
50=== modified file 'tests/autopilot/unity8/greeter/tests/test_args.py'
51--- tests/autopilot/unity8/greeter/tests/test_args.py 2015-03-23 23:40:27 +0000
52+++ tests/autopilot/unity8/greeter/tests/test_args.py 2015-04-21 15:29:15 +0000
53@@ -19,6 +19,7 @@
54
55 from unity8.greeter.tests import GreeterTestCase
56
57+
58 class GreeterArgsTest(GreeterTestCase):
59
60 DEFAULT_SHELL_MODE = 'full-greeter'
61@@ -43,8 +44,9 @@
62 unity_proxy = self.launch_unity(mode=self.NONEXISTENT_MODE)
63 shell = self.get_shell(unity_proxy)
64 self.assertTrue(shell.testShellMode == self.DEFAULT_SHELL_MODE,
65- "Shell mode was {} but should have been {}".format(
66- shell.testShellMode, self.DEFAULT_SHELL_MODE))
67+ "Shell mode was {} but should have been {}"
68+ .format(shell.testShellMode,
69+ self.DEFAULT_SHELL_MODE))
70
71 def test_shell_mode(self):
72 unity_proxy = self.launch_unity(mode='shell')
73
74=== modified file 'tests/autopilot/unity8/indicators/__init__.py'
75--- tests/autopilot/unity8/indicators/__init__.py 2015-03-20 11:31:40 +0000
76+++ tests/autopilot/unity8/indicators/__init__.py 2015-04-21 15:29:15 +0000
77@@ -19,7 +19,6 @@
78 from autopilot import introspection
79
80 from unity8.shell import emulators
81-from unity8 import fixture_setup
82
83
84 class IndicatorPage(emulators.UnityEmulatorBase):
85@@ -34,6 +33,7 @@
86 def validate_dbus_object(cls, path, state):
87 return False
88
89+
90 class Indicator():
91
92 def __init__(self, main_window, name):
93@@ -67,9 +67,9 @@
94 objectName=self._name+'-page')
95
96 def _make_indicator_icon_visible(self):
97- indicators_bar_flickable = self._main_window.select_single(
98- 'IndicatorsBar').select_single(
99- ubuntuuitoolkit.QQuickFlickable, objectName='flickable')
100+ indicators_bar = self._main_window.select_single('IndicatorsBar')
101+ indicators_bar_flickable = indicators_bar.select_single(
102+ ubuntuuitoolkit.QQuickFlickable, objectName='flickable')
103 self._swipe_flickable_to_x_end(indicators_bar_flickable)
104
105 def _swipe_flickable_to_x_end(self, flickable):
106@@ -98,7 +98,8 @@
107 class DisplayIndicator(Indicator):
108
109 def __init__(self, main_window):
110- super(DisplayIndicator, self).__init__(main_window, 'indicator-rotation-lock')
111+ super(DisplayIndicator, self).__init__(main_window,
112+ 'indicator-rotation-lock')
113 self._main_window = main_window
114
115
116@@ -189,7 +190,7 @@
117 stop_x = x
118
119 self.pointing_device.drag(start_x, start_y, stop_x, stop_y, rate)
120- self.value.wait_for(self.minimumValue, timeout);
121+ self.value.wait_for(self.minimumValue, timeout)
122
123 def slide_right(self, timeout=10):
124 x, y, width, height = self.globalRect
125@@ -200,4 +201,4 @@
126 stop_x = x + width
127
128 self.pointing_device.drag(start_x, start_y, stop_x, stop_y, rate)
129- self.value.wait_for(self.maximumValue, timeout);
130+ self.value.wait_for(self.maximumValue, timeout)
131
132=== modified file 'tests/autopilot/unity8/indicators/tests/__init__.py'
133--- tests/autopilot/unity8/indicators/tests/__init__.py 2015-03-20 11:31:40 +0000
134+++ tests/autopilot/unity8/indicators/tests/__init__.py 2015-04-21 15:29:15 +0000
135@@ -31,6 +31,7 @@
136 self.unity_proxy = self.launch_unity()
137 process_helpers.unlock_unity(self.unity_proxy)
138
139+
140 class DeviceIndicatorTestCase(IndicatorTestCase):
141
142 def setUp(self):
143
144=== modified file 'tests/autopilot/unity8/indicators/tests/test_action_latency.py'
145--- tests/autopilot/unity8/indicators/tests/test_action_latency.py 2015-04-07 11:48:34 +0000
146+++ tests/autopilot/unity8/indicators/tests/test_action_latency.py 2015-04-21 15:29:15 +0000
147@@ -21,19 +21,16 @@
148 from unity8 import (
149 fixture_setup,
150 indicators,
151- process_helpers
152 )
153-from unity8.shell import tests
154 from unity8.indicators import tests
155
156 from autopilot.matchers import Eventually
157 from testtools.matchers import Equals, NotEquals
158-import time
159
160
161 class TestIndicatorBaseTestCase(tests.IndicatorTestCase):
162
163- scenarios = [ tests.IndicatorTestCase.device_emulation_scenarios[0] ]
164+ scenarios = [tests.IndicatorTestCase.device_emulation_scenarios[0]]
165
166 def setUp(self):
167 super(TestIndicatorBaseTestCase, self).setUp()
168@@ -49,7 +46,8 @@
169 self.indicator_page = self.indicator.open()
170
171 def launch_indicator_service(self):
172- launch_service_fixture = fixture_setup.LaunchMockIndicatorService(self.action_delay)
173+ launch_service_fixture = \
174+ fixture_setup.LaunchMockIndicatorService(self.action_delay)
175 self.useFixture(launch_service_fixture)
176
177
178@@ -95,6 +93,7 @@
179 Eventually(Equals(slider.value), timeout=20)
180 )
181
182+
183 class TestBuffering(TestIndicatorBaseTestCase):
184
185 """Test that switching multiple times will buffer activations
186@@ -107,11 +106,11 @@
187
188 switch = self.indicator_page.get_switcher()
189 switch.change_state()
190- intermediate_value = switch.checked;
191+ intermediate_value = switch.checked
192
193 # will buffer change until it receives the change from server
194 switch.change_state()
195- final_value = switch.checked;
196+ final_value = switch.checked
197
198 # backend will respond to first switch.
199 switch_menu = self.indicator_page.get_switch_menu()
200@@ -121,7 +120,8 @@
201 )
202 # The buffered activation should have gone to server now.
203
204- # front-end should not change as a result of server update while it is buffered
205+ # front-end should not change as a result of server update
206+ # while it is buffered
207 self.assertThat(
208 switch.checked,
209 Equals(final_value)
210@@ -142,15 +142,15 @@
211 def test_slider_buffers_activations(self):
212
213 slider = self.indicator_page.get_slider()
214- original_value = slider.value;
215+ original_value = slider.value
216 slider.slide_left()
217
218 # will buffer change until it receives the change from server
219 slider.slide_right()
220- final_value = slider.value;
221+ final_value = slider.value
222
223- # backend will respond to first slider. Since it's a live slider it'll probably
224- # be a random value along the slide.
225+ # backend will respond to first slider. Since it's a live slider
226+ # it'll probably be a random value along the slide.
227 slider_menu = self.indicator_page.get_slider_menu()
228 self.assertThat(
229 slider_menu.serverValue,
230@@ -163,7 +163,8 @@
231 NotEquals(final_value)
232 )
233
234- # front-end should not change as a result of server update while it is buffered
235+ # front-end should not change as a result of server update
236+ # while it is buffered
237 self.assertThat(
238 slider.value,
239 Equals(final_value)
240@@ -189,17 +190,18 @@
241
242 See https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1390136 .
243 """
244- action_delay = -1 # never action.
245+ action_delay = -1 # never action.
246
247 def test_switch_reverts_on_late_response(self):
248
249 switch = self.indicator_page.get_switcher()
250 switch_menu = self.indicator_page.get_switch_menu()
251
252- original_value = switch.checked;
253+ original_value = switch.checked
254 switch.change_state()
255
256- # switch should revert to original value after 5 seconds (30 seconds in real usage)
257+ # switch should revert to original value after 5 seconds
258+ # (30 seconds in real usage)
259 self.assertThat(
260 switch.checked,
261 Eventually(Equals(original_value), timeout=20)
262@@ -216,10 +218,11 @@
263 slider = self.indicator_page.get_slider()
264 slider_menu = self.indicator_page.get_slider_menu()
265
266- original_value = slider.value;
267+ original_value = slider.value
268 slider.slide_left()
269
270- # slider should revert to original value after 5 seconds (30 seconds in real usage)
271+ # slider should revert to original value after 5 seconds
272+ # (30 seconds in real usage)
273 self.assertThat(
274 slider.value,
275 Eventually(Equals(original_value), timeout=20)
276
277=== modified file 'tests/autopilot/unity8/shell/emulators/dash.py'
278--- tests/autopilot/unity8/shell/emulators/dash.py 2015-03-06 15:38:57 +0000
279+++ tests/autopilot/unity8/shell/emulators/dash.py 2015-04-21 15:29:15 +0000
280@@ -1,3 +1,4 @@
281+
282 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
283 #
284 # Unity Autopilot Test Suite
285@@ -92,7 +93,7 @@
286 aux = self.dash_content_list.get_children_by_type('QQuickItem')[0]
287 for l in aux.get_children_by_type('QQuickLoader'):
288 if (l.scopeId == scope_id):
289- return l;
290+ return l
291 raise emulators.UnityEmulatorException(
292 'No scope found with id {0}'.format(scope_id))
293 except dbus.StateNotFoundError:
294@@ -100,7 +101,7 @@
295 'No scope found with id {0}'.format(scope_id))
296
297 def _get_scope_from_loader(self, loader):
298- return loader.wait_select_single('GenericScopeView');
299+ return loader.wait_select_single('GenericScopeView')
300
301 def _open_scope_scrolling(self, scope_loader):
302 scroll = self._get_scroll_direction(scope_loader)
303@@ -132,7 +133,7 @@
304 # Workarounds https://bugs.launchpad.net/mir/+bug/1399690
305 rate = 10
306 divisions = 5
307- jump = ( width / divisions ) // rate * rate
308+ jump = (width / divisions) // rate * rate
309 start_x = x + jump
310 stop_x = x + jump * (divisions - 1)
311 start_y = stop_y = y + 1
312@@ -148,7 +149,7 @@
313 # Workarounds https://bugs.launchpad.net/mir/+bug/1399690
314 rate = 10
315 divisions = 5
316- jump = ( width / divisions ) // rate * rate
317+ jump = (width / divisions) // rate * rate
318 start_x = x + jump * (divisions - 1)
319 stop_x = x + jump
320 start_y = stop_y = y + 1
321@@ -157,16 +158,19 @@
322
323 def enter_search_query(self, query):
324 current_header = self._get_current_page_header()
325- search_button = current_header.select_single(objectName="search_header_button")
326- self.pointing_device.move(search_button.globalRect.x + search_button.width / 2,
327- search_button.globalRect.y + search_button.height / 2)
328+ search_button = \
329+ current_header.select_single(objectName="search_header_button")
330+ self.pointing_device.move(
331+ search_button.globalRect.x + search_button.width / 2,
332+ search_button.globalRect.y + search_button.height / 2)
333 self.pointing_device.click()
334 headerContainer = current_header.select_single(
335 objectName="headerContainer")
336 headerContainer.contentY.wait_for(0)
337 search_text_field = self._get_search_text_field()
338 search_text_field.write(query)
339- self.select_single(objectName="processingIndicator").visible.wait_for(False)
340+ self.select_single(
341+ objectName="processingIndicator").visible.wait_for(False)
342
343 def _get_search_text_field(self):
344 page_header = self._get_current_page_header()
345@@ -182,14 +186,15 @@
346
347
348 class ListViewWithPageHeader(ubuntuuitoolkit.QQuickFlickable):
349- pass
350+
351+ margin_to_swipe_from_bottom = ubuntuuitoolkit.units.gu(4)
352
353
354 class GenericScopeView(emulators.UnityEmulatorBase):
355 """Autopilot emulator for generic scopes."""
356
357 @autopilot_logging.log_action(logger.info)
358- def open_preview(self, category, app_name):
359+ def open_preview(self, category, app_name, press_duration=0.10):
360 """Open the preview of an application.
361
362 :parameter category: The name of the category where the application is.
363@@ -200,16 +205,19 @@
364 # FIXME some categories need a long press in order to see the preview.
365 # Some categories do not show previews, like recent apps.
366 # --elopio - 2014-1-14
367- self.click_scope_item(category, app_name)
368+ self.click_scope_item(category, app_name, press_duration)
369 preview_list = self.wait_select_single(
370 'QQuickLoader', objectName='subPageLoader')
371 preview_list.subPageShown.wait_for(True)
372 preview_list.x.wait_for(0)
373+ self.get_root_instance().select_single(
374+ objectName='processingIndicator').visible.wait_for(False)
375 return preview_list.select_single(
376- Preview, objectName='preview{}'.format(preview_list.currentIndex))
377+ Preview, objectName='preview{}'.format(
378+ preview_list.initialIndex))
379
380 @autopilot_logging.log_action(logger.debug)
381- def click_scope_item(self, category, title):
382+ def click_scope_item(self, category, title, press_duration=0.10):
383 """Click an item from the scope.
384
385 :parameter category: The name of the category where the item is.
386@@ -217,13 +225,18 @@
387
388 """
389 category_element = self._get_category_element(category)
390- icon = category_element.wait_select_single('AbstractButton', title=title)
391- self.pointing_device.click_object(icon)
392+ icon = category_element.wait_select_single(
393+ 'AbstractButton', title=title)
394+ list_view = self.select_single(
395+ ListViewWithPageHeader, objectName='categoryListView')
396+ list_view.swipe_child_into_view(icon)
397+ self.pointing_device.click_object(icon, press_duration=press_duration)
398
399 def _get_category_element(self, category):
400 try:
401 return self.wait_select_single(
402- 'DashCategoryBase', objectName='dashCategory{}'.format(category))
403+ 'DashCategoryBase',
404+ objectName='dashCategory{}'.format(category))
405 except dbus.StateNotFoundError:
406 raise emulators.UnityEmulatorException(
407 'No category found with name {}'.format(category))
408
409=== modified file 'tests/autopilot/unity8/shell/emulators/greeter.py'
410--- tests/autopilot/unity8/shell/emulators/greeter.py 2015-02-06 22:12:38 +0000
411+++ tests/autopilot/unity8/shell/emulators/greeter.py 2015-04-21 15:29:15 +0000
412@@ -42,7 +42,6 @@
413
414 raise AssertionError("Greeter cover page still up after 10s")
415
416-
417 def swipe(self):
418 """Swipe the greeter screen away."""
419 self.waiting.wait_for(False)
420
421=== modified file 'tests/autopilot/unity8/shell/emulators/tutorial.py'
422--- tests/autopilot/unity8/shell/emulators/tutorial.py 2015-02-03 16:22:05 +0000
423+++ tests/autopilot/unity8/shell/emulators/tutorial.py 2015-04-21 15:29:15 +0000
424@@ -18,7 +18,6 @@
425 #
426
427 import logging
428-import time
429
430 import ubuntuuitoolkit
431
432
433=== modified file 'tests/autopilot/unity8/shell/tests/__init__.py'
434--- tests/autopilot/unity8/shell/tests/__init__.py 2015-04-09 14:00:54 +0000
435+++ tests/autopilot/unity8/shell/tests/__init__.py 2015-04-21 15:29:15 +0000
436@@ -65,6 +65,7 @@
437 UNITYSHELL_LAUNCHER_KEY = "launcher-hide-mode"
438 UNITYSHELL_LAUNCHER_MODE = 1 # launcher hidden
439
440+
441 def _get_device_emulation_scenarios(devices='All'):
442 nexus4 = ('Desktop Nexus 4',
443 dict(app_width=768, app_height=1280, grid_unit_px=18))
444
445=== modified file 'tests/autopilot/unity8/shell/tests/test_emulators.py'
446--- tests/autopilot/unity8/shell/tests/test_emulators.py 2015-02-23 17:29:04 +0000
447+++ tests/autopilot/unity8/shell/tests/test_emulators.py 2015-04-21 15:29:15 +0000
448@@ -118,6 +118,12 @@
449 self.assertIsInstance(preview, dash_emulators.Preview)
450 self.assertTrue(preview.isCurrent)
451
452+ def test_open_preview_of_non_visible_item(self):
453+ """Open an item that requires swiping to make it visible."""
454+ preview = self.generic_scope.open_preview('2', 'Title.2.0')
455+ self.assertIsInstance(preview, dash_emulators.Preview)
456+ self.assertTrue(preview.isCurrent)
457+
458
459 class DashAppsEmulatorTestCase(tests.DashBaseTestCase):
460
461
462=== modified file 'tests/autopilot/unity8/shell/tests/test_lock_screen.py'
463--- tests/autopilot/unity8/shell/tests/test_lock_screen.py 2015-03-20 14:50:04 +0000
464+++ tests/autopilot/unity8/shell/tests/test_lock_screen.py 2015-04-21 15:29:15 +0000
465@@ -41,7 +41,7 @@
466
467 if not greeter.tabletMode:
468 greeter.swipe()
469- lockscreen = self._wait_for_lockscreen()
470+ self._wait_for_lockscreen()
471 self.main_window.enter_pin_code("1234")
472 else:
473 self._enter_prompt_passphrase("1234\n")
474@@ -56,7 +56,7 @@
475
476 if not greeter.tabletMode:
477 greeter.swipe()
478- lockscreen = self._wait_for_lockscreen()
479+ self._wait_for_lockscreen()
480 self._enter_pin_passphrase("password")
481 else:
482 self._enter_prompt_passphrase("password")
483@@ -70,7 +70,7 @@
484
485 if not greeter.tabletMode:
486 greeter.swipe()
487- lockscreen = self._wait_for_lockscreen()
488+ self._wait_for_lockscreen()
489 self.main_window.enter_pin_code("4321")
490 pinentryField = self.main_window.get_pinentryField()
491 self.assertThat(pinentryField.text, Eventually(Equals("")))
492@@ -88,7 +88,7 @@
493
494 if not greeter.tabletMode:
495 greeter.swipe()
496- lockscreen = self._wait_for_lockscreen()
497+ self._wait_for_lockscreen()
498 self._enter_pin_passphrase("foobar")
499 pinentryField = self.main_window.get_pinentryField()
500 self.assertThat(pinentryField.text, Eventually(Equals("")))
501
502=== modified file 'tests/autopilot/unity8/shell/tests/test_notifications.py'
503--- tests/autopilot/unity8/shell/tests/test_notifications.py 2015-03-03 04:21:32 +0000
504+++ tests/autopilot/unity8/shell/tests/test_notifications.py 2015-04-21 15:29:15 +0000
505@@ -127,7 +127,7 @@
506 actions = [("action_id", "dummy")]
507 hints = [
508 ("x-canonical-switch-to-application", "true"),
509- ("x-canonical-secondary-icon","dialer")
510+ ("x-canonical-secondary-icon", "dialer")
511 ]
512
513 self._create_interactive_notification(
514@@ -150,7 +150,9 @@
515 self.assert_notification_action_id_was_called('action_id')
516
517 def test_sd_one_over_two_layout(self):
518- """Snap-decision with three actions should use one-over two button layout."""
519+ """Snap-decision with three actions should use
520+ one-over two button layout.
521+ """
522 unity_proxy = self.launch_unity()
523 unlock_unity(unity_proxy)
524
525@@ -189,7 +191,9 @@
526 self.assert_notification_action_id_was_called("action_accept")
527
528 def test_modal_sd_without_greeter(self):
529- """Snap-decision should block input to shell without greeter/lockscreen."""
530+ """Snap-decision should block input to shell
531+ without greeter/lockscreen.
532+ """
533 unity_proxy = self.launch_unity()
534 unlock_unity(unity_proxy)
535
536@@ -236,7 +240,9 @@
537 self.assert_notification_action_id_was_called("action_accept")
538
539 def test_modal_sd_with_greeter(self):
540- """A snap-decision should block input to the greeter/lockscreen beneath it."""
541+ """A snap-decision should block input to the
542+ greeter/lockscreen beneath it.
543+ """
544 self.launch_unity()
545
546 summary = "Incoming file"
547@@ -350,7 +356,9 @@
548 raise RuntimeError("Call to script failed with: %s" % error_output)
549
550 def _get_notify_script(self):
551- """Returns the path to the interactive notification creation script."""
552+ """Returns the path to the interactive notification
553+ creation script.
554+ """
555 file_path = "../../emulators/create_interactive_notification.py"
556
557 the_path = os.path.abspath(
558@@ -454,7 +462,7 @@
559
560 summary = "Upload of image completed"
561 icon_path = self._get_icon_path('applicationIcons/facebook.png')
562- hints=[]
563+ hints = []
564
565 notification = shell.create_ephemeral_notification(
566 summary,
567
568=== modified file 'tests/autopilot/unity8/shell/tests/test_tutorial.py'
569--- tests/autopilot/unity8/shell/tests/test_tutorial.py 2015-02-23 17:29:04 +0000
570+++ tests/autopilot/unity8/shell/tests/test_tutorial.py 2015-04-21 15:29:15 +0000
571@@ -25,7 +25,7 @@
572 tests
573 )
574 # unused import to load the tutorial emulators custom proxy objects.
575-from unity8.shell.emulators import tutorial # NOQA
576+from unity8.shell.emulators import tutorial as tutorial_emulator # NOQA
577
578
579 class TutorialTestCase(tests.UnityTestCase):

Subscribers

People subscribed via source and target branches