on xenial help sign in
Add emulators and stub tests for most indicators.
10f1878Allan LeSage
tests/autopilot/unity8/shell/emulators/main_window.py+30
@@ -93,3 +93,33 @@ class MainWindow(object):
93
93
94 def get_pinentryField(self):
94 def get_pinentryField(self):
95 return self.app.select_single(objectName="pinentryField")
95 return self.app.select_single(objectName="pinentryField")
96+
97+ def get_network_indicator(self):
98+ return self.app.select_single(
99+ "Tab",
100+ objectName="indicator-network")
101+
102+ def get_location_indicator(self):
103+ return self.app.select_single(
104+ "Tab",
105+ objectName="indicator-location")
106+
107+ def get_messaging_indicator(self):
108+ return self.app.select_single(
109+ "Tab",
110+ objectName="indicator-messages")
111+
112+ def get_power_indicator(self):
113+ return self.app.select_single(
114+ "Tab",
115+ objectName="indicator-power")
116+
117+ def get_sound_indicator(self):
118+ return self.app.select_single(
119+ "Tab",
120+ objectName="indicator-sound")
121+
122+ def get_datetime_indicator(self):
123+ return self.app.select_single(
124+ "Tab",
125+ objectName="indicator-datetime")
tests/autopilot/unity8/shell/tests/test_datetime_indicator.pynew file+34
@@ -0,0 +1,34 @@
1+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2+#
3+# Unity Autopilot Test Suite
4+# Copyright (C) 2012-2013 Canonical
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License as published by
8+# the Free Software Foundation, either version 3 of the License, or
9+# (at your option) any later version.
10+#
11+# This program is distributed in the hope that it will be useful,
12+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+# GNU General Public License for more details.
15+#
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/>.
18+#
19+
20+from __future__ import absolute_import
21+
22+from unity8.shell.tests import UnityTestCase
23+
24+
25+class DatetimeIndicatorTestCase(UnityTestCase):
26+
27+ def test_datetime_indicator_exists(self):
28+ """The 'indicator-datetime' tab can be found."""
29+
30+ self.launch_unity()
31+ self.main_window.get_greeter().swipe()
32+ window = self.main_window.get_qml_view()
33+ datetime_indicator = self.main_window.get_datetime_indicator()
34+ self.assertIsNotNone(datetime_indicator)
tests/autopilot/unity8/shell/tests/test_location_indicator.pynew file+34
@@ -0,0 +1,34 @@
1+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2+#
3+# Unity Autopilot Test Suite
4+# Copyright (C) 2012-2013 Canonical
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License as published by
8+# the Free Software Foundation, either version 3 of the License, or
9+# (at your option) any later version.
10+#
11+# This program is distributed in the hope that it will be useful,
12+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+# GNU General Public License for more details.
15+#
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/>.
18+#
19+
20+from __future__ import absolute_import
21+
22+from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
23+
24+
25+class TestLocationIndicator(UnityTestCase):
26+
27+ def test_location_indicator_exists(self):
28+ """The 'indicator-location' tab can be found."""
29+
30+ self.launch_unity()
31+ self.main_window.get_greeter().swipe()
32+ window = self.main_window.get_qml_view()
33+ location_indicator = self.main_window.get_location_indicator()
34+ self.assertIsNotNone(location_indicator)
tests/autopilot/unity8/shell/tests/test_messaging_indcator.pynew file+34
@@ -0,0 +1,34 @@
1+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2+#
3+# Unity Autopilot Test Suite
4+# Copyright (C) 2012-2013 Canonical
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License as published by
8+# the Free Software Foundation, either version 3 of the License, or
9+# (at your option) any later version.
10+#
11+# This program is distributed in the hope that it will be useful,
12+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+# GNU General Public License for more details.
15+#
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/>.
18+#
19+
20+from __future__ import absolute_import
21+
22+from unity8.shell.tests import UnityTestCase
23+
24+
25+class MessagingIndicatorTestCase(UnityTestCase):
26+
27+ def test_messaging_indicator_exists(self):
28+ """The 'indicator-messages' tab can be found."""
29+
30+ self.launch_unity()
31+ self.main_window.get_greeter().swipe()
32+ window = self.main_window.get_qml_view()
33+ messaging_indicator = self.main_window.get_messaging_indicator()
34+ self.assertIsNotNone(messaging_indicator)
tests/autopilot/unity8/shell/tests/test_network_indicator.pynew file+34
@@ -0,0 +1,34 @@
1+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2+#
3+# Unity Autopilot Test Suite
4+# Copyright (C) 2012-2013 Canonical
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License as published by
8+# the Free Software Foundation, either version 3 of the License, or
9+# (at your option) any later version.
10+#
11+# This program is distributed in the hope that it will be useful,
12+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+# GNU General Public License for more details.
15+#
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/>.
18+#
19+
20+from __future__ import absolute_import
21+
22+from unity8.shell.tests import UnityTestCase
23+
24+
25+class NetworkIndicatorTestCase(UnityTestCase):
26+
27+ def test_network_indicator_exists(self):
28+ """The 'indicator-network' tab can be found."""
29+
30+ self.launch_unity()
31+ self.main_window.get_greeter().swipe()
32+ window = self.main_window.get_qml_view()
33+ network_indicator = self.main_window.get_network_indicator()
34+ self.assertIsNotNone(network_indicator)
tests/autopilot/unity8/shell/tests/test_power_indicator.pynew file+34
@@ -0,0 +1,34 @@
1+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2+#
3+# Unity Autopilot Test Suite
4+# Copyright (C) 2012-2013 Canonical
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License as published by
8+# the Free Software Foundation, either version 3 of the License, or
9+# (at your option) any later version.
10+#
11+# This program is distributed in the hope that it will be useful,
12+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+# GNU General Public License for more details.
15+#
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/>.
18+#
19+
20+from __future__ import absolute_import
21+
22+from unity8.shell.tests import UnityTestCase
23+
24+
25+class PowerIndicatorTestCase(UnityTestCase):
26+
27+ def test_power_indicator_exists(self):
28+ """The 'indicator-power' tab can be found."""
29+
30+ self.launch_unity()
31+ self.main_window.get_greeter().swipe()
32+ window = self.main_window.get_qml_view()
33+ power_indicator = self.main_window.get_power_indicator()
34+ self.assertIsNotNone(power_indicator)
tests/autopilot/unity8/shell/tests/test_sound_indicator.pynew file+34
@@ -0,0 +1,34 @@
1+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2+#
3+# Unity Autopilot Test Suite
4+# Copyright (C) 2012-2013 Canonical
5+#
6+# This program is free software: you can redistribute it and/or modify
7+# it under the terms of the GNU General Public License as published by
8+# the Free Software Foundation, either version 3 of the License, or
9+# (at your option) any later version.
10+#
11+# This program is distributed in the hope that it will be useful,
12+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+# GNU General Public License for more details.
15+#
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/>.
18+#
19+
20+from __future__ import absolute_import
21+
22+from unity8.shell.tests import UnityTestCase
23+
24+
25+class SoundIndicatorTestCase(UnityTestCase):
26+
27+ def test_sound_indicator_exists(self):
28+ """The 'indicator-sound' tab can be found."""
29+
30+ self.launch_unity()
31+ self.main_window.get_greeter().swipe()
32+ window = self.main_window.get_qml_view()
33+ sound_indicator = self.main_window.get_sound_indicator()
34+ self.assertIsNotNone(sound_indicator)