on xenial help sign in
Move getting the indicator page to main_window emulator.
c0c316dAllan LeSage
tests/autopilot/unity8/indicators/tests/test_indicators.py+3−4
@@ -91,8 +91,7 @@ class IndicatorPageTitleMatchesWidgetTestCase(IndicatorTestCase):
91 unlock_unity(unity_proxy)
91 unlock_unity(unity_proxy)
92 widget = self.main_window.get_indicator_widget(self.indicator_name)
92 widget = self.main_window.get_indicator_widget(self.indicator_name)
93 widget.swipe_to_open_indicator(self.main_window)
93 widget.swipe_to_open_indicator(self.main_window)
94− self.main_window.wait_select_single(
94+ indicator_page = self.main_window.get_indicator_page(
95− "DefaultIndicatorPage",
96− title=self.title,
95+ indicator_title=self.title
97− visible=True
98 )
96 )
97+ self.assertTrue(indicator_page.visible)
tests/autopilot/unity8/shell/emulators/main_window.py+6
@@ -94,6 +94,12 @@ class QQuickView(emulators.UnityEmulatorBase):
94 objectName=indicator_name+'-widget'
94 objectName=indicator_name+'-widget'
95 )
95 )
96
96
97+ def get_indicator_page(self, indicator_title):
98+ return self.select_single(
99+ 'DefaultIndicatorPage',
100+ title=indicator_title
101+ )
102+
97 def get_shell_background(self):
103 def get_shell_background(self):
98 return self.select_single(
104 return self.select_single(
99 "CrossFadeImage", objectName="backgroundImage")
105 "CrossFadeImage", objectName="backgroundImage")