@@ -16,9 +16,11 @@
16# You should have received a copy of the GNU General Public License
16# You should have received a copy of the GNU General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
19from testscenarios import multiply_scenarios
21from testscenarios import multiply_scenarios
21−from autopilot import platform
23+import autopilot.platform
23from unity8.indicators import tests
25from unity8.indicators import tests
@@ -39,12 +41,6 @@ class IndicatorExistsTestCase(tests.DeviceIndicatorTestCase):
39 tests.IndicatorTestCase.device_emulation_scenarios
41 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):
44 def test_indicator_exists(self):
49 self.main_window._get_indicator_panel_item(
45 self.main_window._get_indicator_panel_item(
50 self.indicator_name
46 self.indicator_name
@@ -74,12 +70,6 @@ class IndicatorPageTitleMatchesWidgetTestCase(tests.DeviceIndicatorTestCase):
74 tests.IndicatorTestCase.device_emulation_scenarios
70 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):
73 def test_indicator_page_title_matches_widget(self):
84 """Swiping open an indicator must show its correct title.
74 """Swiping open an indicator must show its correct title.
@@ -87,5 +77,12 @@ class IndicatorPageTitleMatchesWidgetTestCase(tests.DeviceIndicatorTestCase):
88 indicator_page = self.main_window.open_indicator_page(
78 indicator_page = self.main_window.open_indicator_page(
89 self.indicator_name)
79 self.indicator_name)
80+ if self.indicator_name == 'indicator-bluetooth':
81+ if autopilot.platform.model() == 'Nexus 10':
82+ self.expectFailure('Nexus 10 does not have bluetooth at the moment.',
83+ self.assertTrue, indicator_page.visible)
84+ if platform.linux_distribution()[2] == 'wily':
85+ self.expectFailure('Bluetooth doesn\'t work on wily at the moment.',
86+ self.assertTrue, indicator_page.visible)
90 self.assertTrue(indicator_page.visible)
87 self.assertTrue(indicator_page.visible)
91 self.assertEqual(indicator_page.title, self.title)
88 self.assertEqual(indicator_page.title, self.title)