Index: shared/scripts/configuration/utility.py =================================================================== diff -u -rbf0f91cc77deda73a01e96768c76160d71e46ddf -rb38389f9f6ed5e603368e16902671b824d8c9202 --- shared/scripts/configuration/utility.py (.../utility.py) (revision bf0f91cc77deda73a01e96768c76160d71e46ddf) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision b38389f9f6ed5e603368e16902671b824d8c9202) @@ -96,7 +96,7 @@ test.startSection("Enter {}".format(entry)) for value in entry: value = builtins.int(value) - key_val = squish.waitForObject(names.keypad_input(key_value=value)) + key_val = squish.waitForObject(keypad_input(key_value=value)) squish.mouseClick(key_val) utils.waitForGUI(1) test.endSection() @@ -116,5 +116,13 @@ test.compare(input_field.text.toUtf8().constData(), "", "Input field should be empty") test.endSection() + +def vitals_reading_obj(reading): + names.o_vitals_reading["text"] = reading + return names.o_vitals_reading + +def keypad_input(key_value): + names.o_keypad_input["text"] = key_value + return names.o_keypad_input \ No newline at end of file Index: shared/scripts/names.py =================================================================== diff -u -r1b46227816628d8648501e93e0d392489f0829c3 -rb38389f9f6ed5e603368e16902671b824d8c9202 --- shared/scripts/names.py (.../names.py) (revision 1b46227816628d8648501e93e0d392489f0829c3) +++ shared/scripts/names.py (.../names.py) (revision b38389f9f6ed5e603368e16902671b824d8c9202) @@ -52,32 +52,28 @@ #vitals +#vitals title text on main-treatment screen o_vitals_title = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "VITALS", "type": "Text", "unnamed": 1, "visible": True} +#unit of measurement for blood pressure and heart rate o_bp_uom = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "mmHg", "type": "Text", "unnamed": 1, "visible": True} -o_vitals_reading = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "type": "Text", "unnamed": 1, "visible": True} o_hr_uom = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "BPM", "type": "Text", "unnamed": 1, "visible": True} +#reading of vitals +o_vitals_reading = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "type": "Text", "unnamed": 1, "visible": True} +#vitals pop up confirm and close button o_vitals_confrim_btn = {"container": o_treatmentStack_TreatmentStack, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} o_vitals_close_btn = {"container": o_treatmentStack_TreatmentStack, "id": "_image", "source": "qrc:/images/iClose", "type": "Image", "unnamed": 1, "visible": True} +#vitals title text vitals pop up o_vitals_pop_up_title = {"container": o_treatmentStack_TreatmentStack, "text": "VITALS", "type": "Text", "unnamed": 1, "visible": True} o_pop_up_bp_title = {"container": o_treatmentStack_TreatmentStack, "text": "Blood Pressure", "type": "Text", "unnamed": 1, "visible": True} +o_pop_up_heart_rate_title = {"container": o_treatmentStack_TreatmentStack, "text": "Heart Rate", "type": "Text", "unnamed": 1, "visible": True} +#unit of measurement for blood pressure and heart rate on pop up o_pop_up_bp_uom = {"container": o_treatmentStack_TreatmentStack, "text": "mmHg", "type": "Label", "unnamed": 1, "visible": True} +o_pop_up_heart_rate_uom = {"container": o_treatmentStack_TreatmentStack, "text": "BPM", "type": "Label", "unnamed": 1, "visible": True} +#systolic, diastolic and heart rate input field o_pop_up_systolic_input_field = {"container": o_treatmentStack_TreatmentStack, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} o_pop_up_diastolic_input_field = {"container": o_treatmentStack_TreatmentStack, "echoMode": 0, "id": "_input", "occurrence": 2, "type": "TextInput", "unnamed": 1, "visible": True} -o_pop_up_heart_rate_title = {"container": o_treatmentStack_TreatmentStack, "text": "Heart Rate", "type": "Text", "unnamed": 1, "visible": True} -o_pop_up_heart_rate_uom = {"container": o_treatmentStack_TreatmentStack, "text": "BPM", "type": "Label", "unnamed": 1, "visible": True} o_pop_up_heart_rate_input_field = {"backgroundcolor": "#254670", "container": o_treatmentStack_TreatmentStack, "echoMode": 0, "id": "_input", "occurrence": 3, "type": "TextInput", "unnamed": 1, "visible": True} +#virtal keypad input field o_keypad_input = {"container": o_Gui_MainView, "id":"keyText", "type": "Text", "unnamed": 1, "visible": True} +#virtal keypad back space key o_back_space_key = {"container": o_Gui_MainView, "id": "backspaceKeyIcon", "source": "qrc:/QtQuick/VirtualKeyboard/content/styles/default/images/backspace-868482.svg", "type": "Image", "unnamed": 1, "visible": True} - - -def vitals_reading_obj(reading): - o_vitals_reading["text"] = reading - return o_vitals_reading - -def keypad_input(key_value): - o_keypad_input["text"] = key_value - return o_keypad_input - - - - \ No newline at end of file Index: tst_main_treatment_vitals/test.py =================================================================== diff -u -rbf0f91cc77deda73a01e96768c76160d71e46ddf -rb38389f9f6ed5e603368e16902671b824d8c9202 --- tst_main_treatment_vitals/test.py (.../test.py) (revision bf0f91cc77deda73a01e96768c76160d71e46ddf) +++ tst_main_treatment_vitals/test.py (.../test.py) (revision b38389f9f6ed5e603368e16902671b824d8c9202) @@ -105,7 +105,7 @@ """ test.startSection("Verify the last read of blood pressure and heart rate") expected_last_read = "Interval: 30min , Last Read: {}".format(saved_time) - last_read = waitForObject(names.vitals_reading_obj(expected_last_read)) + last_read = waitForObject(vitals_reading_obj(expected_last_read)) last_read = last_read.text.toUtf8().constData() test.compare(last_read, expected_last_read, "Last read time should be {}".format(last_read)) test.endSection() @@ -120,13 +120,13 @@ """ test.startSection("Verify the user entered {} value {} in main-treatment screen".format(vital, value)) if save: - input_field = waitForObject(names.vitals_reading_obj(value)) + input_field = waitForObject(vitals_reading_obj(value)) entered_value = input_field.text.toUtf8().constData() value = str(value) test.compare(entered_value, value, "Expected {} value: {} should be equal to Actual {} value: {}".format(vital, value, vital, entered_value)) elif (save is False): - if object.exists(names.vitals_reading_obj(value)) is False: + if object.exists(vitals_reading_obj(value)) is False: test.log("Entered is not saved and is not updated in main-treatment screen") test.endSection()