on xenial help sign in
merged with trunk
commitd9d262c2a6cf441469f3cd63b6a9f29bd177b267 authorNick Dedekind <nicholas.dedekind@gmail.com> dateFri 16 Aug 2013, 15:11 (13 years ago) parentd2f0375d2a5216
7 files changed+16−61
Panel/Indicators/NetworkIndicatorPage.qml+2−2 Panel/IndicatorsDataModel.qml−18 src/Panel/Indicators/servicefiles/CMakeLists.txt−3 src/Panel/Indicators/servicefiles/com.canonical.indicator.battery−10 src/Panel/Indicators/servicefiles/com.canonical.indicator.time−10 src/Panel/Indicators/servicefiles/com.canonical.settings.sound−10 tests/autopilot/unity8/indicators_client/tests/test_battery.py+14−8
Panel/Indicators/NetworkIndicatorPage.qml+2−2
@@ -23,7 +23,7 @@ import Unity.IndicatorsLegacy.Network 0.1 as ICNetwork
2323import Ubuntu.Components 0.1
2424
2525PageStack {
26− id: network
26+ id: networkPage
2727 // Stops the search for a parent tree node.
2828 // We don't want it going up to the indicator tabs.
2929 // FIXME: need a better way of doing this.
@@ -60,7 +60,7 @@ PageStack {
6060 id: networkAgent
6161
6262 onSecretRequested: {
63− _network.push(passwordPageComponent, {"token": token});
63+ networkPage.push(passwordPageComponent, {"token": token});
6464 }
6565 }
6666
Panel/IndicatorsDataModel.qml−18
@@ -71,29 +71,11 @@ Indicators.IndicatorsModel {
7171 },
7272
7373 // 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− },
8074 'chewie-network' : {
8175 'title': 'Networks',
8276 'description' : '',
8377 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorWidget.qml',
8478 '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'
9779 }
9880 }
9981}
src/Panel/Indicators/servicefiles/CMakeLists.txt−3
@@ -1,9 +1,6 @@
11file(GLOB INDICATOR_SERVICE_FILES
2− ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.indicator.battery
32 ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.indicator.messages
4− ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.indicator.time
53 ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.settings.network
6− ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.settings.sound
74)
85
96# 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
1515from time import sleep
1616import random
1717import math
18+import unittest
1819
1920class TestDisplayMenus(IndicatorsTestCase):
2021 def setUp(self):
2122 super(TestDisplayMenus, self).setUp(self.geometry, self.grid_unit)
2223
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):
2333 # This opens the messaging menu so you don't have to do that in
2434 # every test case
2535 self.assertThat(lambda: self.main_window.get_battery_menu(), Eventually(NotEquals(None)));
@@ -31,14 +41,6 @@ class TestDisplayMenus(IndicatorsTestCase):
3141 page_loader = fn_loader();
3242 self.assertThat(page_loader.progress, Eventually(Equals(1.0)))
3343
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−
4244 def switch_auto_brightness(self, auto_brightness):
4345 ab_switch = auto_brightness.select_single("CheckBox");
4446 self.assertThat(ab_switch, NotEquals(None))
@@ -65,8 +67,10 @@ class TestDisplayMenus(IndicatorsTestCase):
6567
6668 old_ab_value = brightness_slider.value
6769
70+ @unittest.skip("Battery indicator has been removed.")
6871 def test_auto_bright_switch(self):
6972 """Test the auto-bright switch"""
73+ self.open_battery_menu()
7074
7175 # wait for the switch menu item
7276 fn_auto_brightness = lambda: self.app.select_single("SwitchMenuItem", objectName="auto-brightness");
@@ -84,8 +88,10 @@ class TestDisplayMenus(IndicatorsTestCase):
8488 # TODO - should check backend when it's introspectable.
8589 self.assertThat(auto_brightness.checked, Eventually(NotEquals(old_ab_value)))
8690
91+ @unittest.skip("Battery indicator has been removed.")
8792 def test_brightness_slider(self):
8893 """Test the auto-bright switch"""
94+ self.open_battery_menu()
8995
9096 fn_brightness_menu = lambda: self.app.select_single("SliderMenuItem", objectName="brightness");
9197 # FIXME: this should go away when we switch to indicator-power