Index: shared/scripts/configuration/config.py =================================================================== diff -u -r5c9825f73e3d8daf6070b64d2c54cf8da61cbef4 -rc1870f6c47b476330fe930d81bf0a13cab62a86f --- shared/scripts/configuration/config.py (.../config.py) (revision 5c9825f73e3d8daf6070b64d2c54cf8da61cbef4) +++ shared/scripts/configuration/config.py (.../config.py) (revision c1870f6c47b476330fe930d81bf0a13cab62a86f) @@ -1537,6 +1537,7 @@ SALINE_UNIT = "mL" BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" + #Pre-Treatment Disposables NEXT_BUTTON_TEXT = "NEXT" BACK_BUTTON_TEXT = "BACK" @@ -1546,6 +1547,7 @@ #Filter Flush + #Pre_treatment_water_sample SAMPLE_TEXT = "Sample" CREATE_TEXT = "Create" @@ -1649,85 +1651,14 @@ CONFIRM_TEXT = "CONFIRM" DISPOSABLES_REMOVAL_TEXT = "Disposables Removal" INCOMPLETE_COLOR_POST_TREATMENT = '#fcfcfc' -CURRENT_COLOR = '#000000' -COMPLETE_COLOR= '#4290ec' -ENABLED_COLOR = '#fcfcfc' -INCOMPLETE_COLOR = '#607a91' -POST_TREATMENT_SCREENS = ["Disconnection", "Review", "Disposables", "Disinfection"] - #post treatment review -HEPARIN_TYPE = "UFH 1,000 IU/mL" -ACID_CONCENTRATE = ["Fres. Naturalyte", "08-1251-1", "08-2251-0", "08-3251-9", "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"] TREATMENT_LOG_LOCATION = '/home/denali/Desktop/sd-card/treatment/*.log' -TREATMENT_REVIEW_TITLE_TEXT = "Treatment Review" VISIBLE = True +ACID_CONCENTRATE_POST = ["Fres. Naturalyte", "08-1251-1", "08-2251-0", "08-3251-9", "08-3251-9"] -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" : "", - "Device ID" : "", - "Blood Flow Rate" : "mL/min", - "Dialysate Flow Rate" : "mL/min", - "Treatment Duration" : "min", - "Actual Treatment Duration":"min", - "Acid ConcentrateType" : "", - "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", - "Bicarbonate Concentration" : "mEg/L", - "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", - "Dialysate Temperature" :"°C", - "Dialyzer Type" : "", - "Heparin Type" : "IU/mL", - "Heparin Concentration" : "IU/mL", - "Actual UF Volume" : "L", - "Prescribed UF Rate" : "mL/min", - "Target UF Rate": "mL/min", - "Actual UF Rate": "mL/min", - "Heparin Dispense Rate" : "mL/hr", - "Average Dialysate Flow" : "mL/min", - "Average Dialysate Temp" : "°C", - - } - - #dictionary consist of review parameters values of post treatment POST_TREATMENT_REVIEW_PARAMETER_RANGE = { "Patient ID": ["abcd", "xyz", "qwerty", "dghjf", "cdtys"], @@ -1768,3 +1699,4 @@ } + Index: shared/scripts/configuration/strings.py =================================================================== diff -u -r44765c1ac1f4bd2fe890a30449bf72a746d7577c -rc1870f6c47b476330fe930d81bf0a13cab62a86f --- shared/scripts/configuration/strings.py (.../strings.py) (revision 44765c1ac1f4bd2fe890a30449bf72a746d7577c) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision c1870f6c47b476330fe930d81bf0a13cab62a86f) @@ -8,12 +8,11 @@ # # @file strings.py # -# @author (last) LTTS +# @author (last) Joseph varghese # @date (last) 18-Jan-2022 # ############################################################################ - #standby mode BLOOD_PRIMING_TEXT = "Blood Priming" SALINE_UNIT = "mL" @@ -241,3 +240,64 @@ PRIMING_STEPS = ["Blood Circuit Priming", "Dialysate Circuit Priming", "Wet Self Tests"] SELF_TEST_COMPLETION_MSG = "Self Test Complete!" PRIMING_COMPLETE_MSG = "Priming Complete!" + +#post-treatment + +PATIENT_DISCONNECTION_TEXT = "Patient Disconnection" +REVIEW_TEXT = "Review" +EXPORT_TEXT = "Export" +PATIENT_DISCONNECTION_CONFIRM_BUTTON_TEXT = "CONFIRM" +DISPOSABLE_TEXT = "Disposables" +NEXT_TEXT = "NEXT" +BACK_TEXT = "BACK" +CONFIRM_TEXT = "CONFIRM" +DISPOSABLES_REMOVAL_TEXT = "Disposables Removal" +POST_TREATMENT_SCREENS = ["Disconnection", "Review", "Disposables", "Disinfection"] + +#post treatment review +HEPARIN_TYPE = "UFH 1,000 IU/mL" +ACID_CONCENTRATE = ["Fres. Naturalyte", "08-1251-1", "08-2251-0", "08-3251-9", "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"] + +TREATMENT_REVIEW_TITLE_TEXT = "Treatment Review" + +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" : "", + "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", + "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", + "Average Dialysate Temp" : "°C", + "Heparin Bolus Volume": "mL", + "Average Arterial Pressure" : "mmHg", + "Heparin Dispense Rate" : "mL/hr", + "Average Venous Pressure" : "mmHg", + } + Index: tst_post_treatment/test.py =================================================================== diff -u -rd6518e26df89b43f269338a95d45b708cc37ec3a -rc1870f6c47b476330fe930d81bf0a13cab62a86f --- tst_post_treatment/test.py (.../test.py) (revision d6518e26df89b43f269338a95d45b708cc37ec3a) +++ tst_post_treatment/test.py (.../test.py) (revision c1870f6c47b476330fe930d81bf0a13cab62a86f) @@ -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,28 +49,18 @@ names.o_right_arrow["container"] = screen_obj return names.o_right_arrow - -def get_leftarrow_obj(screen_obj): - """ - To obtain object for right arrow based on container - @param (str) screen_obj: provides the container - @returns a real name object - """ - names.o_left_arrow["container"] = screen_obj - return names.o_left_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. @@ -208,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") @@ -252,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() @@ -289,16 +260,15 @@ 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") for index in range (5): getting_patient_id_from_create_custom_treatment(config.POST_TREATMENT_REVIEW_PARAMETER_RANGE["Patient ID"][index]) navigation_to_post_treatment() - mouseClick(waitForObject(names.o_patientDisconnectionConfirm_Button)) review_parameter_value = review_text(text = "Patient ID") utility.scroll_to_zone(review_parameter_value, names.o_review_area, direction = "Top") @@ -339,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(2) #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") @@ -352,35 +321,35 @@ review_parameter_value = review_text(text = "Average Venous Pressure") utility.scroll_to_zone(zone = review_parameter_value, screen_object = names.o_review_area) - if parameters_value == "Heparin Type": + elif parameters_value == "Heparin Type": review_parameter_value = review_text(text = config.HEPARIN_TYPE) parameter_text = waitForObject(review_parameter_value) test.log("verification of values for parameter ->" + parameters_value) test.compare(config.HEPARIN_TYPE, parameter_text.text, "parameter value should be "+str(parameter_set[index])) continue - if parameters_value == "Bicarbonate Concentrate Type": + elif parameters_value == "Bicarbonate Concentrate Type": review_parameter_value = review_text(text = config.BICARBONATE_CONCENTRATE) parameter_text = waitForObject(review_parameter_value) test.log("verification of values for parameter ->" + parameters_value) test.compare(config.BICARBONATE_CONCENTRATE, parameter_text.text, "parameter value should be "+str(parameter_set[index])) continue - if parameters_value == "Acid ConcentrateType": - review_parameter_value = review_text(text = config.ACID_CONCENTRATE[index]) + elif parameters_value == "Acid ConcentrateType": + review_parameter_value = review_text(text = config.ACID_CONCENTRATE_POST[index]) parameter_text = waitForObject(review_parameter_value) test.log("verification of values for parameter ->" + parameters_value) - test.compare(config.ACID_CONCENTRATE[index], parameter_text.text, "parameter value should be "+str(parameter_set[index])) + test.compare(config.ACID_CONCENTRATE_POST[index], parameter_text.text, "parameter value should be "+str(parameter_set[index])) continue - if parameters_value == "Dialyzer Type": + elif parameters_value == "Dialyzer Type": review_parameter_value = review_text(text = config.DIALYZER_TYPE[index]) parameter_text = waitForObject(review_parameter_value) test.log("verification of values for parameter ->" + parameters_value) test.compare(config.DIALYZER_TYPE[index], parameter_text.text, "parameter value should be "+str(parameter_set[index])) continue - if parameters_value == 'Water Sample Test Result': + elif parameters_value == 'Water Sample Test Result': test.log("verification of values for parameter ->" + parameters_value) review_parameter_value = review_text(text = str(parameter_set[index])) parameter_text = waitForObjectExists(review_parameter_value) @@ -407,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) @@ -424,17 +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() - - navigation_to_post_treatment() - verify_post_treatment_review_parameters() - verify_post_treatment_review_log_data() - utils.tstDone() + +