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()