@@ -4,6 +4,7 @@ from unity8.settings_wizard.emulators.settings_wizard import Wizard
4from unity8.shell import tests
4from unity8.shell import tests
6DEFAULT_LANGUAGE = 'English (United States)'
6DEFAULT_LANGUAGE = 'English (United States)'
7+DEFAULT_SECURITY_METHOD = 'Passcode'
9class SkipThroughSettingsWizardTestCase(tests.UnityTestCase):
10class SkipThroughSettingsWizardTestCase(tests.UnityTestCase):
@@ -26,6 +27,24 @@ class SkipThroughSettingsWizardTestCase(tests.UnityTestCase):
26 self.assertEqual(default_selection, DEFAULT_LANGUAGE)
27 self.assertEqual(default_selection, DEFAULT_LANGUAGE)
27 return language_page.continue_()
28 return language_page.continue_()
30+ def _test_password_page(self, password_page):
31+ """ Check default selection for password type and change
32+ password type to swipe to keep this test as uncomplicated
34+ default_selection = password_page.get_selected_security_option()
35+ self.assertEqual(default_selection, DEFAULT_SECURITY_METHOD)
36+ password_page.select_security_option('Swipe')
37+ return password_page.continue_()
29 def test_skipping_through_wizard(self):
39 def test_skipping_through_wizard(self):
30 """ Most basic test of the settings wizard. Skip all skipable pages """
40 """ Most basic test of the settings wizard. Skip all skipable pages """
41+ # FIXME for now, assume there is no SIM card in the phone
42+ # A mock should allow testing both situations later
31− next_page = self._test_language_page()
43+ sim_inserted, next_page = self._test_language_page()
44+ password_page = next_page.skip()
45+ wifi_connect_page = self._test_password_page(password_page)
46+ # FIXME This _will_ not work without a mock as the behavior is
47+ # dependent on weather or not there is a connection to a wifi network
48+ reporting_page = wifi_connect_page.skip()
49+ finish_page = reporting_page.continue_()