Index: shared/scripts/names.py =================================================================== diff -u -rcab3fb70b60c9e1a42f4703745e201771960d2fc -r9a5aa28095bc06a0bb917f4b3abf75a5640f8b5a --- shared/scripts/names.py (.../names.py) (revision cab3fb70b60c9e1a42f4703745e201771960d2fc) +++ shared/scripts/names.py (.../names.py) (revision 9a5aa28095bc06a0bb917f4b3abf75a5640f8b5a) @@ -1000,6 +1000,7 @@ device_settings_screen = {"container": o_Gui_MainView, "text": "Treatment", "type": "Text", "unnamed": 1, "visible": True} o_SettingsHome_SettingsHome_2 = {"container": o_Gui_MainView, "objectName": "_SettingsHome", "type": "SettingsHome", "visible": True} o_SettingsHome_mouseArea_MouseArea_2 = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 7, "type": "MouseArea", "unnamed": 1, "visible": True} +o_wifi_settings_main_button = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 3, "type": "MouseArea", "unnamed": 1, "visible": True} o_Gui_MainView = {"type": "Gui::MainView", "unnamed": 1, "visible": True} o_SettingsBase_SettingsWiFi = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsWiFi", "visible": True} o_SettingsBase_Wi_Fi_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "Wi-Fi", "type": "Text", "unnamed": 1, "visible": True} @@ -1076,6 +1077,9 @@ o_confirm_button_text = {"container": o_preTreatmentDisposablesStack_preTreatmentDisposablesSalineBag_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} o_SettingsBase_mouseArea_MouseArea_3 = {"container": o_SettingsBase_SettingsWiFi, "id": "_mouseArea", "occurrence": 2, "type": "MouseArea", "unnamed": 1, "visible": True} o_SettingsBase_Scan_Finished_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "Scan Finished", "type": "Text", "unnamed": 1, "visible": True} +o_wifi_settings_back_button = {"container": o_SettingsBase_SettingsWiFi, "id": "_mouseArea", "type": "MouseArea", "unnamed": 1, "visible": True} +o_SettingsBase_Scan_Finished_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "Scan Finished", "type": "Text", "unnamed": 1, "visible": True} +o_scan_wifi_setting_button = {"container": o_SettingsBase_SettingsWiFi, "id": "_mouseArea", "occurrence": 2, "type": "MouseArea", "unnamed": 1, "visible": True} #Manager o_manager_Text = {"container": o_Gui_MainView, "text": "Manager", "type": "Text", "unnamed": 1, "visible": True} Index: tst_cloud_sync - treatment_screen/test.py =================================================================== diff -u -rc5fa7d0843882d5d33083b4938614907ec141b49 -r9a5aa28095bc06a0bb917f4b3abf75a5640f8b5a --- tst_cloud_sync - treatment_screen/test.py (.../test.py) (revision c5fa7d0843882d5d33083b4938614907ec141b49) +++ tst_cloud_sync - treatment_screen/test.py (.../test.py) (revision 9a5aa28095bc06a0bb917f4b3abf75a5640f8b5a) @@ -286,21 +286,8 @@ os.rename(path+files,path+filename) test.log(str(files+" name changed to "+filename)) -def click_scan_button_wifi(): +def verify_wifi_scan(): """ - Method to verify "Wi-Fi" screen - """ - test.startSection("Verifying Wi-Fi setting") - utils.waitForGUI(0.2) - mouseClick(waitForObjectExists(names.o_SettingsHome_mouseArea_MouseArea_2)) - utils.waitForGUI(5) - mouseClick(waitForObjectExists(names.o_SettingsBase_mouseArea_MouseArea_3)) - mouseClick(waitForObjectExists(names.o_SettingsBase_mouseArea_MouseArea)) - test.endSection() - - -def navigate_to_settings_screen(): - """ Method to navigate to "Settings" screen """ test.startSection("Navigating to 'Device Settings' screen") @@ -309,75 +296,108 @@ mouseClick(waitForObjectExists(names.o_settings_Text)) device_settings_text = waitForObjectExists(settings_text_obj(config.DEVICE_SETTINGS_TEXT)) test.compare(device_settings_text.text, config.DEVICE_SETTINGS_TEXT, "{} screen is displayed".format(config.DEVICE_SETTINGS_TEXT)) + utils.waitForGUI(0.2) + mouseClick(waitForObjectExists(names.o_wifi_settings_main_button)) + utils.waitForGUI(1) + mouseClick(waitForObjectExists(names.o_scan_wifi_setting_button)) + utils.waitForGUI(1) + mouseClick(waitForObjectExists(names.o_wifi_settings_back_button)) + utils.waitForGUI(1) test.endSection() + def rename_folder_names(): """ This method is for renaming the folder name and wait application for verifying particular file. """ test.startSection("Renaming the cloudsync,sd-card, usb-disk, application folder name") - rename_file(config.SD_CARD_CLOUDSYNC_FOLDER_PATH,"cloudsync") - utils.waitForGUI(5) - rename_old_name(config.SD_CARD_CLOUDSYNC_FOLDER_PATH,"cloudsync") - - rename_file(config.SD_CARD_LOCATION,"sd-card") - utils.waitForGUI(5) - rename_old_name(config.SD_CARD_LOCATION,"sd-card") - rename_file(config.USB_DISK_FOLDER_LOCATION,"usb-disk") - utils.waitForGUI(5) - rename_old_name(config.USB_DISK_FOLDER_LOCATION,"usb-disk") - - rename_file(config.APPLICATION_FOLDER_LOCATION,"application") - utils.waitForGUI(5) - navigate_to_settings_screen() - click_scan_button_wifi() - rename_old_name(config.APPLICATION_FOLDER_LOCATION,"application") + try: + rename_file(config.SD_CARD_CLOUDSYNC_FOLDER_PATH,"cloudsync") + utils.waitForGUI(5) + except: + test.log(str("cloudsync main desktop folder name not changed")) + finally: + rename_old_name(config.SD_CARD_CLOUDSYNC_FOLDER_PATH,"cloudsync") + + try: + rename_file(config.SD_CARD_LOCATION,"sd-card") + utils.waitForGUI(5) + except: + test.log(str("sd-card folder name not changed")) + finally: + rename_old_name(config.SD_CARD_LOCATION,"sd-card") + + try: + rename_file(config.USB_DISK_FOLDER_LOCATION,"usb-disk") + utils.waitForGUI(5) + except: + test.log(str("usb_disk folder name not changed")) + finally: + rename_old_name(config.USB_DISK_FOLDER_LOCATION,"usb-disk") + + try: + rename_file(config.APPLICATION_FOLDER_LOCATION,"application") + utils.waitForGUI(5) + verify_wifi_scan() + except: + test.log(str("Setings wifi screen not visible")) + finally: + rename_old_name(config.APPLICATION_FOLDER_LOCATION,"application") test.endSection() - -def main(): - rename_file(config.CLOUDSYNC_FOLDER_PATH,"cloudsync") - utils.waitForGUI(1) - utils.tstStart(__file__) - startApplication(config.AUT_NAME) - utils.waitForGUI(1.5) - verify_files_error_message() - rename_old_name(config.CLOUDSYNC_FOLDER_PATH,"cloudsync") - +def verify_cloudsync_treatment(): + """ + This method is to verify cloudsync treatment log data. + """ utility.append_cloudsync_credentials_file() utils.waitForGUI(5) verify_error_message() main_item = waitForObjectExists(names.o_mainItem_Item) expected_software_version = str(object.children(main_item)[5]) - + set_data_in_cloud_sync_output_file(CODE_DISPLAY_REQUEST) verify_code_from_treatment_response() - + set_data_in_cloud_sync_output_file(DEVICE_CREDENTIALS_REQUEST) device_credentials_response = utility.retrive_log_data() verify_log_response(device_credentials_response[0], DEVICE_CREDENTIALS_RESPONSE) - + set_data_in_cloud_sync_output_file(DEVICE_FACTORY_RESET_REQUEST) factory_reset_response = utility.retrive_log_data() verify_log_response(factory_reset_response[0], DEVICE_FACTORY_RESET_CONFIRM) - + HD_VERSION = HD_VERSION_SERIAL_REQUEST.split(",") hd_simulator.cmd_send_serial_hd_data(HD_VERSION[5]) set_data_in_cloud_sync_output_file(DEVICE_INFO_REQUEST) device_credentials_response = utility.retrive_log_data() verify_log_response(device_credentials_response[0], DEVICE_HD_INFO_RESPONSE) - + DG_VERSION = DG_VERSION_SERIAL_REQUEST.split(",") dg_simulator.cmd_send_serial_dg_data(DG_VERSION[6]) set_data_in_cloud_sync_output_file(DEVICE_INFO_REQUEST) device_credentials_response = utility.retrive_log_data() verify_log_response(device_credentials_response[0], DEVICE_DG_INFO_RESPONSE) - + hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_STAN.value, sub_mode=HDOpSubModes.STANDBY_WAIT_FOR_TREATMENT_STATE .value) set_data_in_cloud_sync_output_file(DEVICE_STATE_REQUEST) device_credentials_response = utility.retrive_log_data() verify_log_response(device_credentials_response[0], DEVICE_STATE_RESPONSE) + + +def main(): + utils.tstStart(__file__) + try: + rename_file(config.CLOUDSYNC_FOLDER_PATH,"cloudsync") + utils.waitForGUI(0.5) + startApplication(config.AUT_NAME) + utils.waitForGUI(1.5) + verify_files_error_message() + except: + test.log(str("Cloudsync desktop folder name not changed")) + finally: + rename_old_name(config.CLOUDSYNC_FOLDER_PATH,"cloudsync") + verify_cloudsync_treatment() rename_folder_names() utils.tstDone()