Index: shared/scripts/configuration/config.py =================================================================== diff -u -rb5f97cddacc0a93b825af43c75ca3097a71d51b8 -r98f13c9198e630726f86fa3288e452554d3b2cf5 --- shared/scripts/configuration/config.py (.../config.py) (revision b5f97cddacc0a93b825af43c75ca3097a71d51b8) +++ shared/scripts/configuration/config.py (.../config.py) (revision 98f13c9198e630726f86fa3288e452554d3b2cf5) @@ -46,14 +46,17 @@ UF_MAXIMUM_SLIDER_WIDTH = 638.00 UF_VALID_RANGE = 700 PATIENT_CONNECTION_TEXT = "Patient Connection" -TUTORIAL_TEXT = -{ +TUTORIAL_TEXT = { 1 : "Wash your hands and establish vascular access per your clinic's instructions.", 2 : "Pinch arterial clamp and venous clamp on located on the cartridge patient lines.", 3 : "Remove arterial and venous shunt.", 4 : "Connect arterial and venous cartridge lines to your patient access lines." - } +} +UF_VOLUME_TEXT = "Ultrafiltration Volume (L)" +UF_TITLE_TEXT = "Ultrafiltration Setup" + + # dictionary of rejection reason from application source code. # message location -> denali-> Headers-> common-> MsgDefs.h REJECTION_REASON = { Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r3cdfabd1b4528506c3dc52e1557711fd4b72c999 -r98f13c9198e630726f86fa3288e452554d3b2cf5 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 3cdfabd1b4528506c3dc52e1557711fd4b72c999) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 98f13c9198e630726f86fa3288e452554d3b2cf5) @@ -112,39 +112,41 @@ "trying 100 times") - def page_step_indicator_verification(pre_treatment_step, pre_treatment_items_object): """ Method to verify the Page Step indicators [the object on top of the screen which indicates the steps passed, current, remained] @param pre_treatment_step :(int) indicates the Current pre-treatment step @param pre_treatment_items_object :(dictionary) pre_treatment @return N/A """ - for page in range(len(config.PRE_TREATMENT_SCREENS)): - bullet_children = object.children(squish.waitForObjectExists(pre_treatment_items_object)) + test.startSection("Method to verify the Page Step indicators from patient connection section") + for page in range(1, len(config.PRE_TREATMENT_SCREENS)): + pre_treatment_items_object["occurrence"] = page + bullet_children = object.children(squish.waitForObject(pre_treatment_items_object)) bullet_circle_color = bullet_children[0].color.name #waitForObjectExsits need to be checked. bullet_border_color = bullet_children[0].border.color.name - step_title = squish.waitForObjectExists(names.text_object(config.PRE_TREATMENT_SCREENS[page])) + step_title = bullet_children[2] #To verify the step indicators of the completed pre treatment screens if page < pre_treatment_step: - test.verify(squish.waitForObjectExists(names.bullet_object(page)).complete) - test.verify(not squish.waitForObjectExists(names.bullet_object(page)).current) - test.compare(bullet_circle_color, config.COMPLETE_COLOR) - test.compare(bullet_border_color,config.COMPLETE_COLOR) #config.PRETREATMENT_INDICATOR[1] - test.compare(step_title.color.name,config.ENABLED_COLOR) + test.verify(squish.waitForObjectExists(pre_treatment_items_object).complete, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" complete attribute should be True")) + test.verify(not squish.waitForObjectExists(pre_treatment_items_object).current, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" current attribute should be false")) + test.compare(bullet_circle_color, config.COMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" bullet color hex should be "+str(config.COMPLETE_COLOR))) + test.compare(bullet_border_color, config.COMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" bullet border color hex should be "+str(config.COMPLETE_COLOR))) + test.compare(step_title.color.name, config.ENABLED_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" title color hex should be "+str(config.ENABLED_COLOR))) #To verify the step indicators of the current pre treatment screen elif page == pre_treatment_step: - test.verify(squish.waitForObjectExists(names.bullet_object(page)).current,) - test.verify(not squish.waitForObjectExists(names.bullet_object(page)).complete) - test.compare(bullet_circle_color,config.CURRENT_COLOR) - test.compare(bullet_border_color,config.COMPLETE_COLOR) - test.compare(step_title.color.name,config.ENABLED_COLOR) - test.verify(step_title.font.bold) + test.verify(squish.waitForObjectExists(pre_treatment_items_object).current, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" complete attribute should be True")) + test.verify(not squish.waitForObjectExists(pre_treatment_items_object).complete, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" current attribute should be false")) + test.compare(bullet_circle_color,config.CURRENT_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" bullet color hex should be "+str(config.CURRENT_COLOR))) + test.compare(bullet_border_color,config.COMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" bullet border color hex should be "+str(config.COMPLETE_COLOR))) + test.compare(step_title.color.name,config.ENABLED_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" title color hex should be "+str(config.ENABLED_COLOR))) + test.verify(step_title.font.bold, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" title font bold should be "+str(config.ENABLED_COLOR))) #To verify the step indicators of the remaining pre-treatment screens else: - test.verify(not squish.waitForObjectExists(names.bullet_object(page)).current,) - test.verify(not squish.waitForObjectExists(names.bullet_object(page)).complete,) - test.compare(step_title.color.name,config.INCOMPLETE_COLOR) - test.compare(bullet_circle_color,config.CURRENT_COLOR) - test.compare(bullet_border_color,config.INCOMPLETE_COLOR) - + test.verify(not squish.waitForObjectExists(pre_treatment_items_object).current, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" complete attribute should be false")) + test.verify(not squish.waitForObjectExists(pre_treatment_items_object).complete, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" current attribute should be false")) + test.compare(step_title.color.name,config.INCOMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" title color hex should be "+str(config.INCOMPLETE_COLOR))) + test.compare(bullet_circle_color,config.CURRENT_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" bullet circle color hex should be "+str(config.CURRENT_COLOR))) + test.compare(bullet_border_color,config.INCOMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" bullet border color hex should be "+str(config.INCOMPLETE_COLOR))) + + test.endSection() Index: shared/scripts/names.py =================================================================== diff -u -rb5f97cddacc0a93b825af43c75ca3097a71d51b8 -r98f13c9198e630726f86fa3288e452554d3b2cf5 --- shared/scripts/names.py (.../names.py) (revision b5f97cddacc0a93b825af43c75ca3097a71d51b8) +++ shared/scripts/names.py (.../names.py) (revision 98f13c9198e630726f86fa3288e452554d3b2cf5) @@ -5,7 +5,6 @@ def text_object(txt): return {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase, "text": txt, "type": "Text", "unnamed": 1, "visible": True} - #{"container": o_PreTreatmentConsumblesStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "occurrence": 5, "type": "StepBullet", "unnamed": 1, "visible": True} #{"container": o_PreTreatmentPrimeStack_PreTreatmentBase_TreatmentFlowBase, "id": "_nextStepsBullet", "occurrence": 4, "type": "StepBullet", "unnamed": 1, "visible": True} @@ -79,7 +78,7 @@ o_PreTreatmentStack_PreTreatmentSampleStack_PreTreatmentWaterSampleStack = {"container": o_PreTreatmentStack_PreTreatmentStack, "objectName": "_PreTreatmentSampleStack", "type": "PreTreatmentWaterSampleStack", "visible": True} o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentStack_PreTreatmentSampleStack_PreTreatmentWaterSampleStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} o_PreTreatmentUltrafiltration_volumeSlider_Slider = {"container": o_PreTreatmentConsumblesStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "objectName": "_volumeSlider", "type": "Slider", "visible": True} -o_PreTreatmentUltrafiltration_Ultrafiltration_Volume_L_Text = {"container": o_PreTreatmentConsumblesStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "text": "Ultrafiltration Volume (L)", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentUltrafiltration_Ultrafiltration_Volume_Text = {"container": o_PreTreatmentConsumblesStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "text": "Ultrafiltration Volume (L)", "type": "Text", "unnamed": 1, "visible": True} o_PreTreatmentUltrafiltration_Ultrafiltration_Setup_Text = {"container": o_PreTreatmentConsumblesStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "text": "Ultrafiltration Setup", "type": "Text", "unnamed": 1, "visible": True} o_PreTreatmentUltrafiltration_CONFIRM_Text = {"container": o_PreTreatmentConsumblesStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase_2 = {"container": o_PreTreatmentStack_PreTreatmentConsumblesStack_PreTreatmentConnectionStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} @@ -90,6 +89,7 @@ o_swipeview_tutorial_text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "type": "Text", "unnamed": 1, "visible": True} o_PreTreatmentBase_rightImage_Image = {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} o_PreTreatmentBase_leftImage_Image = {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} +o_PreTreatmentUltrafiltration_Indicators = {"container": o_PreTreatmentConsumblesStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "id": "_nextStepsBullet", "type": "StepBullet", "unnamed": 1, "visible": True} #o_swipeview_Item = {"container": o_PreTreatmentBase_swipeview_Swipeo_swipeview_Connect_arterial_and_venous_cartridge_lines_to_your_patient_access_lines_Text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Connect arterial and venous cartridge lines to your patient access lines.", "type": "Text", "unnamed": 1, "visible": True} Index: tst_pre_treatment_patient_connection/test.py =================================================================== diff -u -rb5f97cddacc0a93b825af43c75ca3097a71d51b8 -r98f13c9198e630726f86fa3288e452554d3b2cf5 --- tst_pre_treatment_patient_connection/test.py (.../test.py) (revision b5f97cddacc0a93b825af43c75ca3097a71d51b8) +++ tst_pre_treatment_patient_connection/test.py (.../test.py) (revision 98f13c9198e630726f86fa3288e452554d3b2cf5) @@ -85,11 +85,12 @@ for instruction_screen in (screen_indicator): mouseClick(waitForObject(names.names.o_PreTreatmentBase_rightImage_Image)) - test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_Patient_Connection_Text).text),config.PATIENT_CONNECTION_TEXT, "Patient connection text should be {msg}".format(msg=config.PATIENT_CONNECTION_TEXT)) + test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_Patient_Connection_Text).text, config.PATIENT_CONNECTION_TEXT, "Patient connection text should be {msg}".format(msg=config.PATIENT_CONNECTION_TEXT))) test.compare(str(waitForObjectExists(names.o_swipeview_tutorial_text).enabled, True, "Tutorial text should be enabled.")) - test.compare(str(waitForObjectExists(names.o_swipeview_tutorial_text).text, config.TUTORIAL_TEXT[screen_indicator], "Tutorial text should be {msg}".format(msg=config.TUTORIAL_TEXT[screen_indicator])) - verify_bullet_indicators(screen_indicator) + test.compare(str(waitForObjectExists(names.o_swipeview_tutorial_text).text, config.TUTORIAL_TEXT[screen_indicator], "Tutorial text should be {msg}".format(msg=config.TUTORIAL_TEXT[screen_indicator]))) + #verify_bullet_indicators(screen_indicator) if screen_indicator == 4: + test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_Continue_Text).enabled, False, "continue button should be disabled")) else: test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_Continue_Text).enabled, True, "continue button should be disabled")) @@ -127,7 +128,7 @@ slider_width = slider_buffer + config.UF_MINIMUM_SLIDER_WIDTH mouseClick(waitForObject(names.o_PreTreatmentUltrafiltration_volumeSlider_Slider), slider_width , 3, Qt.LeftButton) - test.compare(waitForObject(names.o_PreTreatmentUltrafiltration_volumeSlider_Slider).value , (slider_value/10), "user adjusted slider value to -> "+ str(slider_value)) + test.compare(waitForObject(names.o_PreTreatmentUltrafiltration_volumeSlider_Slider).value , (slider_value/10), "user adjusted slider value to -> "+ str(slider_value/10)) @@ -155,11 +156,11 @@ hd_simulator.cmd_set_treatment_parameter_ranges(0, 100, 0, max_uf, 0, 0) for uf_value in range(1, (max_uf//100)+1, 1): drag_and_drop_ultrafilteration_slider(uf_value, max_uf) -# test.compare(utils.l2ml(waitForObjectExists(names.o_treatmentStart_ultrafiltrationTouchArea_TreatmentUltrafiltration).value), uf_value, "uf set value should be :" + str(uf_value)) - -# test.compare(utils.l2ml(waitForObjectExists(names.o_volumeSlider_slider).maximum), max_uf, "maximum uf value should be :" + str(max_uf)) -# test.compare(utils.l2ml(waitForObjectExists(names.o_volumeSlider_slider).minimum), min_uf, "minimum uf value should be :" + str(min_uf)) - + + test.compare(utils.l2ml(waitForObjectExists(names.o_PreTreatmentUltrafiltration_volumeSlider_Slider).maximum), max_uf, "maximum uf value should be :" + str(max_uf)) + test.compare(utils.l2ml(waitForObjectExists(names.o_PreTreatmentUltrafiltration_volumeSlider_Slider).minimum), min_uf, "minimum uf value should be :" + str(min_uf)) + test.verify((names.o_PreTreatmentUltrafiltration_Ultrafiltration_Volume_Text).text, config.UF_VOLUME_TEXT, "uf volume text should be " + config.UF_VOLUME_TEXT) + test.verify((names.o_PreTreatmentBase_indicator_StepIndicator).text, config.UF_TITLE_TEXT, "uf title text should be "+config.UF_TITLE_TEXT) def verify_bullet_indicators(indicator): @@ -183,14 +184,16 @@ utils.waitForGUI(2) - #navigate to pre treatment hd_simulator.cmd_set_hd_operation_mode_data(5,0) + #navigate to patient connection sub mode navigate_patient_connection(PRE_TREATMENT_PATIENT_CONNECTION_MODE) - #utility.page_step_indicator_verification(PRE_TREATMENT_STEPS, names.ultrafilteration_text) + #verification of indicators from patient connection section + utility.page_step_indicator_verification(PRE_TREATMENT_STEPS, names.o_PreTreatmentUltrafiltration_Indicators) + #verification of uf slider based on edge condition. start_test_treatment_ultrafilteration(TREATMENT_ULTRAFILTERATION_TESTING_OPTION["OPTION_1"]) start_test_treatment_ultrafilteration(TREATMENT_ULTRAFILTERATION_TESTING_OPTION["OPTION_2"]) start_test_treatment_ultrafilteration(TREATMENT_ULTRAFILTERATION_TESTING_OPTION["OPTION_3"]) @@ -202,6 +205,7 @@ start_test_treatment_ultrafilteration(TREATMENT_ULTRAFILTERATION_TESTING_OPTION["OPTION_9"]) start_test_treatment_ultrafilteration(TREATMENT_ULTRAFILTERATION_TESTING_OPTION["OPTION_10"]) + test_rejection_message_patient_connection(accept_status = False) hd_simulator.cmd_send_uf_treatment_response(accepted = True, reason = 0, volume = config.UF_VALID_RANGE)