on xenial help sign in
Added an IndicatorPage custom proxy object.
13370c5Leo Arias
tests/autopilot/unity8/indicators/tests/test_indicators.py+4−1
@@ -23,6 +23,7 @@ from testscenarios import multiply_scenarios
23from autopilot import platform
23from autopilot import platform
24
24
25from unity8.process_helpers import unlock_unity
25from unity8.process_helpers import unlock_unity
26+from unity8.shell.emulators import main_window
26from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
27from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
27
28
28
29
@@ -109,4 +110,6 @@ class IndicatorPageTitleMatchesWidgetTestCase(IndicatorTestCase):
109class DisplayIndicatorTestCase(IndicatorTestCase):
110class DisplayIndicatorTestCase(IndicatorTestCase):
110
111
111 def test(self):
112 def test(self):
112− self.main_window.print_tree('/tmp/tree')
113+ indicator_page = self.main_window.open_indicator_page(
114+ 'indicator-sound')
115+ self.assertIsInstance(indicator_page, main_window.IndicatorPage)
tests/autopilot/unity8/shell/emulators/main_window.py+6−1
@@ -70,7 +70,7 @@ class QQuickView(emulators.UnityEmulatorBase):
70
70
71 def _get_indicator_page(self, indicator_name):
71 def _get_indicator_page(self, indicator_name):
72 return self.select_single(
72 return self.select_single(
73− 'IndicatorPage',
73+ IndicatorPage,
74 objectName=indicator_name+'-page'
74 objectName=indicator_name+'-page'
75 )
75 )
76
76
@@ -164,3 +164,8 @@ class QQuickView(emulators.UnityEmulatorBase):
164 'PinPadButton',
164 'PinPadButton',
165 objectName='pinPadButton{}'.format(button_id)
165 objectName='pinPadButton{}'.format(button_id)
166 )
166 )
167+
168+
169+class IndicatorPage(emulators.UnityEmulatorBase):
170+
171+ """Autopilot helper for the IndicatorPage component."""