# Qtopia/Light and Power

## Test cases

### Power configuration

Test Purpose | Verify that power settings can be configured separately for battery and external power.

Test Description

1. Disconnect the device from a power source, so take out the power plug.
2. (Re)start Light and Power.
3. Check that the power source is set to "Battery"
4. Select "Battery" as the On power source (if not done already).
5. Check that the Suspend after checkbox is disabled. This forces the unit to turn off after the time period specified to avoid running the battery low.
6. Ensure that the checkboxes for "Dim light after" and "Light off after" are checked.
7. Enter the following values: Dim light after: 20 seconds, Light off after: 30 seconds, Suspend after: 40 seconds. Click OK.
8. Observe the screen and verify that the light dims after 20 secs, dims again after another 30 secs and that the device is suspended after another 40 seconds (e.g. after 90 seconds in total).
9. Restart Light and Power.
10. Verify that the last entered settings (e.g. 20, 30, 40, etc) are shown in the application.
11. Enter the following values: Dim light after: 10 seconds, Light off after: 10 seconds, Suspend after: 10 seconds. Click OK.
12. Observe the screen and verify that the light dims after 10 secs, dims again after another 10 secs and that the device is suspended after another 10 seconds (e.g. after 30 seconds in total).
13. Restart Light and Power.
14. Verify that the last entered settings (e.g. 10, 10, 10, etc) are shown in the application.
15. Ensure that the checkboxe for "Dim light after" is checked and "Light off after" is unchecked. Click OK.
16. Observe the screen and verify that the light dims after 10 secs and that the device is suspended after another 10 seconds (e.g. after 20 seconds in total).
17. Restart Light and Power.
18. Ensure that the checkboxe for "Dim light after" is unchecked and "Light off after" is checked. Click OK.
19. Observe the screen and verify that the light goes off after 10 secs and that the device is suspended after another 10 seconds (e.g. after 20 seconds in total).
20. Connect the device to a power source again, so insert the power plug.
21. Restart Light and Power.
22. Check that the power source has been set to "external" automatically.
23. Select "External" as the On power source (if not done already).
24. Check that the Suspend after checkbox is enabled.
25. Uncheck the Suspend after checkbox
26. Enter the following values: Dim light after: 20 seconds, Light off after: 30 seconds. Click OK.
27. Observe the screen and verify that the light dims after 20 secs and dims again after another 30 secs.
28. Restart Light and Power.
29. Verify that the last entered settings (e.g. 20, 30, etc) are shown in the application.
30. Switch for a moment to Battery power source to verify that those settings still are 10, 10, 10,...
31. Go back to the External power source mode.
32. Enter the following values: Dim light after: 10 seconds, Light off after: 10 seconds. Click OK.
33. Observe the screen and verify that the light dims after 10 secs and dims again after another 10 secs.

Note. We assume that the remaining functionality also works for external power if it works properly for battery power. Hence the shorter test.

Expected TestResult | All the verification steps as described in the Test Description must be met.
Testnorm/Criteria | Exact Match
Test Suitability | Manual test

### Screen Brightness

Test Purpose | Verify that the screen brightness can be controlled separately for battery and external power operation.

Test Description

1. Select Battery as the On power source.
2. Use the slider to adjust the screen brightness (left is darker, right is brighter) and verify that the actual screen brightness responds to the position of the slider.
3. Select External as the On power source
4. Use the slider to adjust the screen brightness again and verify that the actual screen brightness responds to the position of the slider.
5. Make sure you end up with different values for Battery and External en verify that both settings are 'remembered', e.g. toggle between the two power sources.
6. Disconnect the power cable from the device and observe the display. The display should switch to the "battery brightness" level immediately or within a reasonable amount of time.
7. Reconnect the power cable again. The display should switch to the "external power brightness" level immediately or within a reasonable amount of time.

Expected TestResult | All the verification steps as described in the Test Description must be met.
Testnorm/Criteria | Exact Match
Test Suitability | Manual test