Index: suite_leahi/tst_main_treatment/test.py =================================================================== diff -u -r2d57ccb6d19e9fda0a30ee78e25a4aea0414ff97 -rc179ffdcc150165eeeda0749891b99b5b19fc6b8 --- suite_leahi/tst_main_treatment/test.py (.../test.py) (revision 2d57ccb6d19e9fda0a30ee78e25a4aea0414ff97) +++ suite_leahi/tst_main_treatment/test.py (.../test.py) (revision c179ffdcc150165eeeda0749891b99b5b19fc6b8) @@ -10,8 +10,8 @@ ART_HIGH_VAL_220 = 220 VENOUS_LOW_VAL_MINUS_90 = -90 VENOUS_HIGH_VAL_410 = 410 -TEMP_LOW_VAL_MINUS_640 = -640 -TEMP_HIGH_VAL_210 = 210 +TMP_LOW_VAL_MINUS_640 = -640 +TMP_HIGH_VAL_210 = 210 REJECTED = 1 ACCEPTED = 0 @@ -27,8 +27,7 @@ td = TD_Messaging() dd = DD_Messaging() - -def verify_arterial_and_venous_value_in_main_treatment_screen(accepted, art_low, art_high, ven_low, ven_high,temp_low,temp_high): +def verify_arterial_and_venous_value_in_main_treatment_screen(accepted, art_low, art_high, ven_low, ven_high,tmp_low,tmp_high): """ Method to verify Arterial low and high and Venous low and high value on @@ -43,15 +42,15 @@ """ test.startSection("Verifying Arterial low and high and Venous low and high value on main treatment screen") if accepted == ACCEPTED: - arterial_rangeBar = utility.get_object_from_names(names.arterial_RangeBar, error_message="arterial rangeBar object is missing") - arterial_low = arterial_rangeBar.lowerBound - arterial_high = arterial_rangeBar.upperBound - venous_rangeBar = utility.get_object_from_names(names.venous_RangeBar, error_message="venous rangeBar object is missing") - venous_low = venous_rangeBar.lowerBound - venous_high = venous_rangeBar.upperBound - temp_rangeBar = utility.get_object_from_names(names.tmp_RangeBar, error_message="temperature rangeBar object is missing") - temperature_low = temp_rangeBar.lowerBound - temperature_high = temp_rangeBar.upperBound + arterial_rangeBar = utility.get_object_from_names(names.arterial_RangeBar, error_message="arterial rangeBar object is missing") + arterial_low = arterial_rangeBar.lowerBound + arterial_high = arterial_rangeBar.upperBound + venous_rangeBar = utility.get_object_from_names(names.venous_RangeBar, error_message="venous rangeBar object is missing") + venous_low = venous_rangeBar.lowerBound + venous_high = venous_rangeBar.upperBound + tmp_RangeBar = utility.get_object_from_names(names.tmp_RangeBar, error_message="trancememberance rangeBar object is missing") + trancememberance_low = tmp_RangeBar.lowerBound + trancememberance_high = tmp_RangeBar.upperBound test.compare(arterial_low, art_low, "Arterial low value should be '{}'".format(art_low)) @@ -64,11 +63,11 @@ test.compare(venous_high, ven_high, "Venous high value should not be '{}'".format(ven_high)) - test.compare(temperature_low, temp_low, - "temperature low value should be '{}'".format(temp_low)) + test.compare(trancememberance_low, tmp_low, + "Trancememberance low value should be '{}'".format(tmp_low)) - test.compare(temperature_high, temp_high, - "temperature high value should not be '{}'".format(temp_high)) + test.compare(trancememberance_high, tmp_high, + "Trancememberance high value should not be '{}'".format(tmp_high)) else: if object.exists(pressure_text_obj(art_low)): test.fail("Arterial value {} should not exists".format(art_low)) @@ -78,10 +77,10 @@ test.fail("Venous value {} should not exists".format(ven_low)) if object.exists(pressure_text_obj(ven_high)): test.fail("Venous value {} should not exists".format(ven_high)) - if object.exists(pressure_text_obj(temp_low)): - test.fail("Temperature value {} should not exists".format(temp_low)) - if object.exists(pressure_text_obj(temp_high)): - test.fail("Temperature value {} should not exists".format(temp_high)) + if object.exists(pressure_text_obj(tmp_low)): + test.fail("Trancememberance value {} should not exists".format(tmp_low)) + if object.exists(pressure_text_obj(tmp_high)): + test.fail("Trancememberance value {} should not exists".format(tmp_high)) test.endSection() def test_pressure_displayed_in_treatment_screen_range_bar(): @@ -109,9 +108,9 @@ target_arterial_max_limit = TREATMENT_PRESSURE_ADJUSTMENT_TD_TEST_VALUES[index]["arterial_limit_high"] target_venous_min_limit = TREATMENT_PRESSURE_ADJUSTMENT_TD_TEST_VALUES[index]["venous_limit_low"] target_venous_max_limit = TREATMENT_PRESSURE_ADJUSTMENT_TD_TEST_VALUES[index]["venous_limit_high"] - target_temp_pressure = TREATMENT_PRESSURE_ADJUSTMENT_TD_TEST_VALUES[index]["tmp_pressure"] - target_temp_min_limit = TREATMENT_PRESSURE_ADJUSTMENT_TD_TEST_VALUES[index]["tmp_limit_low"] - target_temp_max_limit = TREATMENT_PRESSURE_ADJUSTMENT_TD_TEST_VALUES[index]["tmp_limit_high"] + target_tmp_pressure = TREATMENT_PRESSURE_ADJUSTMENT_TD_TEST_VALUES[index]["tmp_pressure"] + target_tmp_min_limit = TREATMENT_PRESSURE_ADJUSTMENT_TD_TEST_VALUES[index]["tmp_limit_low"] + target_tmp_max_limit = TREATMENT_PRESSURE_ADJUSTMENT_TD_TEST_VALUES[index]["tmp_limit_high"] td.td_pressure( H2_arterial_pressure = target_arterial_pressure, H14_venous_pressure = target_venous_pressure, @@ -122,9 +121,9 @@ H14_venous_max = target_venous_max_limit, H2_arterial_long = 0 , H14_venous_long = 0 , - tmp_pressure = target_temp_pressure, - tmp_min = target_temp_min_limit, - tmp_max = target_temp_max_limit) + tmp_pressure = target_tmp_pressure, + tmp_min = target_tmp_min_limit, + tmp_max = target_tmp_max_limit) # check the range bar's upper and lower bounds arterial_rangeBar = utility.get_object_from_names(names.arterial_RangeBar, error_message="arterial rangeBar object is missing",timeout_ms=1000) @@ -153,19 +152,18 @@ test.compare(float(actual_text), float(expected_text), "Expecting venous pressure to be displayed") # check the range bar's upper and lower bounds - temp_rangeBar = utility.get_object_from_names(names.tmp_RangeBar, error_message="Temperature rangeBar object is missing",timeout_ms=1000) - if temp_rangeBar is not None: - test.compare(temp_rangeBar.lowerBound, target_temp_min_limit, "Checking lower bound of temperature pressure range bar") - test.compare(temp_rangeBar.upperBound, target_temp_max_limit, "Checking upper bound of temperature pressure range bar") + tmp_rangeBar = utility.get_object_from_names(names.tmp_RangeBar, error_message="Trancememberance rangeBar object is missing",timeout_ms=1000) + if tmp_rangeBar is not None: + test.compare(tmp_rangeBar.lowerBound, target_tmp_min_limit, "Checking lower bound of trancememberance pressure range bar") + test.compare(tmp_rangeBar.upperBound, target_tmp_max_limit, "Checking upper bound of trancememberance pressure range bar") - #check the marker value for the tempreature pressure - temp_rangeBar_marker_text_object = utility.get_object_from_names(names.pressure_tmp_marker_text, error_message="temperature pressure marker label object is missing",timeout_ms=1000) - if temp_rangeBar_marker_text_object is not None: - actual_text = str(temp_rangeBar_marker_text_object.value).strip() - expected_text = str(target_temp_pressure).strip() - test.compare(float(actual_text), float(expected_text), "Expecting temperature pressure to be displayed") + #check the marker value for the trancememberance pressure + tmp_rangeBar_marker_text_object = utility.get_object_from_names(names.pressure_tmp_marker_text, error_message="Trancememberance pressure marker label object is missing",timeout_ms=1000) + if tmp_rangeBar_marker_text_object is not None: + actual_text = str(tmp_rangeBar_marker_text_object.value).strip() + expected_text = str(target_tmp_pressure).strip() + test.compare(float(actual_text), float(expected_text), "Expecting trancememberance pressure to be displayed") - utils.waitForGUI(1) test.endSection() #UltraFiltration state @@ -186,7 +184,6 @@ """ td.td_ultrafiltration(uf_volume,uf_rate,vol_delivered,0) - test.compare(waitForObjectExists(names.UF_Volume_LabelValue).bottomText, "{:.2f}".format(float(uf_volume)), "UF Volume value should be :" + str(uf_volume)) test.compare(waitForObjectExists(names.UF_Rate_LabelValue).bottomText, "{:.2f}".format(float(uf_rate)), "UF Rate value should be :" + str(uf_rate)) test.compare(waitForObjectExists(names.Volume_Delivered).text, "{:.2f}".format(float(vol_delivered)) +" L", "Volume delivered value should be :" + str(vol_delivered)) @@ -199,9 +196,7 @@ @param vTotal: (int) Total time in seconds """ for count in range(0,vTotal+1): - td.td_treatment_time(vTotal, count, vTotal - count) - utils.waitForGUI(0.5) test.compare(waitForObjectExists(names.treatment_duration).progressValue, count, "progress value should be {}".format(count)) test.compare(waitForObjectExists(names.treatment_duration).timeTextValue, vTotal - count, "Expected Time on UI should be in seconds {}".format(vTotal - count)) @@ -225,33 +220,32 @@ #TX Parameter set points def verify_setPoints_from_main_treatement(): TREATMENT_PARAMETER_SETPOINTS_TD_TEST_VALUES = [ - {"blood flow": 56, "dial flow": 22, "dial temp": 20.0, "dial cond": 34.0 }, - {"blood flow": 99, "dial flow": 78, "dial temp": 87.0, "dial cond": 55.0 }, - {"blood flow": 34, "dial flow": 99, "dial temp": 99.0, "dial cond": 99.0 }, - {"blood flow": 100, "dial flow": 100,"dial temp": 100.0,"dial cond": 100.0}, - {"blood flow": 110, "dial flow": 110,"dial temp": 110.0,"dial cond": 110.0} + {"blood flow": 56, "dial flow": 22, "dial tmp": 20.0, "dial cond": 34.0 }, + {"blood flow": 99, "dial flow": 78, "dial tmp": 87.0, "dial cond": 55.0 }, + {"blood flow": 34, "dial flow": 99, "dial tmp": 99.0, "dial cond": 99.0 }, + {"blood flow": 100, "dial flow": 100,"dial tmp": 100.0,"dial cond": 100.0}, + {"blood flow": 110, "dial flow": 110,"dial tmp": 110.0,"dial cond": 110.0} ] #Verify the title values in the set points test.compare(waitForObjectExists(names.Treatment_Parameters_Text).text, "Treatment Parameters", "Treatement Parameters text verified") test.compare(waitForObjectExists(names.blood_flow_title_Text).text, "Blood Flow", "Blood flow text verified" ) test.compare(waitForObjectExists(names.dialyste_flow_title_Text).text, "Dialysate Flow", "Dialysate Flow text verified" ) - test.compare(waitForObjectExists(names.dialyste_tmp_title_Text).text, "Dialysate Temp.", "Dialysate temp text verified" ) + test.compare(waitForObjectExists(names.dialyste_tmp_title_Text).text, "Dialysate Temp.", "Dialysate trancememberance text verified" ) test.compare(waitForObjectExists(names.dialyste_cond_title_Text).text, "Dialysate Cond.", "Dialysate cond text verified" ) for index in range(0, len(TREATMENT_PARAMETER_SETPOINTS_TD_TEST_VALUES), 1): test.startSection("Checking the value of the set points".format(index)) target_blood_flow = TREATMENT_PARAMETER_SETPOINTS_TD_TEST_VALUES[index]["blood flow"] target_dial_flow = TREATMENT_PARAMETER_SETPOINTS_TD_TEST_VALUES[index]["dial flow"] - target_dial_temp = TREATMENT_PARAMETER_SETPOINTS_TD_TEST_VALUES[index]["dial temp"] + target_dial_tmp = TREATMENT_PARAMETER_SETPOINTS_TD_TEST_VALUES[index]["dial tmp"] target_dial_cond = TREATMENT_PARAMETER_SETPOINTS_TD_TEST_VALUES[index]["dial cond"] td.td_treatment_set_points(blood_flow = target_blood_flow, dialysate_flow = target_dial_flow, - dialysate_temp = target_dial_temp) - utils.waitForGUI(1) - + dialysate_temp = target_dial_tmp) + bloodFlow = waitForObject(names.blood_flow_value) bloodFlow_properties = object.properties(bloodFlow) test.compare(str(bloodFlow_properties["value"]), str(target_blood_flow), "Blood Flow value should be :" + str(target_blood_flow)) @@ -260,9 +254,9 @@ dialFlow_properties = object.properties(dialFlow) test.compare(str(dialFlow_properties["value"]), str(target_dial_flow), "Dialyste flow value should be :" + str(target_dial_flow)) - dialTemp = waitForObject(names.dial_tmp_value) - dialTemp_properties = object.properties(dialTemp) - test.compare(str(dialTemp_properties["value"]), str(target_dial_temp), "Dialyste Temp value should be :" + str(target_dial_temp)) + dialTmp = waitForObject(names.dial_tmp_value) + dialTmp_properties = object.properties(dialTmp) + test.compare(str(dialTmp_properties["value"]), str(target_dial_tmp), "Dialyste Tmp value should be :" + str(target_dial_tmp)) dd.dd_conductivity(D17 = 0, D27 = 0, @@ -279,11 +273,12 @@ utils.tstStart(__file__) startApplication("leahi") - td.td_operation_mode(TDOpModes.MODE_STAN.value) + td.td_operation_mode(TDOpModes.MODE_STAN.value,0) # verify Standby screen test.verify(waitForObjectExists(names.standByScreen_MainHome), "In Standby") + td.td_operation_mode( TDOpModes.MODE_TREA.value, 0 ) td.td_tx_state(TDTreatmentStates.TREATMENT_DIALYSIS_STATE.value , 0 , 0 , @@ -310,10 +305,10 @@ H2_arterial_long = 0 , H14_venous_long = 0 , tmp_pressure = 0 , - tmp_min = TEMP_LOW_VAL_MINUS_640 , - tmp_max = TEMP_HIGH_VAL_210) + tmp_min = TMP_LOW_VAL_MINUS_640 , + tmp_max = TMP_HIGH_VAL_210) - verify_arterial_and_venous_value_in_main_treatment_screen(ACCEPTED,ART_LOW_VAL_MINUS_390,ART_HIGH_VAL_220,VENOUS_LOW_VAL_MINUS_90,VENOUS_HIGH_VAL_410,TEMP_LOW_VAL_MINUS_640,TEMP_HIGH_VAL_210) + verify_arterial_and_venous_value_in_main_treatment_screen(ACCEPTED,ART_LOW_VAL_MINUS_390,ART_HIGH_VAL_220,VENOUS_LOW_VAL_MINUS_90,VENOUS_HIGH_VAL_410,TMP_LOW_VAL_MINUS_640,TMP_HIGH_VAL_210) #UltraFiltration state verification_of_uf_from_main_treatment() Fisheye: Tag c179ffdcc150165eeeda0749891b99b5b19fc6b8 refers to a dead (removed) revision in file `suite_leahi/tst_main_treatment_pressure/test.py'. Fisheye: No comparison available. Pass `N' to diff?