592
592
self._check_navigation_buttons(continue_button=True, back_button=True,
593
593
quit_button=False, skip_button=False)
595
def ubuntu_one_page_tests(self, ):
596
# Only run U1 tests on Ubuntu and is ubiqutiy plugin of U1 is installed
597
if not self.ubuntuone_is_installed():
598
self.go_to_progress_page()
600
self.go_to_next_page()
601
self._update_current_step('stepUbuntuOne')
602
self._check_navigation_buttons(continue_button=True, back_button=True,
603
quit_button=False, skip_button=True)
604
logger.debug("run_ubuntu_one_page_tests()")
605
#uOnePage = self.main_window.select_single(BuilderName='stepUbuntuOne')
606
page_objects = ['u1_about_label', 'cloud_label', 'music_label',
607
'photos_label', 'apps_label', 'u1_existing_account',
608
'u1_new_account', 'u1_explain_email_2',
609
'u1_explain_email', 'u1_terms',
610
'password_mismatch', 'u1_ask_name_pass',
611
'u1_ask_email', 'u1_no_internet']
612
self.check_visible_object_with_label(page_objects)
613
# XXX: we currently can't test signing in as it is yet to possible
614
# to set ubiquity to use a staging server for testing.
615
skip_button = self.main_window.select_single('GtkButton', name='skip')
616
self.pointing_device.click_object(skip_button)
617
#lets just sleep a little to wait for progress page as we
618
# can't wait on the page_title
621
595
def progress_page_tests(self, ):
622
596
''' Runs the test for the installation progress page
1059
1033
logger.debug("{0} flavor detected".format(distro))
1060
1034
return str(distro)
1061
1035
raise SystemError("Could not get distro name")
1063
def ubuntuone_is_installed(self, ):
1064
# Skip this step if the required package is not installed
1065
pkg = 'ubiquity-plugin-ubuntuone'
1066
cmd = ("dpkg-query -W -f ${Status} %s" % pkg).split()
1068
logger.debug("Verifying if '%s' is installed." % pkg)
1069
out = subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
1070
if not out.decode('utf-8').endswith(' installed'):
1071
logger.info("Package '%s' is not installed. Skipping step!"
1075
except subprocess.CalledProcessError:
1076
logger.info("Package '%s' is not installed. Skipping step!" % pkg)