@@ -22,24 +22,10 @@ from testscenarios import multiply_scenarios
23from autopilot import platform
23from autopilot import platform
25−from unity8 import indicators, fixture_setup
25+from unity8.indicators import tests
26−from unity8.process_helpers import unlock_unity
27−from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
30−class IndicatorTestCase(UnityTestCase):
32− device_emulation_scenarios = _get_device_emulation_scenarios()
35− if platform.model() == 'Desktop':
36− self.skipTest('Test cannot be run on the desktop.')
37− super(IndicatorTestCase, self).setUp()
38− self.unity_proxy = self.launch_unity()
39− unlock_unity(self.unity_proxy)
42−class IndicatorExistsTestCase(IndicatorTestCase):
28+class IndicatorExistsTestCase(tests.IndicatorTestCase):
44 indicator_scenarios = [
30 indicator_scenarios = [
45 ('Bluetooth', dict(indicator_name='indicator-bluetooth')),
31 ('Bluetooth', dict(indicator_name='indicator-bluetooth')),
@@ -52,7 +38,7 @@ class IndicatorExistsTestCase(IndicatorTestCase):
53 scenarios = multiply_scenarios(
39 scenarios = multiply_scenarios(
54 indicator_scenarios,
40 indicator_scenarios,
55− IndicatorTestCase.device_emulation_scenarios
41+ tests.IndicatorTestCase.device_emulation_scenarios
58 def setUp(self):
44 def setUp(self):
@@ -67,7 +53,7 @@ class IndicatorExistsTestCase(IndicatorTestCase):
70−class IndicatorPageTitleMatchesWidgetTestCase(IndicatorTestCase):
56+class IndicatorPageTitleMatchesWidgetTestCase(tests.IndicatorTestCase):
72 indicator_scenarios = [
58 indicator_scenarios = [
73 ('Bluetooth', dict(indicator_name='indicator-bluetooth',
59 ('Bluetooth', dict(indicator_name='indicator-bluetooth',
@@ -87,7 +73,7 @@ class IndicatorPageTitleMatchesWidgetTestCase(IndicatorTestCase):
88 scenarios = multiply_scenarios(
74 scenarios = multiply_scenarios(
89 indicator_scenarios,
75 indicator_scenarios,
90− IndicatorTestCase.device_emulation_scenarios
76+ tests.IndicatorTestCase.device_emulation_scenarios
93 def setUp(self):
79 def setUp(self):
@@ -105,17 +91,3 @@ class IndicatorPageTitleMatchesWidgetTestCase(IndicatorTestCase):
105 self.indicator_name)
91 self.indicator_name)
106 self.assertTrue(indicator_page.visible)
92 self.assertTrue(indicator_page.visible)
107 self.assertEqual(indicator_page.title, self.title)
93 self.assertEqual(indicator_page.title, self.title)
110−class DisplayIndicatorTestCase(IndicatorTestCase):
113− display_indicator = indicators.DisplayIndicator(self.main_window)
114− display_indicator_page = display_indicator.open()
115− fixture = fixture_setup.DisplayRotationLock(False)
117− display_indicator_page.unlock_rotation()
118− self.assertEqual(fixture._is_rotation_lock_enabled(), False)
120− display_indicator_page.lock_rotation()
121− self.assertEqual(fixture._is_rotation_lock_enabled(), True)