on xenial help sign in
Fix cannot open.

Use ubuntuuitoolkit.CheckBox

commit52d953b18fdb635803dc8c646170efb0ce7c5553 authorYing-Chun Liu <paul.liu@canonical.com> dateWed 14 Jan 2015, 00:05 (12 years ago) parentc46741a
1 file changed+6−5
tests/autopilot/unity8/indicators/__init__.py+6−5
tests/autopilot/unity8/indicators/__init__.py+6−5
@@ -20,6 +20,7 @@ from autopilot import input
2020from unity8.shell import emulators
2121from unity8.shell.emulators import main_window
2222import unity8.indicators
23+import ubuntuuitoolkit
2324
2425class IndicatorsMenu (emulators.UnityEmulatorBase):
2526 """Autopilot helper for the IndicatorPage component."""
@@ -27,7 +28,7 @@ class IndicatorsMenu (emulators.UnityEmulatorBase):
2728 widget = self.select_single('IndicatorItem',objectName='indicator-sound-panelItem')
2829 start_x, start_y = input.get_center_point(widget)
2930 end_x = start_x
30− end_y = self.height
31+ end_y = self.globalRect.y + self.openedHeight
3132 self.pointing_device.drag(start_x, start_y, end_x, end_y)
3233 self.fullyOpened.wait_for(True)
3334
@@ -56,8 +57,8 @@ class DisplayIndicator (emulators.UnityEmulatorBase):
5657 to 'On'.
5758
5859 """
59− switcher = self.select_single('CheckBox', objectName='switcher')
60− switcher.checked = True
60+ switcher = self.select_single(ubuntuuitoolkit.CheckBox, objectName='switcher')
61+ switcher.check()
6162 pass
6263
6364 def unlock_rotation(self):
@@ -67,6 +68,6 @@ class DisplayIndicator (emulators.UnityEmulatorBase):
6768 to 'Off'.
6869
6970 """
70− switcher = self.select_single('CheckBox', objectName='switcher')
71− switcher.checked = False
71+ switcher = self.select_single(ubuntuuitoolkit.CheckBox, objectName='switcher')
72+ switcher.uncheck()
7273 pass