on xenial help sign in
Removed battery & time indicators
f7a2e7eNick Dedekind
Panel/IndicatorsDataModel.qml−12
@@ -82,18 +82,6 @@ Indicators.IndicatorsModel {
82 'description' : '',
82 'description' : '',
83 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorWidget.qml',
83 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorWidget.qml',
84 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorPage.qml'
84 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorPage.qml'
85− },
86− 'indicator-battery' : {
87− 'title': 'Battery',
88− 'description' : '',
89− 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget.qml',
90− 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage.qml'
91− },
92− 'indicator-time' : {
93− 'title': 'Date and Time',
94− 'description' : '',
95− 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DatetimeIndicatorWidget.qml',
96− 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DatetimeIndicatorPage.qml'
97 }
85 }
98 }
86 }
99}
87}
src/Panel/Indicators/servicefiles/CMakeLists.txt−2
@@ -1,7 +1,5 @@
1file(GLOB INDICATOR_SERVICE_FILES
1file(GLOB INDICATOR_SERVICE_FILES
2− ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.indicator.battery
3 ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.indicator.messages
2 ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.indicator.messages
4− ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.indicator.time
5 ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.settings.network
3 ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.settings.network
6 ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.settings.sound
4 ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.settings.sound
7)
5)
src/Panel/Indicators/servicefiles/com.canonical.indicator.batterydeleted−10
@@ -1,10 +0,0 @@
1−[Indicator Service]
2−Name=indicator-battery
3−ObjectPath=/com/canonical/indicator/battery
4−Position=40
5−
6−[phone]
7−ObjectPath=/com/canonical/indicator/battery/phone
8−
9−[desktop]
10−ObjectPath=/com/canonical/indicator/battery/phone
src/Panel/Indicators/servicefiles/com.canonical.indicator.timedeleted−10
@@ -1,10 +0,0 @@
1−[Indicator Service]
2−Name=indicator-time
3−ObjectPath=/com/canonical/indicator/time
4−Position=20
5−
6−[phone]
7−ObjectPath=/com/canonical/indicator/time/phone
8−
9−[desktop]
10−ObjectPath=/com/canonical/indicator/time/desktop
tests/autopilot/unity8/indicators_client/tests/test_battery.py+14−8
@@ -15,11 +15,21 @@ from unity8.indicators_client.tests import IndicatorsTestCase
15from time import sleep
15from time import sleep
16import random
16import random
17import math
17import math
18+import unittest
18
19
19class TestDisplayMenus(IndicatorsTestCase):
20class TestDisplayMenus(IndicatorsTestCase):
20 def setUp(self):
21 def setUp(self):
21 super(TestDisplayMenus, self).setUp(self.geometry, self.grid_unit)
22 super(TestDisplayMenus, self).setUp(self.geometry, self.grid_unit)
22
23
24+ def tearDown(self):
25+ # self.main_window.get_indicators_client().reset()
26+ super(TestDisplayMenus, self).tearDown()
27+
28+ # START SECTION
29+ # We need to move these to emulators once autopilot supports emulators for
30+ # applications started with AutopilotTestCase.launch_test_application
31+
32+ def open_battery_menu(self):
23 # This opens the messaging menu so you don't have to do that in
33 # This opens the messaging menu so you don't have to do that in
24 # every test case
34 # every test case
25 self.assertThat(lambda: self.main_window.get_battery_menu(), Eventually(NotEquals(None)));
35 self.assertThat(lambda: self.main_window.get_battery_menu(), Eventually(NotEquals(None)));
@@ -31,14 +41,6 @@ class TestDisplayMenus(IndicatorsTestCase):
31 page_loader = fn_loader();
41 page_loader = fn_loader();
32 self.assertThat(page_loader.progress, Eventually(Equals(1.0)))
42 self.assertThat(page_loader.progress, Eventually(Equals(1.0)))
33
43
34− def tearDown(self):
35− # self.main_window.get_indicators_client().reset()
36− super(TestDisplayMenus, self).tearDown()
37−
38− # START SECTION
39− # We need to move these to emulators once autopilot supports emulators for
40− # applications started with AutopilotTestCase.launch_test_application
41−
42 def switch_auto_brightness(self, auto_brightness):
44 def switch_auto_brightness(self, auto_brightness):
43 ab_switch = auto_brightness.select_single("CheckBox");
45 ab_switch = auto_brightness.select_single("CheckBox");
44 self.assertThat(ab_switch, NotEquals(None))
46 self.assertThat(ab_switch, NotEquals(None))
@@ -65,8 +67,10 @@ class TestDisplayMenus(IndicatorsTestCase):
65
67
66 old_ab_value = brightness_slider.value
68 old_ab_value = brightness_slider.value
67
69
70+ @unittest.skip("Battery indicator has been removed.")
68 def test_auto_bright_switch(self):
71 def test_auto_bright_switch(self):
69 """Test the auto-bright switch"""
72 """Test the auto-bright switch"""
73+ self.open_battery_menu()
70
74
71 # wait for the switch menu item
75 # wait for the switch menu item
72 fn_auto_brightness = lambda: self.app.select_single("SwitchMenuItem", objectName="auto-brightness");
76 fn_auto_brightness = lambda: self.app.select_single("SwitchMenuItem", objectName="auto-brightness");
@@ -84,8 +88,10 @@ class TestDisplayMenus(IndicatorsTestCase):
84 # TODO - should check backend when it's introspectable.
88 # TODO - should check backend when it's introspectable.
85 self.assertThat(auto_brightness.checked, Eventually(NotEquals(old_ab_value)))
89 self.assertThat(auto_brightness.checked, Eventually(NotEquals(old_ab_value)))
86
90
91+ @unittest.skip("Battery indicator has been removed.")
87 def test_brightness_slider(self):
92 def test_brightness_slider(self):
88 """Test the auto-bright switch"""
93 """Test the auto-bright switch"""
94+ self.open_battery_menu()
89
95
90 fn_brightness_menu = lambda: self.app.select_single("SliderMenuItem", objectName="brightness");
96 fn_brightness_menu = lambda: self.app.select_single("SliderMenuItem", objectName="brightness");
91 # FIXME: this should go away when we switch to indicator-power
97 # FIXME: this should go away when we switch to indicator-power