Index: suite_leahi/shared/scripts/configuration/utility.py =================================================================== diff -u -r4f9e56b35635368ce440e2cfffdaba7631b5d120 -r86eb87067a913ab8f1fbaefaedc93cf00907b55c --- suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision 4f9e56b35635368ce440e2cfffdaba7631b5d120) +++ suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision 86eb87067a913ab8f1fbaefaedc93cf00907b55c) @@ -161,15 +161,15 @@ target_value = target_value # Wait for all objects - parent_obj = squish.waitForObjectExists(obj) + parent_obj = squish.waitForObject(obj) # change range as per your screen count left_arrow = findObjectById(parent_obj, "_leftArrow") right_arrow =findObjectById(parent_obj, "_rightArrow") # Read current value (supports invisible text too) - current_value = round(float(squish.findObject(obj).value),1) + current_value = round(float(squish.waitForObject(obj).value), 1) # Determine direction while current_value != float(target_value): @@ -179,7 +179,7 @@ elif current_value > float(target_value): squish.mouseClick(squish.waitForObject(left_arrow)) - current_value = round(float(squish.findObject(obj).value),1) + current_value = round(float(squish.waitForObject(obj).value), 1) test.log(f"Updated value: {current_value}") Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -r4f9e56b35635368ce440e2cfffdaba7631b5d120 -r86eb87067a913ab8f1fbaefaedc93cf00907b55c --- suite_leahi/shared/scripts/names.py (.../names.py) (revision 4f9e56b35635368ce440e2cfffdaba7631b5d120) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision 86eb87067a913ab8f1fbaefaedc93cf00907b55c) @@ -174,7 +174,8 @@ o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox= {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bicarbonateConcentrateComboBox", "type": "BaseComboBox", "unnamed": 1 } o_PreTreatment_vitalsCombobox_BaseCombobox = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bpMeasurementIntervalControl", "type": "BaseComboBox", "unnamed": 1 } o_PreTreatmentCreate_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "type": "Text", "unnamed": 1 } - + + #prescription header bar o_prescriptionButton_IconButton = {"container": o_Gui_MainView, "id": "_prescriptionButton", "type": "IconButton", "unnamed": 1 } o_prescriptionMenu_BaseComboBox = {"container": o_Overlay, "id": "_prescriptionMenu", "type": "BaseComboBox", "unnamed": 1 } @@ -196,7 +197,7 @@ o_preTreatmentStack_PreTreatmentStack = {"container": o_Gui_MainView, "id": "_preTreatmentStack", "type": "PreTreatmentStack", "unnamed": 1 } o_preTreatmentStack_PreTreatmentBase_PreTreatmentBase = {"container": o_preTreatmentStack_PreTreatmentStack, "objectName": "_PreTreatmentBase", "type": "PreTreatmentBase" } o_PreTreatmentBase_instructionView_InstructionView = {"container": o_preTreatmentStack_PreTreatmentBase_PreTreatmentBase, "id": "_instructionView", "type": "InstructionView", "unnamed": 1 } - + #Heparin o_listView_Item = {"container": o_Gui_MainView, "type": "Item", "unnamed": 1 } o_treatmentHeparin_TreatmentHeparin = {"container": o_Gui_MainView, "id": "_treatmentHeparin", "type": "TreatmentHeparin", "unnamed": 1 } @@ -224,7 +225,7 @@ o_PreTreatmentCreate_pretreatmentPatientIDEntry_TextEntry = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_pretreatmentPatientIDEntry", "type": "TextEntry", "unnamed": 1 } o_preTreatmentStack_Text = {"container": o_preTreatmentStack_PreTreatmentStack, "type": "Text", "unnamed": 1 } o_preTreatmentStack_stepIndicator_StepIndicator = {"container": o_preTreatmentStack_PreTreatmentStack, "id": "_stepIndicator", "type": "StepIndicator", "unnamed": 1 } - + # Settings Service o_SettingsStack_SettingsStack = {"container": o_Gui_MainView, "objectName": "_SettingsStack", "type": "SettingsStack", } o_UserConfirmation_SettingsServicePassword = {"container": o_SettingsStack_SettingsStack, "objectName": "UserConfirmation", "type": "SettingsServicePassword", } @@ -329,3 +330,8 @@ o_PreTreatmentSampleStack_button_TouchRect = {"container": o_PreTreatmentSampleStack_PreTreatmentWaterSample, "id": "_button", "type": "TouchRect", "unnamed": 1 } o_preTreatmentStack_repeater_Repeater = {"container": o_preTreatmentStack_PreTreatmentStack, "id": "repeater", "type": "Repeater", "unnamed": 1 } +#New design create Rx +o_createHDTreatment_TouchRect = {"container": o_standByScreen_MainHome, "id": "_createHDTreatment", "type": "TouchRect", "unnamed": 1} +o_PreTreatmentCreate_leftColumn_Column = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_leftColumn", "type": "Column", "unnamed": 1, "visible": True} + + Index: suite_leahi/tst_new_design_createrx/test.py =================================================================== diff -u --- suite_leahi/tst_new_design_createrx/test.py (revision 0) +++ suite_leahi/tst_new_design_createrx/test.py (revision 86eb87067a913ab8f1fbaefaedc93cf00907b55c) @@ -0,0 +1,59 @@ +# Subject/Title: LDT -2174 Treatment Parameters (Create Rx) - SW - 02 - (New Design) - Q&R - 15: SIT - Software Integration Tests - Squish Qt +# +# Functionalities: Testing all functionalities of Treatment parameters validation mode(Create RX) +# +# Steps: +# 1 Create RX: +# - Validate all the values in Create Rx page +# - Verify the validate functionality +# - Verify the confirm button functionality +# - Verify the qr code functionality +# - Verfiy the edit button functionality +# - Verify the clear all button functionality +# - Verify the reject button functionality + +import names + +from names import * +import squish +from leahi_dialin.ui import utils +from configuration import config,utility,navigation +from leahi_dialin.ui.td_messaging import TD_Messaging +from leahi_dialin.common.td_defs import TDOpModes +from builtins import int as pyInt +from squish import * + +td = TD_Messaging() + + +def main(): + utils.tstStart(__file__) + startApplication(utility.aut("-q")) + + td.td_operation_mode(TDOpModes.MODE_STAN.value) + + # verify Standby screen + test.verify(waitForObjectExists(names.o_standByScreen_MainHome), "In Standby") + #click on the HD Mode + test.log("Click on the HD Mode") + hemodialysis = waitForObject(names.o_createHDTreatment_TouchRect) + hemodialysis_btn = utility.findChildByText(hemodialysis, "Hemodialysis") + mouseClick(hemodialysis_btn) + td.td_Treatment_Parameters_CreateRx(vRejectionReason =0) + td.td_operation_mode(TDOpModes.MODE_PRET.value, 0) + navigation.navigation_pageIndicator_step(config.CREATERX) + mouseClick(squish.waitForObject(names.o_PreTreatmentCreate_pretreatmentPatientIDEntry_TextEntry)) + waitForObject(names.o_PreTreatmentCreate_pretreatmentPatientIDEntry_TextEntry).text ="abcd" + parent_obj = waitForObject(names.o_PreTreatmentCreate_leftColumn_Column) + blood_flow_rate = utility.findObjectById(parent_obj, "_bloodFlowRate") + utility.set_value_based_on_target(blood_flow_rate, 60) + dialysate_flow_rate = utility.findObjectById(parent_obj, "_dialysateFlowRate") + utility.set_value_based_on_target(dialysate_flow_rate, 75) + duration = utility.findObjectById(parent_obj,"_duration") + utility.set_value_based_on_target(duration, 75) + test.log("check the page navigated to create rx page") + + + + +