@@ -23,10 +23,10 @@ from autopilot import platform
23from testtools import skipIf
23from testtools import skipIf
25from unity8.process_helpers import unlock_unity
25from unity8.process_helpers import unlock_unity
26−from unity8.shell.tests import UnityTestCase
26+from unity8.indicators.tests import IndicatorBaseTestCase
29−class IndicatorTestCase(UnityTestCase):
29+class IndicatorTestCase(IndicatorBaseTestCase):
31 scenarios = [
31 scenarios = [
32 ('Bluetooth', dict(indicator_name='indicator-bluetooth')),
32 ('Bluetooth', dict(indicator_name='indicator-bluetooth')),
@@ -47,5 +47,49 @@ class IndicatorTestCase(UnityTestCase):
47 """The tab of a given indicator can be found."""
47 """The tab of a given indicator can be found."""
48 unity_proxy = self.launch_unity()
48 unity_proxy = self.launch_unity()
49 unlock_unity(unity_proxy)
49 unlock_unity(unity_proxy)
50+ widget = self.main_window.get_indicator_widget(
53+ self.assertIsNotNone(widget)
56+class IndicatorPageTitleMatchesWidgetTestCase(IndicatorBaseTestCase):
59+ ('Bluetooth', dict(indicator_name='indicator-bluetooth',
61+ ('Datetime', dict(indicator_name='indicator-datetime',
63+ ('Location', dict(indicator_name='indicator-location',
65+ ('Messaging', dict(indicator_name='indicator-messages',
67+ ('Network', dict(indicator_name='indicator-network',
69+ ('Power', dict(indicator_name='indicator-power',
71+ ('Sound', dict(indicator_name='indicator-sound',
75+ @skipIf(platform.image_codename() == 'Desktop',
76+ "Unity8/phablet-only test!")
78+ super(IndicatorPageTitleMatchesWidgetTestCase, self).setUp()
80+ def test_indicator_page_title_matches_widget(self):
81+ """When I swipe open an indicator, I should see its correct title.
83+ See https://bugs.launchpad.net/ubuntu-ux/+bug/1253804 .
85+ unity_proxy = self.launch_unity()
86+ unlock_unity(unity_proxy)
87+ window = self.main_window.get_qml_view()
88+ widget = self.main_window.get_indicator_widget(
50− indicator = self.main_window.get_indicator(self.indicator_name)
89+ self.indicator_name
51− self.assertIsNotNone(indicator)
91+ self.assertIsNotNone(widget)
92+ self.swipe_to_open_indicator(widget, window)
93+ title = window.wait_select_single("IndicatorPage",
95+ self.assertIsNotNone(title)