@@ -1,6 +1,6 @@
11# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
22#
3−# Unity - Indicators Autopilot Test Suite
3+# Unity Indicators Autopilot Test Suite
44# Copyright (C) 2013 Canonical
55#
66# This program is free software: you can redistribute it and/or modify
@@ -19,7 +19,7 @@
1919
2020from __future__ import absolute_import
2121
22−from autopilot import platform
22+from autopilot.platform import model
2323
2424from unity8.indicators.emulators.widget import DefaultIndicatorWidget
2525from unity8.process_helpers import unlock_unity
@@ -39,7 +39,7 @@ class IndicatorTestCase(UnityTestCase):
3939 ]
4040
4141 def setUp(self):
42− if model() == "Desktop":
42+ if self.model() == "Desktop":
4343 self.skipTest("Test cannot be run on the desktop.")
4444 super(IndicatorTestCase, self).setUp()
4545
@@ -56,20 +56,20 @@ class IndicatorTestCase(UnityTestCase):
5656class IndicatorPageTitleMatchesWidgetTestCase(UnityTestCase):
5757
5858 scenarios = [
59− ('Bluetooth', dict(indicator_name='indicator-bluetooth',
60− title='Bluetooth')),
61− ('Datetime', dict(indicator_name='indicator-datetime',
62− title='Upcoming')),
63− ('Location', dict(indicator_name='indicator-location',
64− title='Location')),
65− ('Messaging', dict(indicator_name='indicator-messages',
66− title='Incoming')),
67− ('Network', dict(indicator_name='indicator-network',
68− title='Network')),
59+ #('Bluetooth', dict(indicator_name='indicator-bluetooth',
60+ # title='Bluetooth')),
61+ #('Datetime', dict(indicator_name='indicator-datetime',
62+ # title='Upcoming')),
63+ #('Location', dict(indicator_name='indicator-location',
64+ # title='Location')),
65+ #('Messaging', dict(indicator_name='indicator-messages',
66+ # title='Incoming')),
67+ #('Network', dict(indicator_name='indicator-network',
68+ # title='Network')),
6969 ('Power', dict(indicator_name='indicator-power',
7070 title='Battery')),
71− ('Sound', dict(indicator_name='indicator-sound',
72− title='Sound')),
71+ #('Sound', dict(indicator_name='indicator-sound',
72+ # title='Sound')),
7373 ]
7474
7575 def setUp(self):
@@ -85,12 +85,8 @@ class IndicatorPageTitleMatchesWidgetTestCase(UnityTestCase):
8585 unity_proxy = self.launch_unity()
8686 unlock_unity(unity_proxy)
8787 window = self.main_window.get_qml_view()
88− widget = DefaultIndicatorWidget(
89− self.main_window.get_indicator_widget(
90− self.indicator_name
91− )
92− )
88+ widget = self.main_window.get_indicator_widget(self.indicator_name)
9389 self.assertIsNotNone(widget)
94− self.swipe_to_open_indicator(widget, window)
90+ widget.swipe_to_open_indicator(window)
9591 title = window.wait_select_single("IndicatorPage",
9692 title=self.title)