Index: shared/scripts/configuration/strings.py =================================================================== diff -u -rc99951f0aa8f348dbc5e72d47ab30443b47c5415 -r8977e6f10ea8a1b5807f963a1b98dc11ea2d181f --- shared/scripts/configuration/strings.py (.../strings.py) (revision c99951f0aa8f348dbc5e72d47ab30443b47c5415) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision 8977e6f10ea8a1b5807f963a1b98dc11ea2d181f) @@ -35,66 +35,43 @@ TREATMENT_REVIEW_TITLE_TEXT = "Treatment Review" - -POST_TREATMENT_REVIEW_SCREEN_PARAMETERS = ["Patient ID", "Heparin Stop", - "Device ID", "Heparin Delivered Volume", - "Blood Flow Rate", "Treatment Start DateTime", - "Dialysate Flow Rate", "Treatment End DateTime", - "Treatment Duration", "Water Sample Test Result", - "Actual Treatment Duration", "Dialysate Volume Used", - "Acid ConcentrateType", "Prescribed UF Volume", - "Bicarbonate Concentrate Type", "Target UF Volume", - "Potassium Concentration", "Actual UF Volume", - "Calcium Concentration", "Prescribed UF Rate", - "Bicarbonate Concentration", "Target UF Rate", - "Sodium Concentration", "Actual UF Rate", - "Dialysate Temperature", "Saline Bolus Volume", - "Dialyzer Type", "Average Blood Flow", - "Heparin Type", "Average Dialysate Flow", - "Heparin Concentration", "Average Dialysate Temp", - "Heparin Bolus Volume", "Average Arterial Pressure", - "Heparin Dispense Rate", "Average Venous Pressure"] - - POST_TREATMENT_REVIEW_SCREEN_UNITS = { "Patient ID" : "", + "Heparin Stop" : "min", "Device ID" : "", + "Heparin Delivered Volume": "mL", "Blood Flow Rate" : "mL/min", + "Treatment Start DateTime" : "", "Dialysate Flow Rate" : "mL/min", + "Treatment End DateTime" : "", "Treatment Duration" : "min", + "Water Sample Test Result": "", "Actual Treatment Duration":"min", + "Dialysate Volume Used" : "L", "Acid ConcentrateType" : "", + "Prescribed UF Volume" : "L", "Bicarbonate Concentrate Type" : "", - "Heparin Stop" : "min", - "Heparin Bolus Volume": "mL", - "Heparin Delivered Volume": "mL", - "Treatment Start DateTime" : "", - "Treatment End DateTime" : "", - "Water Sample Test Result": "", - "Dialysate Volume Used" : "L", - "Prescribed UF Volume" : "L", - "Target UF Volume" : "L", - "Potassium Concentration" : "mEg/L", - "Calcium Concentration" :"mEg/L", + "Target UF Volume" : "L", + "Potassium Concentration" : "mEg/L", + "Actual UF Volume" : "L", + "Calcium Concentration" :"mEg/L", + "Prescribed UF Rate" : "mL/min", "Bicarbonate Concentration" : "mEg/L", + "Target UF Rate": "mL/min", "Sodium Concentration" : "mEg/L", - "Average Blood Flow" : "mL/min", - "Saline Bolus Volume" : "mL", - "Average Dialysate Flow" : "mL/min", - "Average Arterial Pressure" : "mmHg", - "Average Venous Pressure" : "mmHg", + "Actual UF Rate": "mL/min", "Dialysate Temperature" :"°C", + "Saline Bolus Volume" : "mL", "Dialyzer Type" : "", + "Average Blood Flow" : "mL/min", "Heparin Type" : "IU/mL", + "Average Dialysate Flow" : "mL/min", "Heparin Concentration" : "IU/mL", - "Actual UF Volume" : "L", - "Prescribed UF Rate" : "mL/min", - "Target UF Rate": "mL/min", - "Actual UF Rate": "mL/min", + "Average Dialysate Temp" : "°C", + "Heparin Bolus Volume": "mL", + "Average Arterial Pressure" : "mmHg", "Heparin Dispense Rate" : "mL/hr", - "Average Dialysate Flow" : "mL/min", - "Average Dialysate Temp" : "°C", - + "Average Venous Pressure" : "mmHg", } Index: shared/scripts/names.py =================================================================== diff -u -rd6518e26df89b43f269338a95d45b708cc37ec3a -r8977e6f10ea8a1b5807f963a1b98dc11ea2d181f --- shared/scripts/names.py (.../names.py) (revision d6518e26df89b43f269338a95d45b708cc37ec3a) +++ shared/scripts/names.py (.../names.py) (revision 8977e6f10ea8a1b5807f963a1b98dc11ea2d181f) @@ -107,4 +107,3 @@ - Index: tst_post_treatment/test.py =================================================================== diff -u -ref979c18b1d91ee061bf9102ac8deb44f178b0cc -r8977e6f10ea8a1b5807f963a1b98dc11ea2d181f --- tst_post_treatment/test.py (.../test.py) (revision ef979c18b1d91ee061bf9102ac8deb44f178b0cc) +++ tst_post_treatment/test.py (.../test.py) (revision 8977e6f10ea8a1b5807f963a1b98dc11ea2d181f) @@ -24,7 +24,6 @@ from configuration import utility from dialin.common.hd_defs import HDOpModes, HDOpSubModes, PostTreatmentStates - hd_simulator = HDSimulator() NUM_OF_POSTTREATMENT_BULLETS = len(config.POST_TREATMENT_SCREENS) @@ -40,14 +39,7 @@ rightarrow_obj_names = [names.o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase] leftarrow_obj_names = [names.o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase] -contents = [] -parameter_names = [] -parameter_values = [] -parameter_units = [] -title_list = [] - - def get_rightarrow_obj(screen_obj): """ To obtain object for right arrow based on container @@ -57,17 +49,18 @@ names.o_right_arrow["container"] = screen_obj return names.o_right_arrow - + def navigation_to_post_treatment(): """ Method for navigating to post treatment disconnection submode. """ hd_simulator.cmd_send_hd_operation_mode(op_mode = HDOpModes.MODE_POST.value, sub_mode=PostTreatmentStates.HD_POST_TREATMENT_PATIENT_DISCONNECTION_STATE.value) if object.exists(get_rightarrow_obj(rightarrow_obj_names[0])): mouseClick(waitForObject(get_rightarrow_obj(rightarrow_obj_names[0]))) - if object.exists(get_rightarrow_obj(rightarrow_obj_names[0])): + elif object.exists(get_rightarrow_obj(rightarrow_obj_names[0])): mouseClick(waitForObject(get_rightarrow_obj(rightarrow_obj_names[0]))) - + + def post_treatment_review_text_obj(text): """ Method to set object property as dynamic. @@ -197,35 +190,31 @@ test.compare(str(waitForObjectExists(names.o_patient_disconnection_confirm_button).text), config.PATIENT_DISCONNECTION_CONFIRM_BUTTON_TEXT,"Confirm button text must be {}".format(config.PATIENT_DISCONNECTION_CONFIRM_BUTTON_TEXT)) test.verify(waitForObjectExists(names.o_patient_disconnection_confirm_button).enabled, "Confirm button must be enabled") mouseClick(waitForObject(names.o_patient_disconnection_confirm_button)) - utility.verify_page_step_indicator_post_treatment(SCREEN_OBJ2,1) - test.compare(waitForObject(names.o_treatment_review_next_text).text, config.NEXT_TEXT, "NEXT button text must be NEXT") - test.verify(waitForObject(names.o_treatment_review_next_button).enabled, "NEXT button must be enabled") - mouseClick(waitForObject(names.o_treatment_review_next_button)) test.endSection() + - -def navigate_treatment_review_screen(): +def verify_treatment_review_screen(): """ - Method to navigate to review treatment screen and verify page step indicator + Method to verify parameters under 'Treatment Review Screens' """ - - test.startSection("navigating and verifying page step indicator under Review screen") - test.verify(waitForObjectExists(names.o_disposables_removal_backButton).enabled, " Back button must be active") + test.startSection("Verifying Treatment Review Screen") + utility.verify_page_step_indicator_post_treatment(SCREEN_OBJ2,1) + test.compare(waitForObject(names.o_treatment_review_next_text).text, config.NEXT_TEXT, "NEXT button text must be NEXT") test.verify(not waitForObjectExists(names.o_treatmentReviewConfirm_Export_Text).enabled, " Export button should not be active") test.compare(str(waitForObjectExists(names.o_treatmentReviewConfirm_Export_Text).text), config.EXPORT_TEXT,"Export button text must be {}".format(config.EXPORT_TEXT)) - mouseClick(waitForObject(names.o_disposables_removal_backButton)) - test.verify(waitForObjectExists(names.o_treatment_review_next_button).enabled, " Next button must be active") + verify_post_treatment_review_parameters() + verify_post_treatment_review_log_data() + test.verify(waitForObject(names.o_treatment_review_next_button).enabled, "NEXT button must be enabled") mouseClick(waitForObject(names.o_treatment_review_next_button)) - utility.verify_page_step_indicator_post_treatment(SCREEN_OBJ3, DISPOSABLES_STEP) test.endSection() - + def verify_disposables_screen(): """ Method to verify parameters under 'Disposables screens' """ - navigate_treatment_review_screen() test.startSection("verification of Disposable Screen") + utility.verify_page_step_indicator_post_treatment(SCREEN_OBJ3, DISPOSABLES_STEP) names.o_bullet_object.pop("occurrence") verify_right_instruction_navigation_disposables(NUM_OF_DISPOSABLE_INSTALLATION_SCREENS) test.verify(waitForObjectExists(names.o_disposables_removal_confirm_button).enabled, " confirm button must be active") @@ -241,26 +230,19 @@ """ Method to verify post treatment review parameters and unit by default. """ - test.startSection("verification of post treatment review parameters") - mouseClick(waitForObject(names.o_disposables_removal_backButton)) + test.startSection("verification of post treatment review parameters with Units") treatment_review_text = waitForObjectExists(post_treatment_review_text_obj(config.TREATMENT_REVIEW_TITLE_TEXT)) test.compare(treatment_review_text.text, config.TREATMENT_REVIEW_TITLE_TEXT, "{} screen is displayed".format(config.TREATMENT_REVIEW_TITLE_TEXT)) utils.waitForGUI(0.1) - for parameter in config.POST_TREATMENT_REVIEW_SCREEN_PARAMETERS: + for parameter in config.POST_TREATMENT_REVIEW_SCREEN_UNITS.keys(): utility.scroll_to_zone(review_text(parameter), names.o_review_area) parameter_text = waitForObjectExists(review_text(parameter)) test.log("verification of parameter -> " + str(parameter)) test.compare(parameter_text.text, parameter, "{} should be available under 'Treatment Review' screen".format(parameter)) - test.endSection() - - utility.scroll_to_zone(review_text(parameter), names.o_review_area, direction = "Top") - test.startSection("verification of post treatment review units") - - for parameter in config.POST_TREATMENT_REVIEW_SCREEN_PARAMETERS: unit = config.POST_TREATMENT_REVIEW_SCREEN_UNITS[parameter] unit_text = waitForObjectExists(review_text(unit)) test.log("verification of unit for data -> " + str(parameter)) - test.compare(unit_text.text, unit, "{} should be available under 'Treatment Review' screen".format(unit)) + test.compare(unit_text.text, unit, "{} should be available under 'Treatment Review' screen".format(unit)) test.endSection() @@ -278,8 +260,8 @@ def verify_post_treatment_review_log_data(): """ - Method to verify all the log values on review submode of post treatment - Here we are verifying 5 set of values to the review section based in edge condition. This section coveres log verification. + Method to verify all the log values on review submode of post treatment + Here we are verifying 5 set of values to the review section based in edge condition. This section coveres log verification. """ test.startSection("Method to check all the values of parameters in review screen") @@ -327,8 +309,7 @@ average_arterial_pressure = config.POST_TREATMENT_REVIEW_PARAMETER_RANGE["Average Arterial Pressure"][index], average_venous_pressure = config.POST_TREATMENT_REVIEW_PARAMETER_RANGE["Average Venous Pressure"][index] ) - - utils.waitForGUI(1) #adding delay for fetching effect. + utils.waitForGUI(1) test.startSection("verification of post treatment review values for iteration -> "+str(index+1)) test.log("###verification of post treatment UI data") @@ -395,7 +376,6 @@ test.log("###verification of values for parameter - >" + parameters_value + " from UI screen") parameter_set[index] = parameter_to_scroll test.compare(str(parameter_set[index]), str(parameter_text.text), "parameter value should be "+str(parameter_set[index])) - test.log("verification of post treatment log file data") parameter_value, parameter_unit = utility.verify_parameter_from_post_treatment_log(parameters_value) @@ -412,14 +392,12 @@ utils.tstStart(__file__) startApplication(config.AUT_NAME) - - #navigate to post treatment screens hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_POST.value, sub_mode=PostTreatmentStates.HD_POST_TREATMENT_PATIENT_DISCONNECTION_STATE.value) - verify_patient_disconnection_screens() + verify_treatment_review_screen() verify_disposables_screen() - verify_post_treatment_review_parameters() - verify_post_treatment_review_log_data() utils.tstDone() + +