19 from testscenarios
import multiply_scenarios
21 from autopilot
import platform
26 class IndicatorExistsTestCase(tests.DeviceIndicatorTestCase):
28 indicator_scenarios = [
29 (
'Bluetooth', dict(indicator_name=
'indicator-bluetooth')),
30 (
'Datetime', dict(indicator_name=
'indicator-datetime')),
31 (
'Location', dict(indicator_name=
'indicator-location')),
32 (
'Messaging', dict(indicator_name=
'indicator-messages')),
33 (
'Network', dict(indicator_name=
'indicator-network')),
34 (
'Power', dict(indicator_name=
'indicator-power')),
35 (
'Sound', dict(indicator_name=
'indicator-sound')),
37 scenarios = multiply_scenarios(
39 tests.IndicatorTestCase.device_emulation_scenarios
44 if (platform.model() ==
'Nexus 10' and
45 self.indicator_name ==
'indicator-bluetooth'):
46 self.skipTest(
'Nexus 10 does not have bluetooth at the moment.')
48 def test_indicator_exists(self):
49 self.main_window._get_indicator_panel_item(
54 class IndicatorPageTitleMatchesWidgetTestCase(tests.DeviceIndicatorTestCase):
56 indicator_scenarios = [
57 (
'Bluetooth', dict(indicator_name=
'indicator-bluetooth',
59 (
'Datetime', dict(indicator_name=
'indicator-datetime',
60 title=
'Time & Date')),
61 (
'Location', dict(indicator_name=
'indicator-location',
63 (
'Messaging', dict(indicator_name=
'indicator-messages',
64 title=
'Notifications')),
65 (
'Network', dict(indicator_name=
'indicator-network',
67 (
'Power', dict(indicator_name=
'indicator-power',
69 (
'Sound', dict(indicator_name=
'indicator-sound',
72 scenarios = multiply_scenarios(
74 tests.IndicatorTestCase.device_emulation_scenarios
79 if (platform.model() ==
'Nexus 10' and
80 self.indicator_name ==
'indicator-bluetooth'):
81 self.skipTest(
'Nexus 10 does not have bluetooth at the moment.')
83 def test_indicator_page_title_matches_widget(self):
84 """Swiping open an indicator must show its correct title.
86 See https://bugs.launchpad.net/ubuntu-ux/+bug/1253804 .
88 indicator_page = self.main_window.open_indicator_page(
90 self.assertTrue(indicator_page.visible)
91 self.assertEqual(indicator_page.title, self.title)