Index: shared/scripts/configuration/config.py =================================================================== diff -u -r4bc576a5c996c40ff9f8f9b920827e8b3dda2e6e -r0778c9cc04a3414612e79d1bbfe7c1aebb56c1c3 --- shared/scripts/configuration/config.py (.../config.py) (revision 4bc576a5c996c40ff9f8f9b920827e8b3dda2e6e) +++ shared/scripts/configuration/config.py (.../config.py) (revision 0778c9cc04a3414612e79d1bbfe7c1aebb56c1c3) @@ -18,7 +18,7 @@ from configuration.strings import * -AUT_NAME = "denaliSquish" +AUT_NAME = "denaliSquish -S" COLOR_CODES = {"Aqua": "#81ffff", "Blue": "#017dea", "Blue 2": "#1090d5", "Green": "#29fd2d", "Grey": "#d3d3d3", "Lavender": "#db98f5", "Light Blue": "#acd7f1", "Light Teal": "#29f1da","Lime": "#b7fc36", Index: shared/scripts/names.py =================================================================== diff -u -r19462c9c0edce2ac5ed5130f5c81321684942a48 -r0778c9cc04a3414612e79d1bbfe7c1aebb56c1c3 --- shared/scripts/names.py (.../names.py) (revision 19462c9c0edce2ac5ed5130f5c81321684942a48) +++ shared/scripts/names.py (.../names.py) (revision 0778c9cc04a3414612e79d1bbfe7c1aebb56c1c3) @@ -668,11 +668,8 @@ o_EndTreatmentRecirculateStack_EndTreatmentBase_EndTreatmentBase = {"container": o_EndTreatmentRecirculateStack_EndTreatmentRecirculateStack, "objectName": "_EndTreatmentBase", "type": "EndTreatmentBase", "visible": True} o_EndTreatmentBase_swipeview_SwipeView = {"container": o_EndTreatmentRecirculateStack_EndTreatmentBase_EndTreatmentBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} -#instructions for standby disinfection screen -o_DisinfectStack_DisinfectStack = {"container": o_Gui_MainView, "objectName": "_DisinfectStack", "type": "DisinfectStack", "visible": True} -o_DisinfectStack_disinfect_TreatmentFlowBase = {"container": o_DisinfectStack_DisinfectStack, "objectName": "_disinfect", "type": "TreatmentFlowBase", "visible": True} -o_disinfect_swipeview_SwipeView = {"container": o_DisinfectStack_disinfect_TreatmentFlowBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} o_instruction = {"type": "Text", "unnamed": 1, "visible": True} o_right_arrow = {"id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} -o_image_path = {"type": "Image", "unnamed": 1, "visible": True} \ No newline at end of file +o_image_path = {"type": "Image", "unnamed": 1, "visible": True} + Index: tst_instructions_poc/test.py =================================================================== diff -u -r19462c9c0edce2ac5ed5130f5c81321684942a48 -r0778c9cc04a3414612e79d1bbfe7c1aebb56c1c3 --- tst_instructions_poc/test.py (.../test.py) (revision 19462c9c0edce2ac5ed5130f5c81321684942a48) +++ tst_instructions_poc/test.py (.../test.py) (revision 0778c9cc04a3414612e79d1bbfe7c1aebb56c1c3) @@ -20,6 +20,7 @@ from configuration import config from configuration import utility from dialin.common.hd_defs import HDOpModes, HDOpSubModes, HDInitStates, PreTreatmentSubModes, PreTreatmentSampleWaterStates, PreTreatmentConsumableSelfTestStates, PreTreatmentNoCartSelfTestsStates, PreTreatmentCartridgeInstallStates, PreTreatmentDrySelfTestsStates, PreTreatmentPrimeStates, PreTreatmentRecircStates, PreTreatmentPatientConnectionStates, TreatmentStates, UFStates, SalineBolusStates, HeparinStates, TreatmentRinsebackStates, PreTreatmentRecircStates, TreatmentBloodPrimeStates, TreatmentEndStates, TreatmentStopStates, TreatmentDialysisStates +from dialin.ui.utils import waitForGUI hd_simulator = HDSimulator() ven_low = 40 @@ -35,8 +36,8 @@ title_count_dict = {} IMAGE_READY = 1 image_list_from_location = os.listdir(config.EXPECTED_IMAGE_LOCATION) -text_obj_names = [names.o_PreTreatmentBase_swipeview_SwipeView_WaterSample,names.o_PreTreatmentBase_swipeview_SwipeView_Consumables,names.o_preTreatmentDisposablesCartridgeInstallation_swipeview_SwipeView,names.o_preTreatmentDisposablesCartridgeConnetion_swipeview_SwipeView,names.o_PreTreatmentBase_swipeview_SwipeView,names.o_preTreatmentDisposablesSalineBag_swipeview_SwipeView,names.o_PreTreatmentBase_swipeview_SwipeView_3,names.o_EndTreatmentRinsebackInit_swipeview_SwipeView,names.o_EndTreatmentRinsebackComplete_swipeview_SwipeView,names.o_patientDisconnectionConfirm_swipeview_SwipeView,names.o_disposablesRemovalConfirm_swipeview_SwipeView,names.o_EndTreatmentBase_swipeview_SwipeView,names.o_disinfect_swipeview_SwipeView] -rightarrow_obj_names = [names.o_preTreatmentConsumablesStack_PreTreatmentBase_TreatmentFlowBase,names.o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeInstallation_TreatmentFlowBase,names.o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeConnetion_TreatmentFlowBase,names.o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack,names.o_pretreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase,names.o_EndTreatmentRinsebackStack_EndTreatmentRinsebackInit_EndTreatmentRinsebackInit,names.o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase,names.o_PostTreatmentStack_disposablesRemovalConfirm_TreatmentFlowBase,names.o_EndTreatmentRecirculateStack_EndTreatmentBase_EndTreatmentBase,names.o_DisinfectStack_disinfect_TreatmentFlowBase] +text_obj_names = [names.o_PreTreatmentBase_swipeview_SwipeView_WaterSample,names.o_PreTreatmentBase_swipeview_SwipeView_Consumables,names.o_preTreatmentDisposablesCartridgeInstallation_swipeview_SwipeView,names.o_preTreatmentDisposablesCartridgeConnetion_swipeview_SwipeView,names.o_PreTreatmentBase_swipeview_SwipeView,names.o_preTreatmentDisposablesSalineBag_swipeview_SwipeView,names.o_PreTreatmentBase_swipeview_SwipeView_3,names.o_EndTreatmentRinsebackInit_swipeview_SwipeView,names.o_EndTreatmentRinsebackComplete_swipeview_SwipeView,names.o_patientDisconnectionConfirm_swipeview_SwipeView,names.o_disposablesRemovalConfirm_swipeview_SwipeView,names.o_EndTreatmentBase_swipeview_SwipeView] +rightarrow_obj_names = [names.o_preTreatmentConsumablesStack_PreTreatmentBase_TreatmentFlowBase,names.o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeInstallation_TreatmentFlowBase,names.o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeConnetion_TreatmentFlowBase,names.o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack,names.o_pretreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase,names.o_EndTreatmentRinsebackStack_EndTreatmentRinsebackInit_EndTreatmentRinsebackInit,names.o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase,names.o_PostTreatmentStack_disposablesRemovalConfirm_TreatmentFlowBase,names.o_EndTreatmentRecirculateStack_EndTreatmentBase_EndTreatmentBase] def get_text_obj(screen_obj,text): """ @@ -116,6 +117,7 @@ #to remove last empty character from the string if instruction_text[-1] == " ": instruction_text = instruction_text.rstrip() + test.log(str(text_obj_names)) image_status = waitForObjectExists(get_img_obj(text_obj_names[0],"{}{}".format(config.IMAGE_LOCATION,image_text))).status test.compare(str(image_status),str(IMAGE_READY),image_text + " - image title is valid and loaded on UI.") test.compare(str(waitForObject(get_text_obj(text_obj_names[0],instruction_text)).text),instruction_text, "Instruction from" +title+ "screen is visible and matched") @@ -318,7 +320,7 @@ startApplication(config.AUT_NAME) read_data_from_conf_file() hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_PRET.value,PreTreatmentSampleWaterStates.SAMPLE_WATER_SETUP_STATE.value) - + test.startSection("Navigating to Pre-Treatment Sample screen") hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.STANDBY_WAIT_FOR_TREATMENT_STATE.value, water_sample_state=PreTreatmentSampleWaterStates.SAMPLE_WATER_STATE.value,consumables_self_test_state=PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_INSTALL_STATE.value, no_cartridge_self_test_state=PreTreatmentNoCartSelfTestsStates.NO_CART_SELF_TESTS_START_STATE.value,installation_state=PreTreatmentCartridgeInstallStates.CARTRIDGE_INSTALL_STATE.value, dry_self_test_state=PreTreatmentDrySelfTestsStates.DRY_SELF_TESTS_START_STATE.value, @@ -328,23 +330,23 @@ index = verify_instruction_and_image("Water Sample Result Failed",index = index) text_obj_names.pop(first_index) test.endSection() - + test.startSection("Navigating to Pre-Treatment Consumables screen") hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.STANDBY_WAIT_FOR_DISINFECT_STATE.value, water_sample_state=PreTreatmentSampleWaterStates.SAMPLE_WATER_SETUP_STATE.value,consumables_self_test_state=PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_INSTALL_STATE.value, no_cartridge_self_test_state=PreTreatmentNoCartSelfTestsStates.NO_CART_SELF_TESTS_START_STATE.value,installation_state=PreTreatmentCartridgeInstallStates.CARTRIDGE_INSTALL_STATE.value, dry_self_test_state=PreTreatmentDrySelfTestsStates.DRY_SELF_TESTS_START_STATE.value, prime_state=PreTreatmentPrimeStates.HD_PRIME_START_STATE.value,recirculate_state=PreTreatmentRecircStates.PRE_TREATMENT_RECIRC_STATE.value, patient_connection_state=PreTreatmentPatientConnectionStates.PATIENT_CONNECTION_STATE.value) index = verify_instruction_and_image("Consumables Installation",index = index) rightarrow_obj_names.pop(first_index) test.endSection() - + test.startSection("Method to navigate to create custom treatment to set all parameters") hd_simulator.cmd_send_hd_operation_mode(op_mode = HDOpModes.MODE_TPAR.value , sub_mode = HDOpSubModes.STANDBY_START_STATE.value) mouseClick(waitForObject(names.o_input_patient_id)) type(waitForObject(names.o_input_patient_id), "abcd") mouseClick(waitForObject(names.o_continue_button)) verify_create_custom_treatment_parameter() test.endSection() - + test.startSection("Navigating to Pre-Treatment Disposables screen") hd_simulator.cmd_send_hd_operation_mode(op_mode = HDOpModes.MODE_PRET.value , sub_mode = HDOpSubModes.STANDBY_START_STATE.value) hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.STANDBY_WAIT_FOR_DG_FLUSH_TO_START_STATE.value, @@ -375,7 +377,7 @@ text_obj_names.pop(first_index) rightarrow_obj_names.pop(first_index) test.endSection() - + test.log("Navigating to Pre-Treatment Ultrafiltration screen") hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=PreTreatmentSubModes.HD_PRE_TREATMENT_PATIENT_CONNECTION_STATE.value, water_sample_state=PreTreatmentSampleWaterStates.SAMPLE_WATER_SETUP_STATE.value,consumables_self_test_state=PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_INSTALL_STATE.value, @@ -392,33 +394,33 @@ test.startSection("Navigating to Pre-Treatment Patient Connection screen") index = verify_instruction_and_image("Patient Connection",index = index) test.endSection() - + test.startSection("Navigating to Pre-Treatment Start screen") hd_simulator.cmd_send_pre_treatment_patient_connection_confirm_response(accepted=True, reason=0) index = verify_instruction_and_image("Start Treatment",index = index) text_obj_names.pop(first_index) rightarrow_obj_names.pop(first_index) test.endSection() - + test.startSection("Navigating to End Treatment Rinseback Setup screen") hd_simulator.cmd_set_treatment_states_data(sub_mode = TreatmentStates.TREATMENT_RINSEBACK_STATE.value, uf_state = UFStates.UF_START_STATE.value, saline_state = SalineBolusStates.SALINE_BOLUS_STATE_IDLE.value, heparin_state = HeparinStates.HEPARIN_STATE_OFF.value, rinseback_state = TreatmentRinsebackStates.RINSEBACK_STOP_INIT_STATE.value, recirculate_state = PreTreatmentRecircStates.PRE_TREATMENT_RECIRC_STATE.value, blood_prime_state = TreatmentBloodPrimeStates.BLOOD_PRIME_RAMP_STATE.value, treatment_end_state = TreatmentEndStates.TREATMENT_END_WAIT_FOR_RINSEBACK_STATE.value, treatment_stop_state = TreatmentStopStates.TREATMENT_STOP_RECIRC_STATE.value, dialysis_state = TreatmentDialysisStates.DIALYSIS_START_STATE.value) index = verify_instruction_and_image("Rinseback Setup",index = index) text_obj_names.pop(first_index) test.endSection() - + test.startSection("Navigating to End Treatment Rinseback Complete screen") hd_simulator.cmd_set_treatment_states_data(sub_mode = TreatmentStates.TREATMENT_RINSEBACK_STATE.value, uf_state = UFStates.UF_START_STATE.value, saline_state = SalineBolusStates.SALINE_BOLUS_STATE_IDLE.value, heparin_state = HeparinStates.HEPARIN_STATE_OFF.value, rinseback_state = TreatmentRinsebackStates.RINSEBACK_STOP_STATE.value, recirculate_state = PreTreatmentRecircStates.PRE_TREATMENT_RECIRC_STATE.value, blood_prime_state = TreatmentBloodPrimeStates.BLOOD_PRIME_RAMP_STATE.value, treatment_end_state = TreatmentEndStates.TREATMENT_END_WAIT_FOR_RINSEBACK_STATE.value, treatment_stop_state = TreatmentStopStates.TREATMENT_STOP_RECIRC_STATE.value, dialysis_state = TreatmentDialysisStates.DIALYSIS_START_STATE.value) - - + + index = verify_instruction_and_image("Rinseback Complete",index = index) text_obj_names.pop(first_index) rightarrow_obj_names.pop(first_index) test.endSection() - + test.startSection("Navigating to Post Treatment Disconnection screen") hd_simulator.cmd_send_hd_operation_mode(op_mode = HDOpModes.MODE_POST.value , sub_mode = HDInitStates.POST_STATE_START.value) index = verify_instruction_and_image("Patient Disconnection",index = index) @@ -427,29 +429,23 @@ text_obj_names.pop(first_index) rightarrow_obj_names.pop(first_index) test.endSection() - + test.startSection("Navigating to Post Treatment Disposables screen") index = verify_instruction_and_image("Disposables Removal",index = index) text_obj_names.pop(first_index) rightarrow_obj_names.pop(first_index) test.endSection() - + test.startSection("Navigating to End Treatment Recirculate screen") hd_simulator.cmd_set_treatment_states_data(sub_mode = TreatmentStates.TREATMENT_RECIRC_STATE.value, uf_state = UFStates.UF_START_STATE.value, saline_state = SalineBolusStates.SALINE_BOLUS_STATE_IDLE.value, heparin_state = HeparinStates.HEPARIN_STATE_OFF.value, rinseback_state = TreatmentRinsebackStates.RINSEBACK_STOP_STATE.value, recirculate_state = PreTreatmentRecircStates.PRE_TREATMENT_RECIRC_STATE.value, blood_prime_state = TreatmentBloodPrimeStates.BLOOD_PRIME_RAMP_STATE.value, treatment_end_state = TreatmentEndStates.TREATMENT_END_WAIT_FOR_RINSEBACK_STATE.value, treatment_stop_state = TreatmentStopStates.TREATMENT_STOP_RECIRC_STATE.value, dialysis_state = TreatmentDialysisStates.DIALYSIS_START_STATE.value) - - + + index = verify_instruction_and_image("Recirculate",index = index) text_obj_names.pop(first_index) rightarrow_obj_names.pop(first_index) test.endSection() - - test.startSection("Navigating to Standby Disinfection screen") - hd_simulator.cmd_send_hd_operation_mode(op_mode = HDOpModes.MODE_STAN.value , sub_mode = HDOpSubModes.STANDBY_WAIT_FOR_DISINFECT_STATE.value) - index = verify_instruction_and_image("Disinfection",index = index) - test.endSection() - - #TODO :- Chemical Disinfect + #TODO :- Disinfect verification utils.tstDone()