@@ -20,7 +20,7 @@ import Unity.Test 0.1 as UT
2020import Unity.Indicators 0.1 as Indicators
2121import Ubuntu.Components 1.3
2222import Powerd 0.1
23−import Lights 0.1
23+import Hfd 0.1
2424import QMenuModel 0.1
2525import "../../../../qml/Panel/Indicators"
2626
@@ -75,7 +75,7 @@ Item {
7575 radius: width / 2
7676 anchors.centerIn: parent
7777
78− color: Lights.state === Lights.On ? Lights.color : "transparent"
78+ color: Leds.state === Leds.On ? Leds.color : "transparent"
7979
8080 border.color: "black"
8181 border.width: 1
@@ -162,79 +162,79 @@ Item {
162162 //
163163 // new messages
164164 //
165− { tag: "Powerd.On with No Message", powerd: Powerd.On, actionData: noNewMessage, expectedLightsState: Lights.Off },
166− { tag: "Powerd.Off with No Message", powerd: Powerd.Off, actionData: noNewMessage, expectedLightsState: Lights.Off },
167− { tag: "Powerd.On with New Message", powerd: Powerd.On, actionData: newMessage, expectedLightsState: Lights.Off },
168− { tag: "Powerd.Off with New Message", powerd: Powerd.Off, actionData: newMessage, expectedLightsState: Lights.On },
165+ { tag: "Powerd.On with No Message", powerd: Powerd.On, actionData: noNewMessage, expectedLightsState: Leds.Off },
166+ { tag: "Powerd.Off with No Message", powerd: Powerd.Off, actionData: noNewMessage, expectedLightsState: Leds.Off },
167+ { tag: "Powerd.On with New Message", powerd: Powerd.On, actionData: newMessage, expectedLightsState: Leds.Off },
168+ { tag: "Powerd.Off with New Message", powerd: Powerd.Off, actionData: newMessage, expectedLightsState: Leds.On },
169169
170170 //
171171 // show charging
172172 //
173173 { tag: "Powerd.Off while charging",
174− expectedLightsState: Lights.On,
174+ expectedLightsState: Leds.On,
175175 powerd: Powerd.Off, actionData: deviceStateDBusSignals.charging },
176176
177177 { tag: "Powerd.On while charging",
178− expectedLightsState: Lights.Off,
178+ expectedLightsState: Leds.Off,
179179 powerd: Powerd.On, actionData: deviceStateDBusSignals.charging },
180180
181181 { tag: "Powerd.On while charging",
182− expectedLightsState: Lights.Off,
182+ expectedLightsState: Leds.Off,
183183 powerd: Powerd.On, wizardStatus: batteryIconNames.charging },
184184
185185 //
186186 // show charging and full
187187 //
188188 { tag: "Powerd.Off while charging and battery full",
189− expectedLightsState: Lights.On, expectedLightsColor: green,
189+ expectedLightsState: Leds.On, expectedLightsColor: green,
190190 powerd: Powerd.Off, actionData: deviceStateDBusSignals.fullyCharged },
191191
192192 { tag: "Powerd.On while charging and battery full",
193− expectedLightsState: Lights.Off,
193+ expectedLightsState: Leds.Off,
194194 powerd: Powerd.On, actionData: deviceStateDBusSignals.fullyCharged },
195195
196196 { tag: "Powerd.Off while discharging and battery full",
197− expectedLightsState: Lights.Off,
197+ expectedLightsState: Leds.Off,
198198 powerd: Powerd.Off, actionData: deviceStateDBusSignals.discharging, wizardStatus: batteryIconNames.fullyCharged },
199199
200200 //
201201 // show empty
202202 //
203203 { tag: "Powerd.Off while discharging and battery empty",
204− expectedLightsState: Lights.On, expectedLightsColor: orangeRed,
204+ expectedLightsState: Leds.On, expectedLightsColor: orangeRed,
205205 powerd: Powerd.Off, wizardStatus: batteryIconNames.caution },
206206
207207 { tag: "Powerd.On while discharging and battery empty",
208− expectedLightsState: Lights.Off,
208+ expectedLightsState: Leds.Off,
209209 powerd: Powerd.On, wizardStatus: batteryIconNames.caution },
210210
211211 { tag: "Powerd.On while discharging and battery empty",
212− expectedLightsState: Lights.Off,
212+ expectedLightsState: Leds.Off,
213213 powerd: Powerd.On, wizardStatus: batteryIconNames.empty },
214214
215215 { tag: "Powerd.Off while charging and battery empty",
216− expectedLightsState: Lights.On, expectedLightsColor: white,
216+ expectedLightsState: Leds.On, expectedLightsColor: white,
217217 powerd: Powerd.Off, actionData: deviceStateDBusSignals.charging },
218218
219219 //
220220 // new message has highest priority
221221 //
222222 { tag: "Powerd.Off with New Message, discharging and battery empty",
223− expectedLightsState: Lights.On,
223+ expectedLightsState: Leds.On,
224224 expectedLightsColor: darkGreen,
225225 expectedLightsOnMillisec: 1000,
226226 expectedLightsOffMillisec: 3000,
227227 powerd: Powerd.Off, actionData: newMessage, wizardStatus: batteryIconNames.caution },
228228
229229 { tag: "Powerd.Off with New Message and charging",
230− expectedLightsState: Lights.On,
230+ expectedLightsState: Leds.On,
231231 expectedLightsColor: darkGreen,
232232 expectedLightsOnMillisec: 1000,
233233 expectedLightsOffMillisec: 3000,
234234 powerd: Powerd.Off, actionData: combinedDBusSignals.hasMessageAndCharging },
235235
236236 { tag: "Powerd.Off with New Message, charging and battery full",
237− expectedLightsState: Lights.On,
237+ expectedLightsState: Leds.On,
238238 expectedLightsColor: darkGreen,
239239 expectedLightsOnMillisec: 1000,
240240 expectedLightsOffMillisec: 3000,
@@ -244,11 +244,11 @@ Item {
244244 // use battery level
245245 //
246246 { tag: "Powerd.Off while charging and battery level at 80%",
247− expectedLightsState: Lights.On, expectedLightsColor: white,
247+ expectedLightsState: Leds.On, expectedLightsColor: white,
248248 powerd: Powerd.Off, actionData: batteryLevelDBusSignals["80"], wizardStatus: batteryIconNames.charging },
249249
250250 { tag: "Powerd.Off while charging and battery level at 100%",
251− expectedLightsState: Lights.On, expectedLightsColor: green,
251+ expectedLightsState: Leds.On, expectedLightsColor: green,
252252 expectedLightsOnMillisec: 1000,
253253 expectedLightsOffMillisec: 0,
254254 powerd: Powerd.Off, actionData: batteryLevelDBusSignals["100"], wizardStatus: batteryIconNames.charging },
@@ -257,13 +257,13 @@ Item {
257257 // Support for Multicolor LED
258258 //
259259 { tag: "Powerd.Off with New Message & no support for multicolor led",
260− expectedLightsState: Lights.On,
260+ expectedLightsState: Leds.On,
261261 powerd: Powerd.Off, actionData: newMessage, supportsMultiColorLed: false },
262262 { tag: "Powerd.Off while charging & support for multicolor led",
263− expectedLightsState: Lights.On,
263+ expectedLightsState: Leds.On,
264264 powerd: Powerd.Off, actionData: deviceStateDBusSignals.charging, supportsMultiColorLed: true },
265265 { tag: "Powerd.Off while charging & no support for multicolor led",
266− expectedLightsState: Lights.Off,
266+ expectedLightsState: Leds.Off,
267267 powerd: Powerd.Off, actionData: deviceStateDBusSignals.charging, supportsMultiColorLed: false },
268268 ]
269269 }
@@ -280,13 +280,13 @@ Item {
280280 if (data.hasOwnProperty("wizardStatus"))
281281 loader.item.batteryIconName = data.wizardStatus
282282
283− compare(Lights.state, data.expectedLightsState, "Lights state does not match expected value");
283+ compare(Leds.state, data.expectedLightsState, "Lights state does not match expected value");
284284 if (data.hasOwnProperty("expectedLightsColor"))
285− compare(Lights.color, data.expectedLightsColor, "Lights color does not match expected value")
285+ compare(Leds.color, data.expectedLightsColor, "Lights color does not match expected value")
286286 if (data.hasOwnProperty("expectedLightsOnMillisec"))
287− compare(Lights.onMillisec, data.expectedLightsOnMillisec, "Lights OnMillisec does not match expected value")
287+ compare(Leds.onMillisec, data.expectedLightsOnMillisec, "Lights OnMillisec does not match expected value")
288288 if (data.hasOwnProperty("expectedLightsOffMillisec"))
289− compare(Lights.offMillisec, data.expectedLightsOffMillisec, "Lights OffMillisec does not match expected value")
289+ compare(Leds.offMillisec, data.expectedLightsOffMillisec, "Lights OffMillisec does not match expected value")
290290 }
291291 }
292292}