Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 938208 - Write test to enable Power Save mode #13880

Merged
merged 1 commit into from Dec 3, 2013

Conversation

teodosia
Copy link
Contributor

No description provided.

from gaiatest.apps.settings.app import Settings


class TestAirplaneMode(GaiaTestCase):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the name of the test from AirplaneMode.

@bobsilverberg
Copy link
Contributor

The test is failing for me:

TEST-START test_settings_power_save_mode.py
test_power_save_mode (test_settings_power_save_mode.TestAirplaneMode) ... ERROR

======================================================================
ERROR: None
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/bsilverberg/.virtualenvs/gaia/lib/python2.7/site-packages/marionette_client-0.6.2-py2.7.egg/marionette/marionette_test.py", line 143, in run
    testMethod()
  File "/Users/bsilverberg/gitRepos/gaia/tests/python/gaia-ui-tests/gaiatest/tests/functional/settings/test_settings_power_save_mode.py", line 28, in test_power_save_mode
    self.wait_for_condition(lambda s: 'SIM card not ready' in settings.cell_data_menu_item_description)
  File "/Users/bsilverberg/gitRepos/gaia/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 740, in wait_for_condition
    raise TimeoutException(message)
TEST-UNEXPECTED-FAIL | test_settings_power_save_mode.py test_settings_power_save_mode.TestAirplaneMode.test_power_save_mode | TimeoutException: Condition timed out
----------------------------------------------------------------------
Ran 1 test in 98.224s

FAILED (errors=1)

It looks like it's waiting for the SIM to not be ready, but that is not the condition that this test expects. So the test is not currently written with the correct expectations, and I don't see how this test ever passed on a device.

self.data_layer.connect_to_cell_data()
self.data_layer.connect_to_wifi()
self.data_layer.set_setting('geolocation.enabled', 'true')
self.data_layer.set_setting('bluetooth.enabled', True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have true and True

@AlinT
Copy link
Contributor

AlinT commented Dec 3, 2013

Lgtm

AlinT added a commit that referenced this pull request Dec 3, 2013
Bug 938208 - Write test to enable Power Save mode
@AlinT AlinT merged commit ec850b4 into mozilla-b2g:master Dec 3, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants