Index: shared/scripts/names.py =================================================================== diff -u -ra58d7af64baf37c4bc405ca01052bf066da7b892 -r086fe275f058d57c4ce7e17631a39f668048767a --- shared/scripts/names.py (.../names.py) (revision a58d7af64baf37c4bc405ca01052bf066da7b892) +++ shared/scripts/names.py (.../names.py) (revision 086fe275f058d57c4ce7e17631a39f668048767a) @@ -28,12 +28,10 @@ o_PreTreatmentBase_backgroundRect_Rectangle = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "id": "_backgroundRect", "type": "Rectangle", "unnamed": 1, "visible": True} o_PreTreatmentBase_confirmButton_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} - #standbymode o_MainHome_MainHome = {"container": o_Gui_MainView, "objectName": "_MainHome", "type": "MainHome", "visible": True} o_standby_page = {"container": o_MainHome_MainHome, "type": "Column", "unnamed": 1, "visible": True} - #in-treatment o_blood_priming = {"container": o_treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "Blood Priming", "type": "Text", "unnamed": 1, "visible": True} o_blood_priming_value_by_default = {"container": o_treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "0 mL", "type": "Text", "unnamed": 1, "visible": True} @@ -47,8 +45,6 @@ o_fluid_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Volume Delivered", "type": "Text", "unnamed": 1, "visible": True} o_cumulative_fluid_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Cumulative Delivered", "type": "Text", "unnamed": 1, "visible": True} - - #settings_Home o_service_text = {"container": o_Gui_MainView, "text": "Service", "type": "Text", "unnamed": 1, "visible": True} o_SettingsHome_SettingsHome_2 = {"container": o_Gui_MainView, "objectName": "_SettingsHome", "type": "SettingsHome", "visible": True} @@ -76,8 +72,6 @@ o_SettingsHome_SettingsHome = {"container": o_Gui_MainView, "objectName": "_SettingsHome", "type": "SettingsHome", "visible": True} o_settings_home_text_obj = {"container": o_SettingsHome_SettingsHome, "type": "Text", "unnamed": 1, "visible": True} - - # service screen o_SettingsBase_SettingsBase = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsBase", "visible": True} o_services_screen_text_obj = {"container": o_SettingsBase_SettingsBase, "type": "Text", "unnamed": 1, "visible": True} @@ -87,12 +81,15 @@ # #Export button o_export_btns = {"container": o_SettingsBase_SettingsBase,"id": "_logTypeExportButton", "type": "ExportButton", "unnamed": 1, "visible": True} o_export_btn = {"container": o_export_btns, "text": "Export", "type": "Text", "unnamed": 1, "visible": True} -#USB drive Information -o_usb_folder_file = {"container": o_SettingsBase_SettingsBase, "type": "Text", "unnamed": 1, "visible": True} -o_usb_folder_id = {"container": o_SettingsBase_SettingsBase, "type": "Text", "unnamed": 1, "visible": True} +#USB drive and SD crad Information o_usb_folder_slider = {"container": o_SettingsBase_SettingsBase, "id": "_usbFolderView", "type": "ListView", "unnamed": 1, "visible": True} +o_SettingsBase_SettingsExportLogs = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsExportLogs", "visible": True} +o_SettingsBase_sdcFolderView_ListView = {"container": o_SettingsBase_SettingsExportLogs, "id": "_sdcFolderView", "type": "ListView", "unnamed": 1, "visible": True} + #device log objects o_SettingsBase_progressCircle_ProgressCircle = {"container": o_SettingsBase_SettingsBase, "id": "_progressCircle", "type": "ProgressCircle", "unnamed": 1, "visible": True} o_SettingsBase_usbFolderRectangle_Rectangle = {"container": o_SettingsBase_SettingsBase, "gradient": 0, "id": "_usbFolderRectangle", "type": "Rectangle", "unnamed": 1, "visible": True} o_SettingsBase_progressCircle_ProgressCircle_2 = {"container": o_SettingsBase_SettingsBase, "id": "_progressCircle", "occurrence": 2, "type": "ProgressCircle", "unnamed": 1, "visible": True} o_SettingsBase_image_Image = {"container": o_SettingsBase_SettingsBase, "id": "_image", "source": "qrc:/images/iEject", "type": "Image", "unnamed": 1, "visible": True} + + Index: tst_service_screen/test.py =================================================================== diff -u -r3037246670bc9f00dff0acc09f82b5aca6cd2bb8 -r086fe275f058d57c4ce7e17631a39f668048767a --- tst_service_screen/test.py (.../test.py) (revision 3037246670bc9f00dff0acc09f82b5aca6cd2bb8) +++ tst_service_screen/test.py (.../test.py) (revision 086fe275f058d57c4ce7e17631a39f668048767a) @@ -56,6 +56,22 @@ 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 @@ -64,7 +80,10 @@ 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_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)): utils.waitForGUI(1) @@ -79,22 +98,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 +107,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 +142,6 @@ test.endSection() - def main(): utils.tstStart(__file__)