Index: shared/scripts/configuration/strings.py =================================================================== diff -u -r42dc9d3f4bfd4c50640bfd823c7208b0641e33cb -rf61559f94cc153fb648acfddde149cbbec03fb1a --- shared/scripts/configuration/strings.py (.../strings.py) (revision 42dc9d3f4bfd4c50640bfd823c7208b0641e33cb) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision f61559f94cc153fb648acfddde149cbbec03fb1a) @@ -100,7 +100,7 @@ PATIENT_ID = "demopatientid" TREATMENT_TITLE = "Create a Custom Treatment" HEPARIN_TYPE = "UFH 1,000 IU/mL" -ACID_CONCENTRATE = ["Fres. Naturalyte", "08-1251-1", "08-2251-0", "08-3251-9"] +ACID_CONCENTRATE = ["08-1251-1", "08-2251-0", "08-3251-9"] BICARBONATE_CONCENTRATE = "Fres. Centrisol" DIALYZER_TYPE = ["BB Diacap Pro 13H", "BB Diacap Pro 16H", "BB Diacap Pro 19H", "F Optiflux F160NRe", "F Optiflux F180NRe"] CONFIRM_TREATMENT_TITLE = "Confirm Treatment" Index: shared/scripts/names.py =================================================================== diff -u -r6e8e0d08732684f1f3ae958239ecc4350f50fed1 -rf61559f94cc153fb648acfddde149cbbec03fb1a --- shared/scripts/names.py (.../names.py) (revision 6e8e0d08732684f1f3ae958239ecc4350f50fed1) +++ shared/scripts/names.py (.../names.py) (revision f61559f94cc153fb648acfddde149cbbec03fb1a) @@ -576,9 +576,9 @@ o_back_button_text = {"container": o_Gui_MainView, "text":"BACK", "type": "Text", "unnamed": 1, "visible": True} o_confirm_button_text = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} o_PreTreatmentBase_swipeview_SwipeView = {"container": o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} -o_cartridge_installation_screen1_text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Open the front panel door.\nAnd check the cartridge.", "type": "Text", "unnamed": 1, "visible": True} -o_heparin_syringe_screen1_text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Fill a syringe with heparin and connect the cartridge heparin tubing line.", "type": "Text", "unnamed": 1, "visible": True} -o_cartridge_connection_screen1_text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Connect the cartridge blood and dialysis fluid lines to the dialyzer.", "type": "Text", "unnamed": 1, "visible": True} +o_cartridge_installation_screen1_text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Open the front panel door.", "type": "Text", "unnamed": 1, "visible": True} +o_heparin_syringe_screen1_text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Fill a syringe with heparin and connect the cartridge heparin tubing line. \nInsert syringe into infusion pump housing.", "type": "Text", "unnamed": 1, "visible": True} +o_cartridge_connection_screen1_text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Connect the cartridge blood lines to the dialyzer.", "type": "Text", "unnamed": 1, "visible": True} #text and bullet object o_text_object = {"type": "Text", "unnamed": 1, "visible": True} Index: tst_pre_treatment_disposables/test.py =================================================================== diff -u -rd5265d4dd217d7fe2d63166dbb3a59ff2ca2a92f -rf61559f94cc153fb648acfddde149cbbec03fb1a --- tst_pre_treatment_disposables/test.py (.../test.py) (revision d5265d4dd217d7fe2d63166dbb3a59ff2ca2a92f) +++ tst_pre_treatment_disposables/test.py (.../test.py) (revision f61559f94cc153fb648acfddde149cbbec03fb1a) @@ -30,12 +30,14 @@ CARTRIDGE_INSTALLATION = 1 CARTRIDGE_CONNECTION = 2 HEPARIN_SYRINGE = 3 +SALINE_BAG = 4 NUM_OF_CARTRIDGE_INSTALLATION_SCREENS = 4 NUM_OF_CARTRIDGE_CONNECTION_SCREENS = 5 -NUM_OF_HEPARIN_SYRINGE_SCREENS = 2 -CARTRIDGE_INSTALLATION_TEXT = "Open the front panel door.\nAnd check the cartridge." -CARTRIDGE_CONNECTION_TEXT = "Connect the cartridge blood and dialysis fluid lines to the dialyzer." -HEPARIN_SYRINGE_TEXT = "Fill a syringe with heparin and connect the cartridge heparin tubing line." +NUM_OF_HEPARIN_SYRINGE_SCREENS = 1 +NUM_OF_SALINE_BAG_SCREENS = 2 +CARTRIDGE_INSTALLATION_TEXT = "Open the front panel door." +CARTRIDGE_CONNECTION_TEXT = "Connect the cartridge blood lines to the dialyzer." +HEPARIN_SYRINGE_TEXT = "Fill a syringe with heparin and connect the cartridge heparin tubing line. \nInsert syringe into infusion pump housing." time_interval = "25min" BP_HR_PRE_TREATMENT_STEPS = 6 @@ -52,7 +54,7 @@ test.startSection("Navigating to disposables screen and verifying 'System Self Test' title is displayed") hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_PRET.value,PreTreatmentNoCartSelfTestsStates.NO_CART_SELF_TESTS_START_STATE.value) - hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.SUBMODE_DG_FLUSH_IN_PROGRESS.value, + hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.STANDBY_WAIT_FOR_DG_FLUSH_CMD_RESPONSE_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, @@ -81,7 +83,10 @@ utility.verify_missing_object(names.o_disposable_leftImage_Image) for indicator in range(1, num_of_instruction, 1): verify_bullet_navigation(indicator, num_of_instruction) - verify_next_button(config.DISABLED) + if screen == SALINE_BAG: + verify_confirm_button(config.DISABLED) + else: + verify_next_button(config.DISABLED) if screen == CARTRIDGE_INSTALLATION: verify_back_button(config.DISABLED) else: @@ -90,7 +95,10 @@ mouseClick(waitForObject(names.o_disposable_rightImage_Image)) utility.verify_missing_object(names.o_disposable_rightImage_Image) - verify_next_button(config.ENABLED) + if screen == SALINE_BAG: + verify_confirm_button(config.ENABLED) + else: + verify_next_button(config.ENABLED) test.endSection() def verify_left_instruction_navigation(num_of_instruction, screen): @@ -104,10 +112,19 @@ utility.verify_missing_object(names.o_disposable_rightImage_Image) for indicator in range(num_of_instruction, 0, -1): verify_bullet_navigation(indicator, num_of_instruction) - if indicator == num_of_instruction: + if ((indicator == num_of_instruction) and (screen == CARTRIDGE_INSTALLATION or screen == CARTRIDGE_CONNECTION or screen == HEPARIN_SYRINGE)): + + test.log(str (indicator) ) + test.log(str (screen) ) + test.log(str (num_of_instruction) ) verify_next_button(config.ENABLED) else: - verify_next_button(config.DISABLED) + if (indicator == num_of_instruction) and (screen == SALINE_BAG): + verify_confirm_button(config.ENABLED) + else: + verify_confirm_button(config.DISABLED) + if(indicator == num_of_instruction) and (screen != SALINE_BAG): + verify_next_button(config.DISABLED) if screen == CARTRIDGE_INSTALLATION: verify_back_button(config.DISABLED) else: @@ -132,7 +149,7 @@ bullet_border_color = bullet_children[0].border.color.name if instruction <= num: test.compare(bullet_circle_color, config.COMPLETE_COLOR) - test.compare(bullet_border_color,config.COMPLETE_COLOR) + test.compare(bullet_border_color, config.COMPLETE_COLOR) test.log(str(instruction) + " Complete bullet") else: test.compare(bullet_circle_color, config.CURRENT_COLOR) @@ -157,7 +174,7 @@ """ Method to click on 'NEXT' button """ - mouseClick(waitForObjectExists(names.o_next_button_text)) + mouseClick(findObject(names.o_next_button_text)) def verify_back_button(condition): """ @@ -213,13 +230,22 @@ test.compare(expected_screen_text.text, HEPARIN_SYRINGE_TEXT, "{} Should be displayed when navigated to Phase 2 by using BACK button".format(HEPARIN_SYRINGE_TEXT)) test.endSection() -def verify_confirm_button(): +def verify_confirm_button(condition): """ Method to verify the status 'CONFIRM' button + verify the status of the same + @param condition - (bool) True/False """ - test.startSection("Verifying the status 'CONFIRM' button") - test.compare(str(waitForObjectExists(names.o_confirm_button_text).text), config.CONFIRM_BUTTON_TEXT,"'CONFIRM' button text should be {}".format(config.CONFIRM_BUTTON_TEXT)) - test.compare(waitForObjectExists(names.o_confirm_button_text).enabled , True, "'CONFIRM' button should be enabled") + test.startSection("Verifying the availability 'CONFIRM' button verify the status of the same") + if object.exists(names.o_confirm_button_text): + test.compare(str(waitForObjectExists(names.o_confirm_button_text).text), config.CONFIRM_BUTTON_TEXT,"'CONFIRM' button text should be {}".format(config.CONFIRM_BUTTON_TEXT)) + if condition: + test.compare(waitForObjectExists(names.o_confirm_button_text).enabled , condition, "'CONFIRM' button should be enabled") + else: + test.compare(waitForObjectExists(names.o_confirm_button_text).enabled , condition, "'CONFIRM' button should be disabled") + else: + + test.passes("'CONFIRM' Button should not exists") test.endSection() def verify_functionality_for_cartridge_installation(): @@ -229,8 +255,8 @@ and 'NEXT' button """ test.startSection("Verifying functionality of the cartridge installation screen's left, right navigation and 'NEXT' button") - hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_PRET.value,PreTreatmentNoCartSelfTestsStates.NO_CART_SELF_TESTS_START_STATE.value) - hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.SUBMODE_DG_HEAT_DISINFECT_IN_PROGRESS.value, water_sample_state=PreTreatmentSampleWaterStates.SAMPLE_WATER_SETUP_STATE.value,consumables_self_test_state=PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_INSTALL_STATE.value, + hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_PRET.value, PreTreatmentNoCartSelfTestsStates.NO_CART_SELF_TESTS_START_STATE.value) + hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.STANDBY_WAIT_FOR_DG_FLUSH_TO_START_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) @@ -270,8 +296,6 @@ and 'NEXT', 'BACK' and 'CONFIRM' button """ test.startSection("Verifying functionality of the heparin syringe") - verify_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) - verify_left_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) click_on_back_button() verify_cartridge_connection_first_screen_displayed() click_on_back_button() @@ -280,8 +304,7 @@ click_on_next_button() verify_right_instruction_navigation(NUM_OF_CARTRIDGE_CONNECTION_SCREENS, CARTRIDGE_CONNECTION) click_on_next_button() - verify_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) - click_on_next_button() + verify_next_button(config.ENABLED) test.endSection() def verify_functionality_for_saline_bag(): @@ -291,7 +314,9 @@ and 'NEXT', 'BACK' and 'CONFIRM' button """ test.startSection("Verifying functionality of the saline bag") - #verify_confirm_button() + click_on_next_button() + verify_right_instruction_navigation(NUM_OF_SALINE_BAG_SCREENS, SALINE_BAG) + verify_left_instruction_navigation(NUM_OF_SALINE_BAG_SCREENS, SALINE_BAG) click_on_back_button() verify_heparin_syringe_first_screen_displayed() click_on_back_button() @@ -304,7 +329,8 @@ click_on_next_button() verify_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) click_on_next_button() - verify_confirm_button() + verify_right_instruction_navigation(NUM_OF_SALINE_BAG_SCREENS, SALINE_BAG) + verify_confirm_button(config.ENABLED) mouseClick(waitForObject(names.o_confirm_button_text)) hd_simulator.cmd_send_hd_general_response(message_id=173, accepted=config.ACCEPTED, reason=0) test.endSection() @@ -504,30 +530,30 @@ """ 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.SUBMODE_START.value) + 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_confirm_button)) verify_create_custom_treatment_parameter() verify_request_continue_mode() # navigation for pre-treatment screens - hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_TPAR.value, sub_mode=HDOpSubModes.SUBMODE_START.value) + hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_TPAR.value, sub_mode=HDOpSubModes.STANDBY_START_STATE.value) utils.waitForGUI(1) - hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_PRET.value,PreTreatmentPrimeStates.HD_PRIME_START_STATE.value) - hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpModes.MODE_PRET.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, + hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_PRET.value, PreTreatmentNoCartSelfTestsStates.NO_CART_SELF_TESTS_START_STATE.value) + hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.STANDBY_WAIT_FOR_TREATMENT_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) utils.waitForGUI(1) hd_simulator.cmd_initiate_treatment_response(response=1, reason=0) - hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_PRET.value, sub_mode=HDOpSubModes.SUBMODE_START.value) + hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_PRET.value, sub_mode=HDOpSubModes.STANDBY_START_STATE.value) utils.waitForGUI(1) # navigation for pre-treatment disposables screens - hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_PRET.value, sub_mode=HDOpSubModes.SUBMODE_START.value) + hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_PRET.value, sub_mode=HDOpSubModes.STANDBY_START_STATE.value) utils.waitForGUI(1) - hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.SUBMODE_DG_FLUSH_IN_PROGRESS.value, + hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.STANDBY_WAIT_FOR_DG_FLUSH_CMD_RESPONSE_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,