on xenial help sign in
Fix cannot open.
52d953bYing-Chun Liu
tests/autopilot/unity8/indicators/__init__.py+6−5
@@ -20,6 +20,7 @@ from autopilot import input
20from unity8.shell import emulators
20from unity8.shell import emulators
21from unity8.shell.emulators import main_window
21from unity8.shell.emulators import main_window
22import unity8.indicators
22import unity8.indicators
23+import ubuntuuitoolkit
23
24
24class IndicatorsMenu (emulators.UnityEmulatorBase):
25class IndicatorsMenu (emulators.UnityEmulatorBase):
25 """Autopilot helper for the IndicatorPage component."""
26 """Autopilot helper for the IndicatorPage component."""
@@ -27,7 +28,7 @@ class IndicatorsMenu (emulators.UnityEmulatorBase):
27 widget = self.select_single('IndicatorItem',objectName='indicator-sound-panelItem')
28 widget = self.select_single('IndicatorItem',objectName='indicator-sound-panelItem')
28 start_x, start_y = input.get_center_point(widget)
29 start_x, start_y = input.get_center_point(widget)
29 end_x = start_x
30 end_x = start_x
30− end_y = self.height
31+ end_y = self.globalRect.y + self.openedHeight
31 self.pointing_device.drag(start_x, start_y, end_x, end_y)
32 self.pointing_device.drag(start_x, start_y, end_x, end_y)
32 self.fullyOpened.wait_for(True)
33 self.fullyOpened.wait_for(True)
33
34
@@ -56,8 +57,8 @@ class DisplayIndicator (emulators.UnityEmulatorBase):
56 to 'On'.
57 to 'On'.
57
58
58 """
59 """
59− switcher = self.select_single('CheckBox', objectName='switcher')
60+ switcher = self.select_single(ubuntuuitoolkit.CheckBox, objectName='switcher')
60− switcher.checked = True
61+ switcher.check()
61 pass
62 pass
62
63
63 def unlock_rotation(self):
64 def unlock_rotation(self):
@@ -67,6 +68,6 @@ class DisplayIndicator (emulators.UnityEmulatorBase):
67 to 'Off'.
68 to 'Off'.
68
69
69 """
70 """
70− switcher = self.select_single('CheckBox', objectName='switcher')
71+ switcher = self.select_single(ubuntuuitoolkit.CheckBox, objectName='switcher')
71− switcher.checked = False
72+ switcher.uncheck()
72 pass
73 pass