on xenial help sign in
Added an IndicatorPage custom proxy object.
commit13370c551fb8167a688bff0f9032ede98c1141ea authorLeo Arias <leo.arias@canonical.com> dateMon 12 Jan 2015, 12:01 (12 years ago) parent1998b47
2 files changed+10−2
tests/autopilot/unity8/indicators/tests/test_indicators.py+4−1 tests/autopilot/unity8/shell/emulators/main_window.py+6−1
tests/autopilot/unity8/indicators/tests/test_indicators.py+4−1
@@ -23,6 +23,7 @@ from testscenarios import multiply_scenarios
2323from autopilot import platform
2424
2525from unity8.process_helpers import unlock_unity
26+from unity8.shell.emulators import main_window
2627from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
2728
2829
@@ -109,4 +110,6 @@ class IndicatorPageTitleMatchesWidgetTestCase(IndicatorTestCase):
109110class DisplayIndicatorTestCase(IndicatorTestCase):
110111
111112 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):
7070
7171 def _get_indicator_page(self, indicator_name):
7272 return self.select_single(
73− 'IndicatorPage',
73+ IndicatorPage,
7474 objectName=indicator_name+'-page'
7575 )
7676
@@ -164,3 +164,8 @@ class QQuickView(emulators.UnityEmulatorBase):
164164 'PinPadButton',
165165 objectName='pinPadButton{}'.format(button_id)
166166 )
167+
168+
169+class IndicatorPage(emulators.UnityEmulatorBase):
170+
171+ """Autopilot helper for the IndicatorPage component."""