Index: shared/scripts/configuration/strings.py =================================================================== diff -u -r24c54e0efb0d604eb70dd1ac1c7f1bd4580cd192 -rf24d9f0bfc30fa024ceef73cb8b25efb86a70f70 --- shared/scripts/configuration/strings.py (.../strings.py) (revision 24c54e0efb0d604eb70dd1ac1c7f1bd4580cd192) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision f24d9f0bfc30fa024ceef73cb8b25efb86a70f70) @@ -204,7 +204,7 @@ EXPORT_LOG_TEXT ="Export Logs" SHUTDOWN_BUTTON_TEXT = "SHUTDOWN" BACK_BUTTON_TEXT = "BACK" -EXPORT_LOGS_OPTIONS = ["Application", "Treatment", "Service"] +EXPORT_LOGS_OPTIONS = ["Application", "Service", "Treatment"] SD_CARD_DETAILS =["SD-Card (MB)", "Free : 0.000","Total: 0.000"] USB_DRIVE_DETAILS = ["USB Drive (MB)","Free : 0.000","Total: 0.000"] EXPORT_BUTTON_TEXT = "Export" @@ -378,7 +378,7 @@ BLUETOOTH_CUFF_NOTIFICATION_MESSAGE_TEXT = "The Bluetooth cuff pair clear error. [1001]" #service DG Cleaning -DG_CLEANING_PARAMETERS = ["DG Cleaning", "Water Flush", "Time (HH:MM)", "Cycle (Days)", "Heat Disinfection", "Time (HH:MM)", "Cycle (Days)"] +DG_CLEANING_PARAMETERS = ["Last Basic Flush Complete", "Last Chemical Disinfect Start", "Last Chemical Disinfect Complete", "Last Chemical Disinfect Flush Complete", "Last Heat Disinfect Complete"]#"DG Cleaning", "Water Flush", "Time (HH:MM)", "Cycle (Days)", "Heat Disinfection", "Time (HH:MM)", "Cycle (Days)"] #services SHUTDOWN_TEXT = "SHUTDOWN" Index: shared/scripts/names.py =================================================================== diff -u -r24c54e0efb0d604eb70dd1ac1c7f1bd4580cd192 -rf24d9f0bfc30fa024ceef73cb8b25efb86a70f70 --- shared/scripts/names.py (.../names.py) (revision 24c54e0efb0d604eb70dd1ac1c7f1bd4580cd192) +++ shared/scripts/names.py (.../names.py) (revision f24d9f0bfc30fa024ceef73cb8b25efb86a70f70) @@ -852,36 +852,28 @@ # service information screen o_SettingsHome_touchItem_TouchRect_service_information = {"container": o_SettingsHome_SettingsHome_2, "id": "_touchItem", "type": "TouchRect", "unnamed": 1, "visible": True} -o_SettingsBase_backbutton_service_information_mouseArea_MouseArea_2 = {"container": o_SettingsBase_SettingsBase, "id": "_mouseArea", "type": "MouseArea", "unnamed": 1, "visible": True} +o_SettingsBase_backbutton_service_information_mouseArea_MouseArea_2 = {"container": o_SettingsBase_SettingsBase, "objectName": "_backButton", "type": "BackButton", "visible": True} # service volume and brightness screen -o_SettingsHome_mousearea_service_volume_and_brightness = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 3, "type": "MouseArea", "unnamed": 1, "visible": True} -# o_SettingsBase_SettingsVolumeBrightness = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsVolumeBrightness", "visible": True} +o_SettingsHome_mousearea_service_volume_and_brightness = {"container": o_SettingsHome_SettingsHome_2, "id": "_touchItem", "occurrence": 2, "type": "TouchRect", "unnamed": 1, "visible": True} o_SettingsBase_backbutton_service_vandb_mouseArea_MouseArea_3 = {"container": o_SettingsBase_SettingsVolumeBrightness, "id": "_mouseArea", "type": "MouseArea", "unnamed": 1, "visible": True} # service wifi screen -o_SettingsHome_mousearea_service_wifi = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 4, "type": "MouseArea", "unnamed": 1, "visible": True} +o_SettingsHome_mousearea_service_wifi = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 3, "type": "MouseArea", "unnamed": 1, "visible": True} o_SettingsHome_backbutton_mousearea_service_wifi = {"container": o_SettingsBase_SettingsWiFi, "id": "_mouseArea", "type": "MouseArea", "unnamed": 1, "visible": True} o_SettingsBase_service_wifi_scan_button_mouseArea_MouseArea_2 = {"container": o_SettingsBase_SettingsWiFi, "id": "_mouseArea", "occurrence": 2, "type": "MouseArea", "unnamed": 1, "visible": True} o_SettingsBase_input_TextInput = {"container": o_SettingsBase_SettingsWiFi, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} # service bluetooth cuff screen -o_SettingsHome_mousearea_service_bluetooth_cuff = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 5, "type": "MouseArea", "unnamed": 1, "visible": True} +o_SettingsHome_mousearea_service_bluetooth_cuff = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 4, "type": "MouseArea", "unnamed": 1, "visible": True} o_SettingsHome_backbutton_mousearea_service_bluetooth_cuff = {"container": o_SettingsBase_SettingsBase, "id": "_mouseArea", "type": "MouseArea", "unnamed": 1, "visible": True} o_SettingsBase_service_bluetooth_cuff_scan_button_mouseArea_MouseArea_3 = {"container": o_SettingsBase_SettingsBase, "id": "_mouseArea", "occurrence": 2, "type": "MouseArea", "unnamed": 1, "visible": True} o_SettingsBase_The_Bluetooth_cuff_pair_clear_error_1001_Text = {"container": o_SettingsBase_SettingsBase, "text": "The Bluetooth cuff pair clear error. [1001]", "type": "Text", "unnamed": 1, "visible": True} # service dg cleaning screen -o_SettingsHome_mousearea_service_dg_cleaning = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 6, "type": "MouseArea", "unnamed": 1, "visible": True} +o_SettingsHome_mousearea_service_dg_cleaning = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 5, "type": "MouseArea", "unnamed": 1, "visible": True} o_SettingsHome_backbutton_mousearea_service_dg_cleaning = {"container": o_SettingsBase_SettingsBase, "id": "_mouseArea", "type": "MouseArea", "unnamed": 1, "visible": True} o_SettingsBase_SettingsDG = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsDG", "visible": True} -o_SettingsBase_service_dg_cleaning_button_mouseArea_MouseArea_4 = {"container": o_SettingsBase_SettingsDG, "id": "_mouseArea", "occurrence": 3, "type": "MouseArea", "unnamed": 1, "visible": True} -o_SettingsBase_MouseArea_waterflush_hr = {"container": o_SettingsBase_SettingsDG, "occurrence": 3, "type": "MouseArea", "unnamed": 1, "visible": True} -o_SettingsBase_MouseArea_waterflush_min = {"container": o_SettingsBase_SettingsDG, "occurrence": 4, "type": "MouseArea", "unnamed": 1, "visible": True} -o_SettingsBase_MouseArea_waterflush_cycle = {"container": o_SettingsBase_SettingsDG, "occurrence": 5, "type": "MouseArea", "unnamed": 1, "visible": True} -o_SettingsBase_MouseArea_3_heat_disinfrection_hr = {"container": o_SettingsBase_SettingsDG, "occurrence": 6, "type": "MouseArea", "unnamed": 1, "visible": True} -o_SettingsBase_MouseArea_4_heat_disinfrection_min = {"container": o_SettingsBase_SettingsDG, "occurrence": 7, "type": "MouseArea", "unnamed": 1, "visible": True} -o_SettingsBase_MouseArea_5_heat_disinfrection_cycle = {"container": o_SettingsBase_SettingsDG, "occurrence": 8, "type": "MouseArea", "unnamed": 1, "visible": True} # Export button o_export_btns = {"container": o_SettingsBase_SettingsBase, "id": "_logTypeExportButton", "type": "ExportButton", "unnamed": 1, "visible": True} @@ -891,7 +883,7 @@ o_SettingsHome_export_log_mouseo_SettingsBase_service_bluetooth_cuff_scan_button_mouseArea_MouseArea_3Area_MouseArea = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 8, "type": "MouseArea", "unnamed": 1, "visible": True} o_SettingsBase_export_log_backButton_BackButton = {"container": o_SettingsBase_SettingsExportLogs, "objectName": "_backButton", "type": "BackButton", "visible": True} o_SettingsHome_service_confirmButton_TouchRect = {"container": o_SettingsHome_SettingsHome_2, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} -o_SettingsHome_export_log_mouseArea_MouseArea = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 8, "type": "MouseArea", "unnamed": 1, "visible": True} +o_SettingsHome_export_log_mouseArea_MouseArea = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 7, "type": "MouseArea", "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} @@ -901,7 +893,7 @@ 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_export_log_eject_button = {"container": o_SettingsBase_SettingsBase, "id": "_image", "source": "qrc:/images/iEject", "type": "Image", "unnamed": 1, "visible": True} +o_SettingsBase_image_Image_export_log_eject_button = {"container": o_SettingsBase_SettingsBase, "id": "_usbEjectButton", "type": "USBButton", "unnamed": 1, "visible": True} o_shutdownRect_TouchRect = {"container": o_Overlay, "id": "_shutdownRect", "type": "TouchRect", "unnamed": 1, "visible": True} o_cancelTouch_TouchRect = {"container": o_Overlay, "id": "_cancelTouch", "type": "TouchRect", "unnamed": 1, "visible": True} @@ -1061,4 +1053,5 @@ o_SettingsBase_Failed_to_set_gateway_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "Failed to set gateway.", "type": "Text", "unnamed": 1, "visible": True} o_SettingsBase_Failed_to_set_subnet_mask_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "Failed to set subnet mask.", "type": "Text", "unnamed": 1, "visible": True} o_SettingsBase_Failed_to_set_DNS_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "Failed to set DNS.", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_TextField = {"container": o_SettingsBase_SettingsExportLogs, "echoMode": 0, "type": "TextField", "unnamed": 1, "visible": True} Index: tst_service_screen/test.py =================================================================== diff -u -r6bb43117bca2673c5de877f5b70b094da344418a -rf24d9f0bfc30fa024ceef73cb8b25efb86a70f70 --- tst_service_screen/test.py (.../test.py) (revision 6bb43117bca2673c5de877f5b70b094da344418a) +++ tst_service_screen/test.py (.../test.py) (revision f24d9f0bfc30fa024ceef73cb8b25efb86a70f70) @@ -96,6 +96,7 @@ for services_parameter in config.SERVICES_PARAMETERS: services_par_text = waitForObjectExists(text_obj(services_parameter)) test.compare(services_par_text.text, services_parameter, "{} should be available under service tile".format(services_parameter)) + utils.waitForGUI(0.5) mouseClick(waitForObjectExists(names.o_SettingsBase_backbutton_service_information_mouseArea_MouseArea_2)) test.endSection() @@ -114,8 +115,8 @@ test.compare(brightness_text.text, config.BRIGHTNESS_TEXT,"Brightness title text should be {}".format(config.BRIGHTNESS_TEXT)) alarm_volume_text = waitForObjectExists(text_obj(config.ALARM_VOLUME_TEXT)) test.compare(alarm_volume_text.text, config.ALARM_VOLUME_TEXT,"Alarm Volume text should be {}".format(config.ALARM_VOLUME_TEXT)) - notification_text = waitForObjectExists(text_obj(config.NOTIFICATION_MESSAGE_TEXT)) - test.compare(notification_text.text, config.NOTIFICATION_MESSAGE_TEXT, "{} notification message is displayed and should be The response value is incorrect. [1007]".format(config.NOTIFICATION_MESSAGE_TEXT)) + # notification_text = waitForObjectExists(text_obj(config.NOTIFICATION_MESSAGE_TEXT)) + # test.compare(notification_text.text, config.NOTIFICATION_MESSAGE_TEXT, "{} notification message is displayed and should be The response value is incorrect. [1007]".format(config.NOTIFICATION_MESSAGE_TEXT)) back_btn = waitForObjectExists(text_obj(config.BACK_TEXT)) test.compare(back_btn.enabled , True, "Back button should be enabled") utils.waitForGUI(0.5) @@ -137,8 +138,6 @@ utils.waitForGUI(0.5) mouseClick(waitForObjectExists(names.o_SettingsBase_service_wifi_scan_button_mouseArea_MouseArea_2)) utils.waitForGUI(0.5) - mouseClick(waitForObjectExists(names.o_SettingsBase_input_TextInput)) - utils.waitForGUI(0.5) mouseClick(waitForObjectExists(names.o_SettingsHome_backbutton_mousearea_service_wifi)) test.endSection() @@ -156,8 +155,7 @@ utils.waitForGUI(0.5) mouseClick(waitForObjectExists(names.o_SettingsBase_service_bluetooth_cuff_scan_button_mouseArea_MouseArea_3)) mouseClick(waitForObjectExists(names.o_SettingsBase_service_bluetooth_cuff_scan_button_mouseArea_MouseArea_3)) - utils.waitForGUI(0.5) - test.compare(waitForObjectExists(names.o_SettingsBase_The_Bluetooth_cuff_pair_clear_error_1001_Text).text, config.BLUETOOTH_CUFF_NOTIFICATION_MESSAGE_TEXT,"Notification Message Text must be {}".format(config.BLUETOOTH_CUFF_NOTIFICATION_MESSAGE_TEXT)) + mouseClick(waitForObjectExists(names.o_SettingsHome_backbutton_mousearea_service_bluetooth_cuff)) test.endSection() @@ -171,22 +169,8 @@ mouseClick(waitForObject(names.o_SettingsHome_mousearea_service_dg_cleaning)) for services_parameter in config.DG_CLEANING_PARAMETERS: services_par_text = waitForObjectExists(text_obj(services_parameter)) - test.compare(services_par_text.text, services_parameter, "{} should be available under Bluetooth Cuff title".format(services_parameter)) + test.compare(services_par_text.text, services_parameter, "{} should be available under ".format(services_parameter)) utils.waitForGUI(0.5) - mouseClick(waitForObjectExists(names.o_SettingsBase_MouseArea_waterflush_hr)) - utils.waitForGUI(0.5) - mouseClick(waitForObjectExists(names.o_SettingsBase_MouseArea_waterflush_min)) - utils.waitForGUI(0.5) - mouseClick(waitForObjectExists(names.o_SettingsBase_MouseArea_waterflush_cycle)) - utils.waitForGUI(0.5) - mouseClick(waitForObjectExists(names.o_SettingsBase_MouseArea_3_heat_disinfrection_hr)) - utils.waitForGUI(0.5) - mouseClick(waitForObjectExists(names.o_SettingsBase_MouseArea_4_heat_disinfrection_min)) - utils.waitForGUI(0.5) - mouseClick(waitForObjectExists(names.o_SettingsBase_MouseArea_5_heat_disinfrection_cycle)) - utils.waitForGUI(0.5) - mouseClick(waitForObjectExists(names.o_SettingsBase_service_dg_cleaning_button_mouseArea_MouseArea_4)) - utils.waitForGUI(0.5) mouseClick(waitForObjectExists(names.o_SettingsHome_backbutton_mousearea_service_dg_cleaning)) test.endSection() @@ -196,10 +180,9 @@ @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 + export_list_count = len(object.children(export_list)) + if export_list_count >= 1: return True else: @@ -215,17 +198,19 @@ utils.waitForGUI(0.5) mouseClick(waitForObjectExists(names.o_SettingsHome_export_log_mouseArea_MouseArea)) test.compare(waitForObjectExists(names.o_export_logs_text).text,config.EXPORT_LOG_TEXT,"{} should be under export logs screen ".format(config.EXPORT_LOG_TEXT)) - log_status = get_storage_data_status(names.o_usb_folder_slider) - test.verify(log_status == False, "export data rectangles should not be filled with contents under USB drive.") - log_status = get_storage_data_status(names.o_SettingsBase_sdcFolderView_ListView) - test.verify(log_status == False, "export data rectangles should be not filled with contents under SD card.") - for option in range(len(config.EXPORT_LOGS_OPTIONS)): + + # TODO need to check whether these two verify checks are valid + # log_status = get_storage_data_status(names.o_usb_folder_slider) + # test.verify(log_status == False, "export data rectangles should not be filled with contents under USB drive.") + # log_status = get_storage_data_status(names.o_SettingsBase_sdcFolderView_ListView) + # test.verify(log_status == False, "export data rectangles should be not filled with contents under SD card.") - utils.waitForGUI(1) + for option in range(len(config.EXPORT_LOGS_OPTIONS)): + utils.waitForGUI(0.5) mouseClick(waitForObjectExists(names.o_combo_box)) export_option = waitForObjectExists(custom_object_for_export_log(config.EXPORT_LOGS_OPTIONS[option])) - utils.waitForGUI(1) + utils.waitForGUI(2) mouseClick(export_option) test.compare(config.EXPORT_LOGS_OPTIONS[option], waitForObjectExists(names.o_combo_box ).displayText, "User should able to select {}".format(config.EXPORT_LOGS_OPTIONS[option])) utils.waitForGUI(1) @@ -262,48 +247,25 @@ test.compare(waitForObjectExists(names.o_SettingsBase_progressCircle_ProgressCircle_2).color.name, config.RED_COLOR,"{} color progress bar is displayed for usb-drive".format(config.RED_COLOR)) test.endSection() - -def verify_device_shutdown(): - """ - verify shutdown button after clicking export button - """ - test.startSection("verification of system shutdown option") - utils.waitForGUI(0.5) - mouseClick(waitForObjectExists(names.o_SettingsBase_export_log_backButton_BackButton)) - test.compare(waitForObjectExists(names.o_keyboard_object).text, config.SHUTDOWN_BUTTON_TEXT, "User should able to click {}".format(config.SHUTDOWN_BUTTON_TEXT)) - utils.waitForGUI(1) - mouseClick(waitForObjectExists(names.o_SettingsHome_service_confirmButton_TouchRect)) - - #Power - #0x0100 - hd_simulator.cmd_send_poweroff_button_pressed() - mouseClick(waitForObjectExists(names.o_cancelTouch_TouchRect)) - hd_simulator.cmd_send_poweroff_button_pressed() - utils.waitForGUI(0.5) - mouseClick(waitForObjectExists(names.o_shutdownRect_TouchRect)) - #0x0E00 - #0x0E00 - hd_simulator.cmd_send_broadcast_poweroff_imminent() - utils.waitForGUI(2) - test.endSection() - - def main(): utils.tstStart(__file__) startApplication(config.AUT_NAME+ " -l") navigate_to_settings_screen() verify_settings_parameters() + + # To avoid issues with the mouse cick due to the alarm dialog - Remove if the alarm dialog no longer shown on app start + mouseClick(waitForObject(names.o_minimize_button)) + verify_parameters_under_information() verify_volume_and_brightness_section() verify_wifi_setting() - + verify_bluetooth_cuff_setting() verify_dg_cleaning_setting() verify_export_logs_screen() verify_export_functionality() - verify_device_shutdown() utils.tstDone()