on xenial help sign in
Complete absolute bare bones settings wizard test
commit71a515e63152779762499eea02aa79de6b6414c8 authorJosh Arenson <joshua.arenson@canonical.com> dateWed 13 May 2015, 17:29 (11 years ago) parent02052dc
1 file changed+20−1
tests/autopilot/unity8/settings_wizard/tests/test_settings_wizard.py+20−1
tests/autopilot/unity8/settings_wizard/tests/test_settings_wizard.py+20−1
@@ -4,6 +4,7 @@ from unity8.settings_wizard.emulators.settings_wizard import Wizard
44from unity8.shell import tests
55
66DEFAULT_LANGUAGE = 'English (United States)'
7+DEFAULT_SECURITY_METHOD = 'Passcode'
78
89
910class SkipThroughSettingsWizardTestCase(tests.UnityTestCase):
@@ -26,6 +27,24 @@ class SkipThroughSettingsWizardTestCase(tests.UnityTestCase):
2627 self.assertEqual(default_selection, DEFAULT_LANGUAGE)
2728 return language_page.continue_()
2829
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
33+ as possible """
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_()
38+
2939 def test_skipping_through_wizard(self):
3040 """ Most basic test of the settings wizard. Skip all skipable pages """
31− next_page = self._test_language_page()
41+ # FIXME for now, assume there is no SIM card in the phone
42+ # A mock should allow testing both situations later
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_()
50+ finish_page.finish()