@@ -20,13 +20,13 @@
2020from __future__ import absolute_import
2121
2222from autopilot import platform
23−from testtools import skipIf
2423
24+from unity8.indicators.emulators.widget import DefaultIndicatorWidget
2525from unity8.process_helpers import unlock_unity
26−from unity8.indicators.tests import IndicatorBaseTestCase
26+from unity8.shell.tests import UnityTestCase
2727
2828
29−class IndicatorTestCase(IndicatorBaseTestCase):
29+class IndicatorTestCase(UnityTestCase):
3030
3131 scenarios = [
3232 ('Bluetooth', dict(indicator_name='indicator-bluetooth')),
@@ -38,9 +38,9 @@ class IndicatorTestCase(IndicatorBaseTestCase):
3838 ('Sound', dict(indicator_name='indicator-sound')),
3939 ]
4040
41− @skipIf(platform.image_codename() == 'Desktop',
42− "Unity8/phablet-only test!")
4341 def setUp(self):
42+ if model() == "Desktop":
43+ self.skipTest("Test cannot be run on the desktop.")
4444 super(IndicatorTestCase, self).setUp()
4545
4646 def test_indicator_exists(self):
@@ -53,7 +53,7 @@ class IndicatorTestCase(IndicatorBaseTestCase):
5353 self.assertIsNotNone(widget)
5454
5555
56−class IndicatorPageTitleMatchesWidgetTestCase(IndicatorBaseTestCase):
56+class IndicatorPageTitleMatchesWidgetTestCase(UnityTestCase):
5757
5858 scenarios = [
5959 ('Bluetooth', dict(indicator_name='indicator-bluetooth',
@@ -72,24 +72,25 @@ class IndicatorPageTitleMatchesWidgetTestCase(IndicatorBaseTestCase):
7272 title='Sound')),
7373 ]
7474
75− @skipIf(platform.image_codename() == 'Desktop',
76− "Unity8/phablet-only test!")
7775 def setUp(self):
76+ if model() == "Desktop":
77+ self.skipTest("Test cannot be run on the desktop.")
7878 super(IndicatorPageTitleMatchesWidgetTestCase, self).setUp()
7979
8080 def test_indicator_page_title_matches_widget(self):
81− """When I swipe open an indicator, I should see its correct title.
81+ """Swiping open an indicator must show its correct title.
8282
8383 See https://bugs.launchpad.net/ubuntu-ux/+bug/1253804 .
8484 """
8585 unity_proxy = self.launch_unity()
8686 unlock_unity(unity_proxy)
8787 window = self.main_window.get_qml_view()
88− widget = self.main_window.get_indicator_widget(
89− self.indicator_name
88+ widget = DefaultIndicatorWidget(
89+ self.main_window.get_indicator_widget(
90+ self.indicator_name
91+ )
9092 )
9193 self.assertIsNotNone(widget)
9294 self.swipe_to_open_indicator(widget, window)
9395 title = window.wait_select_single("IndicatorPage",
9496 title=self.title)
95− self.assertIsNotNone(title)