Index: shared/scripts/configuration/strings.py =================================================================== diff -u -ra53831cea0eb42896e18bba5fd32e47c667e4c61 -r87ea45e25ed216636ef669a3b6b3f579aec21669 --- shared/scripts/configuration/strings.py (.../strings.py) (revision a53831cea0eb42896e18bba5fd32e47c667e4c61) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision 87ea45e25ed216636ef669a3b6b3f579aec21669) @@ -75,3 +75,8 @@ 45: "REQUEST_REJECT_REASON_DG_CONCENTRATE_CAP_OPEN", # Concentrate cap open 46: "NUM_OF_REQUEST_REJECT_REASONS" # Number of settings change reject codes } + + +BACK_TEXT = "BACK" + + Index: shared/scripts/names.py =================================================================== diff -u -r3ace203ca9373d52c55f1720c10342a791c0cbba -r87ea45e25ed216636ef669a3b6b3f579aec21669 --- shared/scripts/names.py (.../names.py) (revision 3ace203ca9373d52c55f1720c10342a791c0cbba) +++ shared/scripts/names.py (.../names.py) (revision 87ea45e25ed216636ef669a3b6b3f579aec21669) @@ -100,8 +100,19 @@ o_disinfectHome_gridSteps_Grid = {"container": o_DisinfectStack_disinfectHome_TreatmentFlowBase, "id": "_gridSteps", "occurrence": 2, "type": "Grid", "unnamed": 1, "visible": True} o_disinfectHome_leftImage_Image = {"container": o_DisinfectStack_disinfectHome_TreatmentFlowBase, "id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} o_disinfectHome_rightImage_Image = {"container": o_DisinfectStack_disinfectHome_TreatmentFlowBase, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} +#Disinfection-settings path +o_touchRect2_TouchRect = {"container": o_Gui_MainView, "objectName": "_touchRect2", "type": "TouchRect", "visible": True} +o_SettingsHome_SettingsHome = {"container": o_Gui_MainView, "objectName": "_SettingsHome", "type": "SettingsHome", "visible": True} +o_SettingsHome_touchItem_TouchRect = {"container": o_SettingsHome_SettingsHome, "id": "_touchItem", "type": "TouchRect", "unnamed": 1, "visible": True} +o_SettingsHome_touchItem_DG_cleaning = {"container": o_SettingsHome_SettingsHome, "text": "DG Cleaning", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_SettingsDG = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsDG", "visible": True} +o_SettingsBase_row_Row = {"container": o_SettingsBase_SettingsDG, "id": "_row", "type": "Row", "unnamed": 1, "visible": True} +o_SettingsBase_NotificationBar_NotificationBarSmall = {"container": o_SettingsBase_SettingsDG,"objectName": "NotificationBar", "type": "NotificationBarSmall", "visible": True} +o_SettingsBase_TouchRect = {"container": o_SettingsBase_SettingsDG, "type": "TouchRect", "unnamed": 1, "visible": True} +o_SettingsBase_image_Image = {"container": o_SettingsBase_SettingsDG, "id": "_image", "source": "qrc:/images/iBack", "type": "Image", "unnamed": 1, "visible": True} +treatment_mouseArea = {"container": o_Gui_MainView, "text": "Treatment", "type": "Text", "unnamed": 1, "visible": True} +o_disinfectHome_backButton_BackButton = {"container": o_DisinfectStack_disinfectHome_TreatmentFlowBase, "objectName": "_backButton", "type": "BackButton", "visible": True} - Index: tst_disinfection/test.py =================================================================== diff -u -r3ace203ca9373d52c55f1720c10342a791c0cbba -r87ea45e25ed216636ef669a3b6b3f579aec21669 --- tst_disinfection/test.py (.../test.py) (revision 3ace203ca9373d52c55f1720c10342a791c0cbba) +++ tst_disinfection/test.py (.../test.py) (revision 87ea45e25ed216636ef669a3b6b3f579aec21669) @@ -21,7 +21,9 @@ from configuration import config from configuration import utility from dialin.common.dg_defs import DGHeatDisinfectStates, DGChemicalDisinfectStates, DGFlushStates +from dialin.utils.conversions import integer_to_bytearray, unsigned_integer_to_bytearray from dialin.common.hd_defs import HDOpSubModes, HDOpModes +from posix import utime DISINFECT_TREATMENT_OBJECT = { @@ -184,8 +186,45 @@ chemical_disinfect_count+=1 if chemical_disinfect_count != 0: return chemical_disinfect_count + + +def verify_disinfection_from_settings_path(): + """ + Method to verify Disinfection from Settings Path. + @param : None + @return: None + """ + test.startSection("Verification of Disinfection from settings path.") + hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_STAN.value,HDOpSubModes.STANDBY_WAIT_FOR_TREATMENT_STATE.value) + mouseClick(waitForObject(names.o_touchRect2_TouchRect)) + test.log("User is navigated to DG Cleaning from settings") + mouseClick(waitForObject(names.o_SettingsHome_touchItem_DG_cleaning)) + + test.startSection("Section to verify rejection mode message from settings DG cleaning.") + for rejection in range(1, config.NUM_OF_REQUEST_REJECT_REASONS + 1): + hd_simulator.cmd_send_hd_general_response(message_id=155, accepted=0, reason=rejection, is_pure_data=False, has_parameters=False) + utils.waitForGUI(0.1) + rejection_message = waitForObjectExists(names.o_SettingsBase_NotificationBar_NotificationBarSmall) + test.compare(rejection_message.text, config.REJECTION_REASON[rejection], "expected rejection {msg} displayed".format(msg=config.REJECTION_REASON[rejection])) + test.endSection() + hd_simulator.cmd_send_hd_general_response(message_id=155, accepted=1, reason=0) + test.log("verified DG cleaning acceptance condition.") + + mouseClick(waitForObject(names.o_SettingsBase_TouchRect)) + test.log("User clicked on 'DG Cleaning' button -> Message ID : 154") + + mouseClick(waitForObject(names.o_SettingsBase_image_Image)) + hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_STAN.value,HDOpSubModes.STANDBY_WAIT_FOR_DISINFECT_STATE.value) + + utils.waitForGUI(1) + test.compare(waitForObject(names.o_disinfectHome_backButton_BackButton).text.text, config.BACK_TEXT, "Message : 154 is verified from UI to HD") + mouseClick(waitForObject(names.o_disinfectHome_backButton_BackButton)) + + test.endSection() + + def verify_chemical_disinfect(): """ Method to verify Chemical Disinfect from Disinfection. @@ -214,6 +253,8 @@ for right_arrow in range(list_of_bullets-1): mouseClick(waitForObject(names.o_disinfectChemical_rightImage_Image)) test.log("user clicked on right image arrow for the navigation -> "+str(right_arrow)) + + test.log("Verification of confirm button - Message : 127") mouseClick(waitForObject(names.o_disinfectChemical_confirmButton_TouchRect)) verify_request_rejection_mode("Chemical") @@ -240,6 +281,8 @@ test.compare(waitForObjectExists(names.o_disinfectHeat_headStepBullet_StepBullet).text, config.DISINFECT_TEXT, "Disinfection text should be visible") test.verify(waitForObjectExists(names.o_disinfectHeat_confirmButton_TouchRect).enabled, "confirm button must be active") + + test.log("Verification of confirm button - Message : 127") mouseClick(waitForObject(names.o_disinfectHeat_confirmButton_TouchRect)) verify_request_rejection_mode("Heat") @@ -266,6 +309,8 @@ test.compare(waitForObjectExists(names.o_disinfectFlush_headStepBullet_StepBullet).text, config.DISINFECT_TEXT, "Disinfection text should be visible") test.verify(waitForObjectExists(names.o_disinfectFlush_confirmButton_TouchRect).enabled, "confirm button must be active") + + test.log("Verification of confirm button - Message : 127") mouseClick(waitForObject(names.o_disinfectFlush_confirmButton_TouchRect)) verify_request_rejection_mode("Flush") @@ -274,7 +319,6 @@ mouseClick(waitForObject(names.o_disinfectFlush_backButton_BackButton)) test.endSection() - def main(): utils.tstStart(__file__) @@ -283,7 +327,9 @@ verify_chemical_disinfect() verify_heat_disinfect() verify_water_flush() + verify_disinfection_states() + verify_disinfection_from_settings_path() utils.tstDone()