Index: tst_post_treatment/test.py =================================================================== diff -u -r262a6e86e0b93d26294acc0ad7ddefbf448d1e9a -r65cfe31dba0ad2b97090fdacb83181ea235f319f --- tst_post_treatment/test.py (.../test.py) (revision 262a6e86e0b93d26294acc0ad7ddefbf448d1e9a) +++ tst_post_treatment/test.py (.../test.py) (revision 65cfe31dba0ad2b97090fdacb83181ea235f319f) @@ -11,7 +11,7 @@ # date 2022/05/20 # author Joseph Varghese # author Akshay Dhawan -# author Shweta POlicepatil +# author Shweta Policepatil # author Amol Shinde # NOTE: # This test contradicts verification of post treatment section. @@ -202,9 +202,12 @@ SCREEN_OBJ2 = names.o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview REVIEW_TREATMENT_STEP = 1 utility.verify_page_step_indicator(SCREEN_OBJ2, REVIEW_TREATMENT_STEP, config.POST_TREATMENT_SCREENS) - test.compare(waitForObject(names.o_treatment_review_next_text).text, config.NEXT_TEXT, "NEXT button text must be NEXT") - test.verify(waitForObjectExists(names.o_treatmentReviewConfirm_Export_Text).enabled, " Export button should not be active") + test.verify(waitForObjectExists(names.o_treatmentReviewConfirm_Export_Text).enabled, " Export button should be enabled") test.compare(str(waitForObjectExists(names.o_treatmentReviewConfirm_Export_Text).text), config.EXPORT_TEXT,"Export button text must be {}".format(config.EXPORT_TEXT)) + test.verify(waitForObjectExists(names.o_treatmentReviewConfirm_Export_Text).enabled, " Export button should be enabled") + test.verify(waitForObject(names.o_eject_button).enabled, "Eject button must be enable") + mouseClick(waitForObject(names.o_eject_button)) + test.verify(not waitForObjectExists(names.o_treatmentReviewConfirm_Export_Text).enabled, " Export button should be disabled") 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") @@ -224,7 +227,7 @@ DISPOSABLES_STEP = 2 utility.verify_page_step_indicator(SCREEN_OBJ3, DISPOSABLES_STEP, config.POST_TREATMENT_SCREENS) names.o_bullet_object.pop("occurrence") - NUM_OF_DISPOSABLE_INSTALLATION_SCREENS = 7 + NUM_OF_DISPOSABLE_INSTALLATION_SCREENS = 6 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") verify_left_instruction_navigation_disposables(NUM_OF_DISPOSABLE_INSTALLATION_SCREENS) @@ -242,6 +245,7 @@ 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)) + test.compare(str(waitForObjectExists(names.o_code_text).text), config.CODE_TEXT, "Code text must be {}".format(config.CODE_TEXT)) utils.waitForGUI(0.1) for parameter in config.POST_TREATMENT_REVIEW_SCREEN_UNITS.keys(): utility.scroll_to_zone(review_text(parameter), names.o_review_area) @@ -303,7 +307,7 @@ treatment_end_date_time = config.POST_TREATMENT_REVIEW_PARAMETER_RANGE["Treatment End DateTime"][index], actual_treatment_duration = config.POST_TREATMENT_REVIEW_PARAMETER_RANGE["Actual Treatment Duration"][index], dialysate_volume_used = config.POST_TREATMENT_REVIEW_PARAMETER_RANGE["Dialysate Volume Used"][index], - origin_uf_volume = config.POST_TREATMENT_REVIEW_PARAMETER_RANGE["Actual UF Volume"][index], + origin_uf_volume = config.POST_TREATMENT_REVIEW_PARAMETER_RANGE["Prescribed UF Volume"][index], target_uf_volume = config.POST_TREATMENT_REVIEW_PARAMETER_RANGE["Target UF Volume"][index], actual_uf_volume = config.POST_TREATMENT_REVIEW_PARAMETER_RANGE["Actual UF Volume"][index], saline_bolus_volume = config.POST_TREATMENT_REVIEW_PARAMETER_RANGE["Saline Bolus Volume"][index], @@ -319,14 +323,34 @@ average_venous_pressure = config.POST_TREATMENT_REVIEW_PARAMETER_RANGE["Average Venous Pressure"][index] ) utils.waitForGUI(1) - + test.compare(str(waitForObjectExists(names.o_code_text_after_passing_log_values).text), config.CODE_TEXT_AFTER_LOGGING, "Code text must be {}".format(config.CODE_TEXT_AFTER_LOGGING)) + test.startSection("verification of post treatment review values for iteration -> "+str(index+1)) test.log("###verification of post treatment UI data based on config data") + for parameters_value in config.POST_TREATMENT_REVIEW_PARAMETER_RANGE.keys(): parameter_set = config.POST_TREATMENT_REVIEW_PARAMETER_RANGE[parameters_value] + #TODO: Following six parameters are not available on UI but API command is requiring this argument for logging. + if parameters_value == "Device ID": + continue + + elif parameters_value == "Average Blood Flow": + continue - if parameters_value == "Prescribed UF Rate": - review_parameter_value = review_text(text = "Average Venous Pressure") + elif parameters_value == "Average Dialysate Flow": + continue + + elif parameters_value == "Average Dialysate Temp": + continue + + elif parameters_value == "Average Arterial Pressure": + continue + + elif parameters_value == "Average Venous Pressure": + continue + + elif parameters_value == "Prescribed UF Rate": + review_parameter_value = review_text(text = "Prescribed UF Rate") utility.scroll_to_zone(zone = review_parameter_value, screen_object = names.o_review_area) elif parameters_value == "Heparin Type": @@ -437,7 +461,7 @@ def main(): - #TODO: Export functionality need to be verified in new build + utils.tstStart(__file__) startApplication(config.AUT_NAME) hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_POST.value, sub_mode=PostTreatmentStates.HD_POST_TREATMENT_PATIENT_DISCONNECTION_STATE.value)