on xenial help sign in
merged with trunk
d9d262cNick Dedekind
Panel/Indicators/NetworkIndicatorPage.qml+2−2
@@ -23,7 +23,7 @@ import Unity.IndicatorsLegacy.Network 0.1 as ICNetwork
23import Ubuntu.Components 0.1
23import Ubuntu.Components 0.1
24
24
25PageStack {
25PageStack {
26− id: network
26+ id: networkPage
27 // Stops the search for a parent tree node.
27 // Stops the search for a parent tree node.
28 // We don't want it going up to the indicator tabs.
28 // We don't want it going up to the indicator tabs.
29 // FIXME: need a better way of doing this.
29 // FIXME: need a better way of doing this.
@@ -60,7 +60,7 @@ PageStack {
60 id: networkAgent
60 id: networkAgent
61
61
62 onSecretRequested: {
62 onSecretRequested: {
63− _network.push(passwordPageComponent, {"token": token});
63+ networkPage.push(passwordPageComponent, {"token": token});
64 }
64 }
65 }
65 }
66
66
Panel/IndicatorsDataModel.qml−18
@@ -71,29 +71,11 @@ Indicators.IndicatorsModel {
71 },
71 },
72
72
73 // OLD FORMAT INDICATORS
73 // OLD FORMAT INDICATORS
74− 'chewie-sound' : {
75− 'title': 'Sound',
76− 'description' : '',
77− 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/SoundIndicatorWidget.qml',
78− 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage.qml'
79− },
80 'chewie-network' : {
74 'chewie-network' : {
81 'title': 'Networks',
75 'title': 'Networks',
82 'description' : '',
76 'description' : '',
83 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorWidget.qml',
77 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorWidget.qml',
84 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorPage.qml'
78 '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 }
79 }
98 }
80 }
99}
81}
src/Panel/Indicators/servicefiles/CMakeLists.txt−3
@@ -1,9 +1,6 @@
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
7)
4)
8
5
9# copy indicators files into build directory for shadow builds
6# copy indicators files into build directory for shadow builds
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
src/Panel/Indicators/servicefiles/com.canonical.settings.sounddeleted−10
@@ -1,10 +0,0 @@
1−[Indicator Service]
2−Name=chewie-sound
3−ObjectPath=/com/canonical/settings/sound
4−Position=30
5−
6−[phone]
7−ObjectPath=/com/canonical/settings/sound/phone
8−
9−[desktop]
10−ObjectPath=/com/canonical/settings/sound/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