on xenial help sign in
Establish Indicator emulator under shell main_window emulator class.
5dd0d2eAllan LeSage
tests/autopilot/unity8/shell/emulators/main_window.py+9
@@ -99,3 +99,12 @@ class MainWindow(object):
99 "Tab",
99 "Tab",
100 objectName=indicator_name
100 objectName=indicator_name
101 )
101 )
102+
103+
104+class Indicators:
105+ network = 'indicator-network'
106+ location = 'indicator-location'
107+ messaging = 'indicator-messages'
108+ power = 'indicator-power'
109+ sound = 'indicator-sound'
110+ datetime = 'indicator-datetime'
tests/autopilot/unity8/shell/tests/test_indicators.py+8−8
@@ -20,21 +20,21 @@
20from __future__ import absolute_import
20from __future__ import absolute_import
21
21
22from unity8.shell.tests import UnityTestCase
22from unity8.shell.tests import UnityTestCase
23−
23+from unity8.shell.emulators import Indicators
24
24
25class IndicatorTestCase(UnityTestCase):
25class IndicatorTestCase(UnityTestCase):
26
26
27 scenarios = [
27 scenarios = [
28− ('Network', dict(indicator_name='indicator-network')),
28+ ('Network', dict(indicator_name=Indicators.network)),
29− ('Location', dict(indicator_name='indicator-location')),
29+ ('Location', dict(indicator_name=Indicators.location)),
30− ('Messaging', dict(indicator_name='indicator-messages')),
30+ ('Messaging', dict(indicator_name=Indicators.messaging)),
31− ('Power', dict(indicator_name='indicator-power')),
31+ ('Power', dict(indicator_name=Indicators.power)),
32− ('Sound', dict(indicator_name='indicator-sound')),
32+ ('Sound', dict(indicator_name=Indicators.sound)),
33− ('Datetime', dict(indicator_name='indicator-datetime')),
33+ ('Datetime', dict(indicator_name=Indicators.datetime)),
34 ]
34 ]
35
35
36 def test_indicator_exists(self):
36 def test_indicator_exists(self):
37− """The specific indicators tab can be found."""
37+ """The tab of a given indicator can be found."""
38
38
39 self.launch_unity()
39 self.launch_unity()
40 self.main_window.get_greeter().swipe()
40 self.main_window.get_greeter().swipe()