Index: shared/scripts/configuration/strings.py =================================================================== diff -u -rc3170ea982e1db4f01a7adf4d4d245a3eae698ca -r2545702a9c0d155e36e6243ccad37b68d71c769e --- shared/scripts/configuration/strings.py (.../strings.py) (revision c3170ea982e1db4f01a7adf4d4d245a3eae698ca) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision 2545702a9c0d155e36e6243ccad37b68d71c769e) @@ -16,7 +16,9 @@ BLOOD_PRIMING_TEXT = "Blood Priming" SALINE_UNIT = "mL" -BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" +BLOOD_PRIMING_UNIT = "mL" +BLOOD_PRIMING_VALUE_0 = "0" +BLOOD_PRIMING_DEFAULT_VALUE = BLOOD_PRIMING_VALUE_0 + BLOOD_PRIMING_UNIT #main treatment screen VITALS_TITLE = "VITALS" Index: shared/scripts/configuration/utility.py =================================================================== diff -u -ra1d91d52c638b1b6291be26a26b346b90cee6bd4 -r2545702a9c0d155e36e6243ccad37b68d71c769e --- shared/scripts/configuration/utility.py (.../utility.py) (revision a1d91d52c638b1b6291be26a26b346b90cee6bd4) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 2545702a9c0d155e36e6243ccad37b68d71c769e) @@ -12,11 +12,11 @@ # ############################################################################ +import object import names -import sys -import test import squish -import object +import test + from configuration import config from dialin.ui import utils from builtins import int as pyInt @@ -69,11 +69,9 @@ ScreenObj = squish.waitForObject(screen_object) screenHeight = pyInt(ScreenObj.height) screenWidth = pyInt(ScreenObj.width) - squish.mouseWheel(ScreenObj, screenWidth-1000, - screenHeight-10, 0, -50, squish.Qt.NoModifier) + squish.mouseWheel(ScreenObj, screenWidth-1000, screenHeight-10, 0, -50, squish.Qt.NoModifier) - raise LookupError("zone object is not in view to the user after " + \ - "trying 100 times") + raise LookupError("zone object is not in view to the user after trying 100 times") def get_current_date_and_time(date_format='%Y/%b/%d - %H:%M'): @@ -154,8 +152,7 @@ arterial_min += 10 # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg if arterial_min == arterial_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(low_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(low_handler, width, height, 1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) test.log("Arterial range minimum value cannot be moved beyond {}".format(arterial_min)) break else: @@ -166,8 +163,7 @@ arterial_min -= 10 # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg if arterial_min == arterial_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(low_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(low_handler, width, height, -1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) test.log("Arterial range minimum value cannot be moved beyond {}".format(arterial_min)) break else: @@ -203,32 +199,27 @@ arterial_max += 10 # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg if arterial_max == arterial_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(high_handler, width, height, 1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) test.log("Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) break else: continue elif arterial_max > art_high: while arterial_max != art_high: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(high_handler, width, height, -1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) arterial_max -= 10 # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg if arterial_max == arterial_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(high_handler, width, height, -1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) test.log("Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) break else: continue # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg if arterial_max == arterial_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(high_handler_parent.maxValue, arterial_max, - "Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) + test.compare(high_handler_parent.maxValue, arterial_max, "Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) else: - test.compare(arterial_max, art_high, - "Actual Arterial range maximum value: {} is equal to Expected value: {}".format(arterial_max, art_high)) + test.compare(arterial_max, art_high, "Actual Arterial range maximum value: {} is equal to Expected value: {}".format(arterial_max, art_high)) test.endSection() @@ -252,26 +243,22 @@ test.passes("Venous range maximum is already set to {}".format(ven_high)) elif ven_max < ven_high: while ven_max != ven_high: - squish.mouseDrag(high_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(high_handler, width, height, 1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) ven_max += 10 # venous blood pressure low limit should be lower than the high limit by at least 30mmHg if ven_max == ven_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(high_handler, width, height, 1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) test.log("Venous range maximum value cannot be moved beyond {}".format(ven_max)) break else: continue elif ven_max > ven_high: while ven_max != ven_high: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(high_handler, width, height, -1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) ven_max -= 10 # venous blood pressure low limit should be lower than the high limit by at least 30mmHg if ven_max == ven_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(high_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(high_handler, width, height, -1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) test.log("Venous range maximum value cannot be moved beyond {}".format(ven_max)) break else: @@ -303,36 +290,30 @@ test.passes("Venous range minimum is already set to {}".format(ven_low)) elif ven_min < ven_low: while ven_min != ven_low: - squish.mouseDrag(low_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(low_handler, width, height, 1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) ven_min += 10 if ven_min == ven_max - config.BUFFER_LOW_AND_HIGH_LIMITS: # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - squish.mouseDrag(low_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(low_handler, width, height, 1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) test.log("Venous range minimum value cannot be moved beyond {}".format(ven_min)) break else: continue elif ven_min > ven_low: while ven_min != ven_low: - squish.mouseDrag(low_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(low_handler, width, height, -1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) ven_min -= 10 # venous blood pressure low limit should be lower than the high limit by at least 30mmHg if ven_min == ven_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(low_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(low_handler, width, height, -1, 0, squish.Qt.NoModifier, squish.Qt.LeftButton) test.log("Venous range minimum value cannot be moved beyond {}".format(ven_min)) break else: continue # venous blood pressure low limit should be lower than the high limit by at least 30mmHg if ven_min == ven_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(low_handler_parent.minValue, ven_min, - "Venous range minimum value cannot be moved beyond {}".format(ven_min)) + test.compare(low_handler_parent.minValue, ven_min, "Venous range minimum value cannot be moved beyond {}".format(ven_min)) else: - test.compare(ven_min, ven_low, - "Actual Venous range minimum value: {} is equal to Expected value: {}".format(ven_min, ven_low)) + test.compare(ven_min, ven_low, "Actual Venous range minimum value: {} is equal to Expected value: {}".format(ven_min, ven_low)) test.endSection() Index: tst_main_treatment_vitals/test.py =================================================================== diff -u -ra1d91d52c638b1b6291be26a26b346b90cee6bd4 -r2545702a9c0d155e36e6243ccad37b68d71c769e --- tst_main_treatment_vitals/test.py (.../test.py) (revision a1d91d52c638b1b6291be26a26b346b90cee6bd4) +++ tst_main_treatment_vitals/test.py (.../test.py) (revision 2545702a9c0d155e36e6243ccad37b68d71c769e) @@ -15,13 +15,10 @@ import names import time -from configuration.config import * -from configuration.utility import * +from configuration import config, utility from dialin.ui import utils -from configuration import utility -from dialin.ui.utils import waitForGUI from dialin.ui.hd_simulator import HDSimulator -from dialin.common.hd_defs import PreTreatmentSubModes, HDOpModes, HDOpSubModes, PreTreatmentSampleWaterStates, PreTreatmentConsumableSelfTestStates, PreTreatmentNoCartSelfTestsStates, PreTreatmentCartridgeInstallStates, PreTreatmentDrySelfTestsStates, PreTreatmentPrimeStates, PreTreatmentRecircStates, PreTreatmentPatientConnectionStates +from dialin.common.hd_defs import PreTreatmentSubModes, HDOpModes, HDOpSubModes, PreTreatmentSampleWaterStates, PreTreatmentConsumableSelfTestStates, PreTreatmentNoCartSelfTestsStates, PreTreatmentCartridgeInstallStates, PreTreatmentDrySelfTestsStates, PreTreatmentPrimeStates, PreTreatmentRecircStates, PreTreatmentPatientConnectionStates, TreatmentStates hd_simulator = HDSimulator() @@ -37,8 +34,6 @@ HEART_RATE_VAL_60 = "60" HEART_RATE_VAL_70 = "70" HEART_RATE_VAL_85 = "85" -DIASTOLIC_TEXT = "diastolic" -SYSTOLIC_TEXT = "systolic" BLOOD_PRESSURE_DEFAULT_VAL = "__ / __" HEART_RATE_DEFAULT_VAL = "__" INVALID_VALS = {"systolic" : [260, 59, 300, 23], "diastolic": [39, 1, 210, 201], @@ -56,9 +51,8 @@ def keyboard_object_map_helper(text): """ - Method for setting custom object property's for keyboard keys - - @return: required object property's for keys + Method for setting custom object property's for keyboard keys + @return: required object property's for keys """ if text is not None: names.o_keboard_input["text"] = text @@ -70,9 +64,8 @@ def keyboard_switching_section(text): """ - Tests to automate keyboard based on user input - - @return: key text (text displayed on keyboard) + Tests to automate keyboard based on user input + @return: key text (text displayed on keyboard) """ keyboard_value = keyboard_object_map_helper(text) object_status = object.exists(keyboard_value) @@ -129,19 +122,19 @@ if object.exists(names.o_vitals_pop_up_title): vitals_pop_up_title = waitForObject(names.o_vitals_pop_up_title) vitals_pop_up_title = str(vitals_pop_up_title.text) - test.compare(vitals_pop_up_title, VITALS_TITLE,"Vitals title text is displayed") + test.compare(vitals_pop_up_title, config.VITALS_TITLE,"Vitals title text is displayed") bp_title = waitForObject(names.o_pop_up_bp_title) bp_title = str(bp_title.text) - test.compare(bp_title, BLOOD_PRESSURE_TITLE,"Blood pressure title text is displayed") + test.compare(bp_title, config.BLOOD_PRESSURE_TITLE,"Blood pressure title text is displayed") bp_uom = waitForObject(names.o_bp_uom) bp_uom = str(bp_uom.text) - test.compare(bp_uom, BLOOD_PRESSURE_UNIT,"Blood pressure unit should be {}".format(BLOOD_PRESSURE_UNIT)) + test.compare(bp_uom, config.BLOOD_PRESSURE_UNIT,"Blood pressure unit should be {}".format(config.BLOOD_PRESSURE_UNIT)) heart_rate_title = waitForObject(names.o_pop_up_heart_rate_title) heart_rate_title = str(heart_rate_title.text) - test.compare(heart_rate_title, HEART_RATE_TITLE,"Heart rate title text is displayed") + test.compare(heart_rate_title, config.HEART_RATE_TITLE,"Heart rate title text is displayed") hr_uom = waitForObject(names.o_hr_uom) hr_uom = str(hr_uom.text) - test.compare(hr_uom, HEART_RATE_UNIT,"Heart Rate unit should be {}".format(HEART_RATE_UNIT)) + test.compare(hr_uom, config.HEART_RATE_UNIT,"Heart Rate unit should be {}".format(config.HEART_RATE_UNIT)) test.endSection() return start_time @@ -157,21 +150,21 @@ test.startSection("Verify the color of {} value {}".format(vital_parameter, entry)) input_field_color = input_field.color.name entry = builtins.int(entry) - if vital_parameter is SYSTOLIC_TEXT: - if (entry < SYSTOLIC_LOWER_LIMIT) or (entry > SYSTOLIC_UPPER_LIMIT): - test.compare(input_field_color, OUT_OF_RANGE_COLOR, "systolic value {} is out of range, systolic value should be in range of {} and {}".format(entry, SYSTOLIC_LOWER_LIMIT, SYSTOLIC_UPPER_LIMIT)) - elif (entry >= SYSTOLIC_LOWER_LIMIT) and (entry <= SYSTOLIC_UPPER_LIMIT): - test.compare(input_field_color, IN_RANGE_COLOR, "systolic value {} is in range of {} and {}".format(entry, SYSTOLIC_LOWER_LIMIT, SYSTOLIC_UPPER_LIMIT)) - elif vital_parameter is DIASTOLIC_TEXT: - if (entry < DIASTOLIC_LOWER_LIMIT) or (entry > DIASTOLIC_UPPER_LIMIT): - test.compare(input_field_color, OUT_OF_RANGE_COLOR, "diastolic value {} is out of range, diastolic value should be in range of {} and {}".format(entry, DIASTOLIC_LOWER_LIMIT, DIASTOLIC_UPPER_LIMIT)) - elif (entry >= DIASTOLIC_LOWER_LIMIT) and (entry <= DIASTOLIC_UPPER_LIMIT): - test.compare(input_field_color, IN_RANGE_COLOR, "diastolic value {} is in range of {} and {}".format(entry, DIASTOLIC_LOWER_LIMIT, DIASTOLIC_UPPER_LIMIT)) - elif vital_parameter is HEART_RATE_TITLE: - if (entry < HEART_RATE_LOWER_LIMIT) or (entry > HEART_RATE_UPPER_LIMIT): - test.compare(input_field_color, OUT_OF_RANGE_COLOR, "Heart Rate value {} is out of range, Heart Rate value should be in range of {} and {}".format(entry, HEART_RATE_LOWER_LIMIT, HEART_RATE_UPPER_LIMIT)) - elif (entry >= HEART_RATE_LOWER_LIMIT) and (entry <= HEART_RATE_UPPER_LIMIT): - test.compare(input_field_color,IN_RANGE_COLOR, "Heart Rate value {} is in range of {} and {}".format(entry, HEART_RATE_LOWER_LIMIT, HEART_RATE_UPPER_LIMIT)) + if vital_parameter is config.SYSTOLIC_TEXT: + if (entry < config.SYSTOLIC_LOWER_LIMIT) or (entry > config.SYSTOLIC_UPPER_LIMIT): + test.compare(input_field_color, config.OUT_OF_RANGE_COLOR, "systolic value {} is out of range, systolic value should be in range of {} and {}".format(entry, config.SYSTOLIC_LOWER_LIMIT, config.SYSTOLIC_UPPER_LIMIT)) + elif (entry >= config.SYSTOLIC_LOWER_LIMIT) and (entry <= config.SYSTOLIC_UPPER_LIMIT): + test.compare(input_field_color, config.IN_RANGE_COLOR, "systolic value {} is in range of {} and {}".format(entry, config.SYSTOLIC_LOWER_LIMIT, config.SYSTOLIC_UPPER_LIMIT)) + elif vital_parameter is config.DIASTOLIC_TEXT: + if (entry < config.DIASTOLIC_LOWER_LIMIT) or (entry > config.DIASTOLIC_UPPER_LIMIT): + test.compare(input_field_color, config.OUT_OF_RANGE_COLOR, "diastolic value {} is out of range, diastolic value should be in range of {} and {}".format(entry, config.DIASTOLIC_LOWER_LIMIT, config.DIASTOLIC_UPPER_LIMIT)) + elif (entry >= config.DIASTOLIC_LOWER_LIMIT) and (entry <= config.DIASTOLIC_UPPER_LIMIT): + test.compare(input_field_color, config.IN_RANGE_COLOR, "diastolic value {} is in range of {} and {}".format(entry, config.DIASTOLIC_LOWER_LIMIT, config.DIASTOLIC_UPPER_LIMIT)) + elif vital_parameter is config.HEART_RATE_TITLE: + if (entry < config.HEART_RATE_LOWER_LIMIT) or (entry > config.HEART_RATE_UPPER_LIMIT): + test.compare(input_field_color, config.OUT_OF_RANGE_COLOR, "Heart Rate value {} is out of range, Heart Rate value should be in range of {} and {}".format(entry, config.HEART_RATE_LOWER_LIMIT, config.HEART_RATE_UPPER_LIMIT)) + elif (entry >= config.HEART_RATE_LOWER_LIMIT) and (entry <= config.HEART_RATE_UPPER_LIMIT): + test.compare(input_field_color,config.IN_RANGE_COLOR, "Heart Rate value {} is in range of {} and {}".format(entry, config.HEART_RATE_LOWER_LIMIT, config.HEART_RATE_UPPER_LIMIT)) test.endSection() @@ -182,7 +175,7 @@ """ test.startSection("Verify the last read of blood pressure and heart rate") expected_last_read = "Interval: off , Last Read: {}".format(saved_time) - last_read = waitForObject(vitals_reading_obj(expected_last_read)) + last_read = waitForObject(utility.vitals_reading_obj(expected_last_read)) last_read = str(last_read.text) test.compare(last_read, expected_last_read, "Last read time should be {}".format(last_read)) test.endSection() @@ -197,13 +190,12 @@ """ test.startSection("Verify the user entered {} value {} in main-treatment screen".format(vital, value)) if save: - input_field = waitForObject(vitals_reading_obj(value)) + input_field = waitForObject(utility.vitals_reading_obj(value)) entered_value = input_field.text value = str(value) - test.compare(str(entered_value), value, - "Expected {} value: {} should be equal to Actual {} value: {}".format(vital, value, vital, entered_value)) + test.compare(str(entered_value), value, "Expected {} value: {} should be equal to Actual {} value: {}".format(vital, value, vital, entered_value)) else: - if object.exists(vitals_reading_obj(value)) is False: + if object.exists(utility.vitals_reading_obj(value)) is False: test.log("Entered is not saved and is not updated in main-treatment screen") test.endSection() @@ -220,8 +212,7 @@ input_field = waitForObject(input_field) entered_value = str(input_field.text) utils.waitForGUI(1) - test.compare(entered_value, value, - "Actual {} value: {} should be equal to Expected {} value: {}".format(vital, entered_value, vital, value)) + test.compare(entered_value, value, "Actual {} value: {} should be equal to Expected {} value: {}".format(vital, entered_value, vital, value)) test.endSection() @@ -234,37 +225,31 @@ is entering value (sys/dia/heart rate) """ test.startSection("Verify the range of {}".format(vital_parameter)) - if vital_parameter is SYSTOLIC_TEXT: + if vital_parameter is config.SYSTOLIC_TEXT: systolic = waitForObject(names.o_pop_up_systolic_input_field) mouseClick(systolic) for value in SYSTOLIC_VALUES: - enter_keypad_value(str(value)) - verify_entered_value_in_pop_up(value=str(value), input_field=systolic, - vital=vital_parameter) - verify_color_of_entry(entry=value, vital_parameter=SYSTOLIC_TEXT, - input_field=systolic) - erase_entered_value(input_field=systolic) - elif vital_parameter is DIASTOLIC_TEXT: + utility.enter_keypad_value(str(value)) + verify_entered_value_in_pop_up(value=str(value), input_field=systolic, vital=vital_parameter) + verify_color_of_entry(entry=value, vital_parameter=config.SYSTOLIC_TEXT, input_field=systolic) + utility.erase_entered_value(input_field=systolic) + elif vital_parameter is config.DIASTOLIC_TEXT: diastolic = waitForObject(names.o_pop_up_diastolic_input_field) mouseClick(diastolic) for value in DIASTOLIC_VALUES: - enter_keypad_value(str(value)) - verify_entered_value_in_pop_up(value=str(value), input_field=diastolic, - vital=vital_parameter) - verify_color_of_entry(entry=value, vital_parameter=DIASTOLIC_TEXT, - input_field=diastolic) - erase_entered_value(diastolic) - utils.waitForGUI(1) - elif vital_parameter is HEART_RATE_TITLE: + utility.enter_keypad_value(str(value)) + verify_entered_value_in_pop_up(value=str(value), input_field=diastolic, vital=vital_parameter) + verify_color_of_entry(entry=value, vital_parameter=config.DIASTOLIC_TEXT, input_field=diastolic) + utility.erase_entered_value(diastolic) + utils.waitForGUI(1) + elif vital_parameter is config.HEART_RATE_TITLE: hr = waitForObject(names.o_pop_up_heart_rate_input_field) mouseClick(hr) for value in HEART_RATE_VALUES: - enter_keypad_value(str(value)) - verify_entered_value_in_pop_up(value=str(value), input_field=hr, - vital=vital_parameter) - verify_color_of_entry(entry=value, vital_parameter=HEART_RATE_TITLE, - input_field=hr) - erase_entered_value(hr) + utility.enter_keypad_value(str(value)) + verify_entered_value_in_pop_up(value=str(value), input_field=hr, vital=vital_parameter) + verify_color_of_entry(entry=value, vital_parameter=config.HEART_RATE_TITLE, input_field=hr) + utility.erase_entered_value(hr) test.endSection() @@ -275,43 +260,37 @@ """ test.startSection("Verify the color out of range values of {}".format(vital_parameter)) out_range_val_list = INVALID_VALS[vital_parameter] - if vital_parameter is SYSTOLIC_TEXT: + if vital_parameter is config.SYSTOLIC_TEXT: systolic = waitForObject(names.o_pop_up_systolic_input_field) mouseClick(systolic) for entry in out_range_val_list: - enter_keypad_value(entry=str(entry)) - verify_entered_value_in_pop_up(value=str(entry), input_field=systolic, - vital=vital_parameter) - verify_color_of_entry(entry=entry, vital_parameter=SYSTOLIC_TEXT, - input_field=systolic) - erase_entered_value(input_field=systolic) - elif vital_parameter is DIASTOLIC_TEXT: + utility.enter_keypad_value(entry=str(entry)) + verify_entered_value_in_pop_up(value=str(entry), input_field=systolic, vital=vital_parameter) + verify_color_of_entry(entry=entry, vital_parameter=config.SYSTOLIC_TEXT, input_field=systolic) + utility.erase_entered_value(input_field=systolic) + elif vital_parameter is config.DIASTOLIC_TEXT: diastolic = waitForObject(names.o_pop_up_diastolic_input_field) mouseClick(diastolic) for entry in out_range_val_list: - enter_keypad_value(str(entry)) - verify_entered_value_in_pop_up(value=str(entry), input_field=diastolic, - vital=vital_parameter) - verify_color_of_entry(entry=entry, vital_parameter=DIASTOLIC_TEXT, - input_field=diastolic) - erase_entered_value(diastolic) + utility.enter_keypad_value(str(entry)) + verify_entered_value_in_pop_up(value=str(entry), input_field=diastolic, vital=vital_parameter) + verify_color_of_entry(entry=entry, vital_parameter=config.DIASTOLIC_TEXT, input_field=diastolic) + utility.erase_entered_value(diastolic) utils.waitForGUI(1) - elif vital_parameter is HEART_RATE_TITLE: + elif vital_parameter is config.HEART_RATE_TITLE: hr = waitForObject(names.o_pop_up_heart_rate_input_field) mouseClick(hr) for entry in out_range_val_list: - enter_keypad_value(str(entry)) - verify_entered_value_in_pop_up(value=str(entry), input_field=hr, - vital=vital_parameter) - verify_color_of_entry(entry=entry, vital_parameter=HEART_RATE_TITLE, - input_field=hr) - erase_entered_value(hr) + utility.enter_keypad_value(str(entry)) + verify_entered_value_in_pop_up(value=str(entry), input_field=hr, vital=vital_parameter) + verify_color_of_entry(entry=entry, vital_parameter=config.HEART_RATE_TITLE, input_field=hr) + utility.erase_entered_value(hr) test.endSection() def verify_entered_valid_vital_entries_in_main_treatment_screen(sys_val, dia_val, heart_rate, save): """ - method to enter systolic, diastolic and + Method to enter systolic, diastolic and heart rate value and save or unsave it and verify same is updated in main-treatment screen @@ -323,59 +302,52 @@ test.startSection("Verify the entered systolic, diastolic and heart rate value updated in main-treatement screen") systolic = waitForObject(names.o_pop_up_systolic_input_field) mouseClick(systolic) - erase_entered_value(systolic) - enter_keypad_value(str(sys_val)) - verify_entered_value_in_pop_up(value=str(sys_val), input_field=systolic, - vital=SYSTOLIC_TEXT) - verify_color_of_entry(entry=sys_val, vital_parameter=SYSTOLIC_TEXT, - input_field=systolic) + utility.erase_entered_value(systolic) + utility.enter_keypad_value(str(sys_val)) + verify_entered_value_in_pop_up(value=str(sys_val), input_field=systolic, vital=config.SYSTOLIC_TEXT) + verify_color_of_entry(entry=sys_val, vital_parameter=config.SYSTOLIC_TEXT, input_field=systolic) diastolic = waitForObject(names.o_pop_up_diastolic_input_field) mouseClick(diastolic) - erase_entered_value(diastolic) + utility.erase_entered_value(diastolic) utils.waitForGUI(1) - enter_keypad_value(str(dia_val)) - verify_entered_value_in_pop_up(value=str(dia_val), input_field=diastolic, - vital=DIASTOLIC_TEXT) - verify_color_of_entry(entry=dia_val, vital_parameter=DIASTOLIC_TEXT, - input_field=diastolic) + utility.enter_keypad_value(str(dia_val)) + verify_entered_value_in_pop_up(value=str(dia_val), input_field=diastolic, vital=config.DIASTOLIC_TEXT) + verify_color_of_entry(entry=dia_val, vital_parameter=config.DIASTOLIC_TEXT, input_field=diastolic) hr = waitForObject(names.o_pop_up_heart_rate_input_field) mouseClick(hr) - erase_entered_value(hr) - enter_keypad_value(str(heart_rate)) - verify_entered_value_in_pop_up(value=str(heart_rate), input_field=hr, - vital=HEART_RATE_TITLE) - verify_color_of_entry(entry=heart_rate, vital_parameter=HEART_RATE_TITLE, - input_field=hr) + utility.erase_entered_value(hr) + utility.enter_keypad_value(str(heart_rate)) + verify_entered_value_in_pop_up(value=str(heart_rate), input_field=hr, vital=config.HEART_RATE_TITLE) + verify_color_of_entry(entry=heart_rate, vital_parameter=config.HEART_RATE_TITLE, input_field=hr) if save: test.log("Clicking confirm button") confirm_button = waitForObjectExists(names.o_vitals_confrim_btn) test.compare(confirm_button.enabled, True, "Valid Blood Pressure and Heart is entered therefore confirm button is enabled") - saved_time = get_current_date_and_time() - saved_time = get_current_date_and_time(date_format='%Y/%b/%d - %H:%M') + saved_time = utility.get_current_date_and_time() + saved_time = utility.get_current_date_and_time(date_format='%Y/%b/%d - %H:%M') mouseClick(confirm_button) verify_last_read_time(saved_time) elif save is False: mouseClick(waitForObject(names.o_vitals_close_btn)) test.log("'Vitals pop is closed") expected_blood_pressure = "{sys} / {dia}".format(sys=sys_val, dia=dia_val) - verify_entered_value_in_main_treatment_screen(value=expected_blood_pressure, - vital=BLOOD_PRESSURE_TITLE, save=save) - verify_entered_value_in_main_treatment_screen(value=heart_rate, vital=HEART_RATE_TITLE, save=save) + verify_entered_value_in_main_treatment_screen(value=expected_blood_pressure, vital=config.BLOOD_PRESSURE_TITLE, save=save) + verify_entered_value_in_main_treatment_screen(value=heart_rate, vital=config.HEART_RATE_TITLE, save=save) test.endSection() def verify_request_continue_mode(): """ - Method to accept treatment response. + Method to accept treatment response. """ treatment_status = hd_simulator.cmd_send_treatment_parameter_manual_validation_response([ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]) test.compare(treatment_status, True, "custom treatment should be accepted") def verify_create_custom_treatment_parameter(): """ - Method to set create custom treatment slider value based on slider buffer + Method to set create custom treatment slider value based on slider buffer """ test.startSection("Method to set create custom treatment slider based on positive slider buffer") test.compare(waitForObject(names.o_PreTreatmentCreate_Create_a_Custom_Treatment_Text).text, config.TREATMENT_TITLE, "Title text should be -> "+str(config.TREATMENT_TITLE)) @@ -399,7 +371,7 @@ test.endSection() #scroll the screen to the title heparin bolus volume - parameter_object = set_parameter_type(text = config.HEPARIN_BOLUS_VOLUME) + parameter_object = set_parameter_type(text=config.HEPARIN_BOLUS_VOLUME) utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) test.startSection("verification of heparin dispensing rate values") @@ -415,7 +387,7 @@ test.endSection() #scroll the screen to the title acid concentrate type - parameter_object = set_parameter_type(text = config.HEPARIN_TYPE_TITLE) + parameter_object = set_parameter_type(text=config.HEPARIN_TYPE_TITLE) utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) test.startSection("verification of heparin stop time values") @@ -430,7 +402,7 @@ test.endSection() #scroll the screen to the title acid concentrate type - parameter_object = set_parameter_type(text = config.ACID_CONCENTRATE_TITLE) + parameter_object = set_parameter_type(text=config.ACID_CONCENTRATE_TITLE) utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) test.startSection("verification of heparin type") @@ -441,7 +413,7 @@ test.endSection() #scroll the screen to the title dialyste rectangle - parameter_object = set_parameter_type(text = config.DIALYZER_TYPE_TITLE) + parameter_object = set_parameter_type(text=config.DIALYZER_TYPE_TITLE) utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) test.startSection("verification of acid concentrate type") @@ -452,7 +424,7 @@ test.endSection() #scroll the screen to the title dialyste rectangle - parameter_object = set_parameter_type(text = config.DIALYZER_TYPE_TITLE) + parameter_object = set_parameter_type(text=config.DIALYZER_TYPE_TITLE) utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) test.startSection("verification of bicarbonate concentrate rectangle") @@ -463,7 +435,7 @@ test.endSection() #scroll the screen to the title dialyste temperature value - parameter_object = set_parameter_type(text = config.DIALYSATE_TEMPERATURE) + parameter_object = set_parameter_type(text=config.DIALYSATE_TEMPERATURE) utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) test.startSection("verification of dialysate rectangle") @@ -476,7 +448,7 @@ test.endSection() #scroll the screen to the title blood pressure measurement interval - parameter_object = set_parameter_type(text = config.BLOOD_PRESSURE_MEASUREMENT_INTERVAL) + parameter_object = set_parameter_type(text=config.BLOOD_PRESSURE_MEASUREMENT_INTERVAL) utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) test.startSection("verification of dialysate temperature values") @@ -485,7 +457,7 @@ test.endSection() #scroll the screen to the title rinseback flow rate - parameter_object = set_parameter_type(text = config.RINSEBACK_FLOW_RATE) + parameter_object = set_parameter_type(text=config.RINSEBACK_FLOW_RATE) utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) set_arterial_low_and_high() @@ -506,7 +478,7 @@ def set_venous_low_and_high(): """ - Method to set the venous low and high limits using slider + Method to set the venous low and high limits using slider """ test.startSection("Set the venous low and high limits using slider") utility.set_venous_ranges_min_val(ven_low) @@ -517,7 +489,7 @@ def set_arterial_low_and_high(): """ - Method to set the arterial low and high limits using slider + Method to set the arterial low and high limits using slider """ test.startSection("Set the arterial low and high limits using slider") utility.set_arterial_ranges_max_val(art_high) @@ -527,21 +499,21 @@ def verify_vital_entries_in_main_treatment_screen(sys_val, dia_val, heart_rate): """ - method to enter systolic, diastolic and heart rate value and save or unsave it and verify - same is updated in pre-treatment screen. - @param sys_val - (int) user expected systolic pressure - @param dia_val - (int) user expected diastolic pressure - @param heart_rate - (int) user expected heart rate - @param save - (bool) True/False + Method to enter systolic, diastolic and heart rate value and save or unsave it and verify + same is updated in pre-treatment screen. + @param sys_val - (int) user expected systolic pressure + @param dia_val - (int) user expected diastolic pressure + @param heart_rate - (int) user expected heart rate + @param save - (bool) True/False """ test.startSection("Verify the entered systolic, diastolic and heart rate value updated in main-treatement screen") mouseClick(waitForObject(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry)) utility.erase_entered_value(names.o_PreTreatmentBase_input_TextInput_2) utility.enter_keypad_value(sys_val) test.verify(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry).enabled, "systolic combo box should be enabled.") - test.compare(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry).text, str(sys_val), "systolic value should be : "+str(sys_val)) - verify_color_of_entry(entry = sys_val, vital_parameter = config.SYSTOLIC_TEXT, input_field = waitForObject(names.o_PreTreatmentBase_input_TextInput_2)) + test.compare(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry).text, str(sys_val), "systolic value should be : " + str(sys_val)) + verify_color_of_entry(entry=sys_val, vital_parameter=config.SYSTOLIC_TEXT, input_field=waitForObject(names.o_PreTreatmentBase_input_TextInput_2)) mouseClick(waitForObject(names.o_PreTreatmentBase_input_TextInput_3)) @@ -565,9 +537,7 @@ def verify_entered_vitals_in_patient_connection_screen(): """ - Method to verify BP/HR section from patient connection. - @param : N/A - @return: N/A + Method to verify BP/HR section from patient connection. """ test.startSection("verification of BP/HR section from patient connection") test.compare(waitForObjectExists(names.o_PreTreatmentBase_BP_HR_Text).text, config.BP_HR_TEXT, "BP/HR title text should be :" + str(config.BP_HR_TEXT)) @@ -589,7 +559,7 @@ def set_venous_high_and_low_limits_using_slider(): """ - Method to set the venous low and high limits using slider + Method to set the venous low and high limits using slider """ test.startSection("Set the venous low and high limits using slider") utils.waitForGUI(1) @@ -603,7 +573,7 @@ def set_arterial_high_and_low_limits_using_slider(): """ - Method to set the arterial low and high limits using slider + Method to set the arterial low and high limits using slider """ test.startSection("Set the arterial low and high limits using slider") utils.waitForGUI(1) @@ -613,7 +583,7 @@ test.endSection() -def drag_and_drop_ultrafiltration_slider(slider_value = 0, maximum_ultrafiltration = 0): +def drag_and_drop_ultrafiltration_slider(slider_value=0, maximum_ultrafiltration=0): """ Tests to verify ultrafiltration slider range @param slider_value: (int) value of the slider to set. @@ -631,25 +601,25 @@ navigate to main treatment screen to reset vital """ test.startSection("Verify last read and interval of blood pressure and heart rate") - hd_simulator.cmd_send_hd_operation_mode(op_mode = HDOpModes.MODE_TPAR.value , sub_mode = HDOpSubModes.SUBMODE_START.value) + hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_TPAR.value, sub_mode=HDOpSubModes.SUBMODE_START.value) mouseClick(waitForObject(names.o_input_patient_id)) type(waitForObject(names.o_input_patient_id), "abcd") mouseClick(waitForObject(names.o_confirm_button)) verify_create_custom_treatment_parameter() verify_request_continue_mode() utils.waitForGUI(1) - hd_simulator.cmd_initiate_treatment_response(response = 1, reason =0) - hd_simulator.cmd_send_hd_operation_mode(op_mode = HDOpModes.MODE_PRET.value , sub_mode = HDOpSubModes.SUBMODE_START.value) + hd_simulator.cmd_initiate_treatment_response(response=1, reason=0) + hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_PRET.value , sub_mode=HDOpSubModes.SUBMODE_START.value) hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=PreTreatmentSubModes.HD_PRE_TREATMENT_PATIENT_CONNECTION_STATE.value, water_sample_state=PreTreatmentSampleWaterStates.SAMPLE_WATER_SETUP_STATE.value,consumables_self_test_state=PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_INSTALL_STATE.value, no_cartridge_self_test_state=PreTreatmentNoCartSelfTestsStates.NO_CART_SELF_TESTS_START_STATE.value,installation_state=PreTreatmentCartridgeInstallStates.CARTRIDGE_INSTALL_STATE.value, dry_self_test_state=PreTreatmentDrySelfTestsStates.DRY_SELF_TESTS_START_STATE.value, prime_state=PreTreatmentPrimeStates.HD_PRIME_START_STATE.value,recirculate_state=PreTreatmentRecircStates.PRE_TREATMENT_RECIRC_STATE.value, patient_connection_state=PreTreatmentPatientConnectionStates.PATIENT_CONNECTION_STATE.value) - hd_simulator.cmd_send_uf_treatment_response(accepted =True, reason =0, volume = 300) + hd_simulator.cmd_send_uf_treatment_response(accepted=True, reason=0, volume=300) verify_entered_vitals_in_patient_connection_screen() utils.waitForGUI(1) - hd_simulator.cmd_send_hd_operation_mode(op_mode = 6 , sub_mode = 2) + hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_TREA.value, sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value) utils.waitForGUI(1) hd_simulator.cmd_set_treatment_states_data(sub_mode = 1, uf_state= 0, saline_state=0, heparin_state= 0, rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, @@ -669,14 +639,14 @@ from main treatment to patient connection verifying the same by navigating from patient connection to main treatment to reset """ - hd_simulator.cmd_send_hd_operation_mode(op_mode = 6 , sub_mode = 2) + hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_TREA.value, sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value) utils.waitForGUI(1) - hd_simulator.cmd_set_treatment_states_data(sub_mode = 1, uf_state= 0, saline_state=0, heparin_state= 0, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) - hd_simulator.cmd_set_treatment_states_data(sub_mode = 2, uf_state= 0, saline_state=0, heparin_state= 0, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_BLOOD_PRIME_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=TreatmentStates.TREATMENT_START_STATE.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=TreatmentStates.TREATMENT_START_STATE.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) def set_parameter_type(text): """ @@ -719,7 +689,7 @@ end_time = time.time() total_elapsed_time = end_time - start_time test.log("Total elapsed time : {}".format(total_elapsed_time)) - test.compare(bp_uom.text, BLOOD_PRESSURE_UNIT, "{} should displayed when pop up is closed".format(BLOOD_PRESSURE_UNIT)) + test.compare(bp_uom.text, config.BLOOD_PRESSURE_UNIT, "{} should displayed when pop up is closed".format(config.BLOOD_PRESSURE_UNIT)) test.endSection() def verify_vitals_pop_up_is_opened_automatically_after_an_interval(interval): @@ -742,18 +712,18 @@ close_btn = waitForObject(names.o_vitals_close_btn) total_elapsed_time = end_time - start_time test.log("Total elapsed time : {}".format(total_elapsed_time)) - test.compare(close_btn.visible, VISIBLE, "Dialog close button should be visible after the vitals pop up is opened automatically") + test.compare(close_btn.visible, config.VISIBLE, "Dialog close button should be visible after the vitals pop up is opened automatically") test.endSection() def main(): utils.tstStart(__file__) - startApplication(AUT_NAME) + startApplication(config.AUT_NAME) hd_simulator.cmd_send_power_on_self_test_version_request() - hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 0, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=TreatmentStates.TREATMENT_START_STATE.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) hd_simulator.cmd_set_treatment_parameter_ranges(min_treatment_duration=0, max_treatment_duration=480, min_uf_volume=0.0, max_uf_volume=8000.0, @@ -763,65 +733,35 @@ utils.waitForGUI(1) open_vitals_pop_up() - verify_entered_valid_vital_entries_in_main_treatment_screen(sys_val=SYSTOLIC_PRESSSURE_120, - dia_val=DIASTOLIC_PRESSSURE_80, - heart_rate=HEART_RATE_VAL_101, - save=True) + verify_entered_valid_vital_entries_in_main_treatment_screen(sys_val=SYSTOLIC_PRESSSURE_120, dia_val=DIASTOLIC_PRESSSURE_80, heart_rate=HEART_RATE_VAL_101, save=True) utils.waitForGUI(1) open_vitals_pop_up() - verify_entered_value_in_pop_up(value=SYSTOLIC_PRESSSURE_120, - input_field=names.o_pop_up_systolic_input_field, - vital=SYSTOLIC_TEXT) - verify_entered_value_in_pop_up(value=DIASTOLIC_PRESSSURE_80, - input_field=names.o_pop_up_diastolic_input_field, - vital=DIASTOLIC_TEXT) - verify_entered_value_in_pop_up(value=HEART_RATE_VAL_101, - input_field=names.o_pop_up_heart_rate_input_field, - vital=HEART_RATE_TITLE) - verify_entered_valid_vital_entries_in_main_treatment_screen(sys_val=SYSTOLIC_PRESSSURE_175, - dia_val=DIASTOLIC_PRESSSURE_60, - heart_rate=HEART_RATE_VAL_85, - save=False) + verify_entered_value_in_pop_up(value=SYSTOLIC_PRESSSURE_120,input_field=names.o_pop_up_systolic_input_field, vital=config.SYSTOLIC_TEXT) + verify_entered_value_in_pop_up(value=DIASTOLIC_PRESSSURE_80, input_field=names.o_pop_up_diastolic_input_field, vital=config.DIASTOLIC_TEXT) + verify_entered_value_in_pop_up(value=HEART_RATE_VAL_101, input_field=names.o_pop_up_heart_rate_input_field, vital=config.HEART_RATE_TITLE) + verify_entered_valid_vital_entries_in_main_treatment_screen(sys_val=SYSTOLIC_PRESSSURE_175, dia_val=DIASTOLIC_PRESSSURE_60, heart_rate=HEART_RATE_VAL_85, save=False) utils.waitForGUI(1) open_vitals_pop_up() - verify_entered_value_in_pop_up(value=SYSTOLIC_PRESSSURE_175, - input_field=names.o_pop_up_systolic_input_field, - vital=SYSTOLIC_TEXT) - verify_entered_value_in_pop_up(value=DIASTOLIC_PRESSSURE_60, - input_field=names.o_pop_up_diastolic_input_field, - vital=DIASTOLIC_TEXT) - verify_entered_value_in_pop_up(value=HEART_RATE_VAL_85, - input_field=names.o_pop_up_heart_rate_input_field, - vital=HEART_RATE_TITLE) - verify_entered_valid_vital_entries_in_main_treatment_screen(sys_val=SYSTOLIC_PRESSSURE_113, - dia_val=DIASTOLIC_PRESSSURE_74, - heart_rate=HEART_RATE_VAL_70, - save=True) + verify_entered_value_in_pop_up(value=SYSTOLIC_PRESSSURE_175, input_field=names.o_pop_up_systolic_input_field, vital=config.SYSTOLIC_TEXT) + verify_entered_value_in_pop_up(value=DIASTOLIC_PRESSSURE_60, input_field=names.o_pop_up_diastolic_input_field, vital=config.DIASTOLIC_TEXT) + verify_entered_value_in_pop_up(value=HEART_RATE_VAL_85, input_field=names.o_pop_up_heart_rate_input_field, vital=config.HEART_RATE_TITLE) + verify_entered_valid_vital_entries_in_main_treatment_screen(sys_val=SYSTOLIC_PRESSSURE_113, dia_val=DIASTOLIC_PRESSSURE_74, heart_rate=HEART_RATE_VAL_70, save=True) utils.waitForGUI(1) open_vitals_pop_up() - verify_entered_value_in_pop_up(value=SYSTOLIC_PRESSSURE_113, - input_field=names.o_pop_up_systolic_input_field, - vital=SYSTOLIC_TEXT) - verify_entered_value_in_pop_up(value=DIASTOLIC_PRESSSURE_74, - input_field=names.o_pop_up_diastolic_input_field, - vital=DIASTOLIC_TEXT) - verify_entered_value_in_pop_up(value=HEART_RATE_VAL_70, - input_field=names.o_pop_up_heart_rate_input_field, - vital=HEART_RATE_TITLE) - verify_entered_valid_vital_entries_in_main_treatment_screen(sys_val=SYSTOLIC_PRESSSURE_200, - dia_val=DIASTOLIC_PRESSSURE_150, - heart_rate=HEART_RATE_VAL_60, - save=False) + verify_entered_value_in_pop_up(value=SYSTOLIC_PRESSSURE_113, input_field=names.o_pop_up_systolic_input_field, vital=config.SYSTOLIC_TEXT) + verify_entered_value_in_pop_up(value=DIASTOLIC_PRESSSURE_74, input_field=names.o_pop_up_diastolic_input_field, vital=config.DIASTOLIC_TEXT) + verify_entered_value_in_pop_up(value=HEART_RATE_VAL_70, input_field=names.o_pop_up_heart_rate_input_field, vital=config.HEART_RATE_TITLE) + verify_entered_valid_vital_entries_in_main_treatment_screen(sys_val=SYSTOLIC_PRESSSURE_200,dia_val=DIASTOLIC_PRESSSURE_150, heart_rate=HEART_RATE_VAL_60, save=False) utils.waitForGUI(1) open_vitals_pop_up() - verify_ranges_of_vital(vital_parameter=SYSTOLIC_TEXT) - verify_ranges_of_vital(vital_parameter=DIASTOLIC_TEXT) - verify_ranges_of_vital(vital_parameter=HEART_RATE_TITLE) + verify_ranges_of_vital(vital_parameter=config.SYSTOLIC_TEXT) + verify_ranges_of_vital(vital_parameter=config.DIASTOLIC_TEXT) + verify_ranges_of_vital(vital_parameter=config.HEART_RATE_TITLE) - verify_the_color_of_out_of_range(vital_parameter=SYSTOLIC_TEXT) - verify_the_color_of_out_of_range(vital_parameter=DIASTOLIC_TEXT) - verify_the_color_of_out_of_range(vital_parameter=HEART_RATE_TITLE) + verify_the_color_of_out_of_range(vital_parameter=config.SYSTOLIC_TEXT) + verify_the_color_of_out_of_range(vital_parameter=config.DIASTOLIC_TEXT) + verify_the_color_of_out_of_range(vital_parameter=config.HEART_RATE_TITLE) verify_interval_for_bpm()