Index: tst_service_screen/test.py =================================================================== diff -u -r76fdc8bb69841df3df89e211fabb333aa6d48dc0 -r2b68cf8ce895e5dccf80c4fafc378d827d35cbcd --- tst_service_screen/test.py (.../test.py) (revision 76fdc8bb69841df3df89e211fabb333aa6d48dc0) +++ tst_service_screen/test.py (.../test.py) (revision 2b68cf8ce895e5dccf80c4fafc378d827d35cbcd) @@ -51,19 +51,39 @@ test.startSection("Navigating to 'Service' screen") hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_SERV.value, sub_mode=HDOpSubModes.STANDBY_START_STATE.value) utils.waitForGUI(1) - device_settings_text = waitForObjectExists(settings_text_obj(config.SERIVCES_TITLE)) - test.compare(device_settings_text.text, config.SERIVCES_TITLE, "{} screen is displayed".format(config.SERIVCES_TITLE)) + device_settings_text = waitForObjectExists(settings_text_obj(config.SERVICE_TEXT)) + test.compare(device_settings_text.text, config.SERVICE_TEXT, "{} screen is displayed".format(config.SERVICE_TEXT)) test.endSection() +def get_storage_data_status(file_name): + """ + Method to verify the storage data exported or not exported. + @return: (bool) - True - if export data list is present in dash board, else return False + """ + test.log("verification of storage data before exporting the data") + export_list_count = 0 + export_list = object.children(waitForObjectExists(file_name))[0] + for child in object.children(export_list): + export_list_count += 1 + if export_list_count >= 1: + return True + else: + return False + + def verify_export_logs_screen(): """ Method to verify the export logs screen """ test.startSection("Verifying the the export logs screen") test.log("Navigating to service screen to export log screen") mouseClick(waitForObjectExists(settings_text_obj(EXPORT_LOGS))) - test.compare(waitForObjectExists(names.o_export_logs_text).text,config.EXPORT_LOGS,"{} should be under export logs screen ".format(config.EXPORT_LOGS)) + test.compare(waitForObjectExists(names.o_export_logs_text).text,config.EXPORT_TEXT,"{} should be under export logs screen ".format(config.EXPORT_TEXT)) + log_status = get_storage_data_status(names.o_usb_folder_slider) + test.verify(log_status == True, "export data rectangles should be filled with contents under USB drive.") + log_status = get_storage_data_status(names.o_SettingsBase_sdcFolderView_ListView) + test.verify(log_status == True, "export data rectangles should be filled with contents under SD card.") for option in range(len(config.EXPORT_LOGS_OPTIONS)): @@ -79,22 +99,6 @@ test.endSection() -def get_storage_data_status(): - """ - Method to verify the storage data exported or not exported. - @return: (bool) - True - if export data list is present in dash board, else return False - """ - test.log("verification of storage data before exporting the data") - export_list_count = 0 - export_list = object.children(waitForObjectExists(names.o_usb_folder_slider))[0] - for child in object.children(export_list): - export_list_count += 1 - if export_list_count >= 1: - return True - else: - return False - - def verify_export_functionality(): """ verify export log section before and after export button click. @@ -104,15 +108,15 @@ test.compare(waitForObjectExists(names.o_SettingsBase_progressCircle_ProgressCircle).color.name, config.RED_COLOR,"{} color progress bar is displayed for sd-card".format(config.RED_COLOR)) test.compare(waitForObjectExists(names.o_SettingsBase_progressCircle_ProgressCircle_2).color.name, config.GREEN_COLOR,"{} color progress bar is displayed for usb-drive".format(config.GREEN_COLOR)) - log_status = get_storage_data_status() - test.verify(log_status == True, "export data rectangles should be filled with contents.") - mouseClick(waitForObjectExists(names.o_export_btn )) utils.waitForGUI(2) - log_status = get_storage_data_status() - test.verify(log_status == False, "export data rectangles should be empty after export button click.") + log_status = get_storage_data_status(names.o_usb_folder_slider) + test.verify(log_status == False, "export data rectangles should be empty after export button click under USB drive.") + log_status = get_storage_data_status(names.o_SettingsBase_sdcFolderView_ListView) + test.verify(log_status == False, "export data rectangles should be empty after export button click under SD card.") + test.compare(waitForObjectExists(names.o_SettingsBase_progressCircle_ProgressCircle).color.name, config.RED_COLOR,"{} color progress bar is displayed for sd-card".format(config.RED_COLOR)) test.compare(waitForObjectExists(names.o_SettingsBase_progressCircle_ProgressCircle_2).color.name, config.GREEN_COLOR,"{} color progress bar is displayed for usb-drive".format(config.GREEN_COLOR)) mouseClick(waitForObjectExists(names.o_SettingsBase_image_Image )) @@ -139,7 +143,6 @@ test.endSection() - def main(): utils.tstStart(__file__)