Index: shared/scripts/configuration/strings.py =================================================================== diff -u -rfafc6e0cf130380ef845bd0519ef31049a3fbec4 -ra53831cea0eb42896e18bba5fd32e47c667e4c61 --- shared/scripts/configuration/strings.py (.../strings.py) (revision fafc6e0cf130380ef845bd0519ef31049a3fbec4) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision a53831cea0eb42896e18bba5fd32e47c667e4c61) @@ -13,10 +13,6 @@ # ############################################################################ - - - - #Disinfection string constants DISINFECT_TEXT = "Disinfection" CHEMICAL_DISINFECT_TEXT = "Chemical Disinfect" Index: shared/scripts/configuration/utility.py =================================================================== diff -u -rfafc6e0cf130380ef845bd0519ef31049a3fbec4 -ra53831cea0eb42896e18bba5fd32e47c667e4c61 --- shared/scripts/configuration/utility.py (.../utility.py) (revision fafc6e0cf130380ef845bd0519ef31049a3fbec4) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision a53831cea0eb42896e18bba5fd32e47c667e4c61) @@ -12,7 +12,6 @@ # ############################################################################ - import squish import object import names Index: shared/scripts/names.py =================================================================== diff -u -rfafc6e0cf130380ef845bd0519ef31049a3fbec4 -ra53831cea0eb42896e18bba5fd32e47c667e4c61 --- shared/scripts/names.py (.../names.py) (revision fafc6e0cf130380ef845bd0519ef31049a3fbec4) +++ shared/scripts/names.py (.../names.py) (revision a53831cea0eb42896e18bba5fd32e47c667e4c61) @@ -49,71 +49,54 @@ o_MainHome_Create_Treatment_Button = {"container": o_MainHome_MainHome, "text": "CREATE TREATMENT", "type": "Text", "unnamed": 1, "visible": True} - +##Below set of objects are belongs to Disinfection-it is the combination of Heat,Flush and chemical disinfection. +#Disinfection o_DisinfectStack_DisinfectStack = {"container": o_Gui_MainView, "objectName": "_DisinfectStack", "type": "DisinfectStack", "visible": True} o_DisinfectStack_disinfectHome_TreatmentFlowBase = {"container": o_DisinfectStack_DisinfectStack, "objectName": "_disinfectHome", "type": "TreatmentFlowBase", "visible": True} o_disinfectHome_TouchRect = {"container": o_DisinfectStack_disinfectHome_TreatmentFlowBase, "type": "TouchRect", "unnamed": 1, "visible": True} o_disinfectHome_swipeview_SwipeView = {"container": o_DisinfectStack_disinfectHome_TreatmentFlowBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} o_swipeview_Disinfection1_Text = {"container": o_disinfectHome_swipeview_SwipeView, "text": "Disinfection1", "type": "Text", "unnamed": 1, "visible": True} o_swipeview_Disinfection2_Text = {"container": o_disinfectHome_swipeview_SwipeView, "text": "Disinfection2", "type": "Text", "unnamed": 1, "visible": True} o_swipeview_Repeater = {"container": o_disinfectHome_swipeview_SwipeView, "index": 0, "type": "Repeater", "unnamed": 1, "visible": True} -o_swipeview_Item = {"container": o_disinfectHome_swipeview_SwipeView, "index": 0, "occurrence": 3, "type": "Item", "unnamed": 1, "visible": True} +#Chemical-Disinfect o_disinfectHome_Chemical_Disinfect = {"container": o_DisinfectStack_disinfectHome_TreatmentFlowBase, "text": "Chemical Disinfect", "type": "Text", "unnamed": 1, "visible": True} o_DisinfectStack_disinfectChemical_TreatmentFlowBase = {"container": o_DisinfectStack_DisinfectStack, "objectName": "_disinfectChemical", "type": "TreatmentFlowBase", "visible": True} o_disinfectChemical_Chemical_Disinfect_Text = {"container": o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "occurrence": 2, "text": "Chemical Disinfect", "type": "Text", "unnamed": 1, "visible": True} o_disinfectChemical_rightImage_Image = {"container": o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} o_disinfectChemical_leftImage_Image = {"container": o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} o_disinfectChemical_Chemical_Disinfect_Text_2 = {"container": o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "text": "Chemical Disinfect", "type": "Text", "unnamed": 1, "visible": True} o_disinfectChemical_Disinfection_Text = {"container": o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "text": "Disinfection", "type": "Text", "unnamed": 1, "visible": True} - o_disinfectChemical_gridStepsRest_Grid = {"container": o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "id": "_gridStepsRest", "occurrence": 2, "type": "Grid", "unnamed": 1, "visible": True} o_disinfectChemical_gridStepsRest_Grid_2 = {"container": o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "id": "_gridStepsRest", "occurrence": 3, "type": "Grid", "unnamed": 1, "visible": True} -# = {"container": o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "id": "_tailStepsRepeater", "occurrence": 2, "type": "Repeater", "unnamed": 1, "visible": True} o_disinfectChemical_headStepBullet_StepBullet = {"container": o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "id": "_headStepBullet", "occurrence": 2, "type": "StepBullet", "unnamed": 1, "visible": True} o_disinfectChemical_gridSteps_Grid = {"container": o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "id": "_gridSteps", "occurrence": 2, "type": "Grid", "unnamed": 1, "visible": True} o_disinfectChemical_confirmButton_TouchRect = {"container": o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} o_disinfectChemical_NotificationBar_NotificationBar = {"container": o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "objectName": "NotificationBar", "type": "NotificationBar", "visible": True} -#o_disinfectHeat_NotificationBar_NotificationBar = {"container": o_DisinfectStack_disinfectHeat_TreatmentFlowBase, "objectName": "NotificationBar", "type": "NotificationBar", "visible": True} -#o_disinfectFlush_NotificationBar_NotificationBar = {"container": o_DisinfectStack_disinfectFlush_TreatmentFlowBase, "objectName": "NotificationBar", "type": "NotificationBar", "visible": True} - - - - o_disinfectChemical_back_navigation = {"container": o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "text": "BACK", "type": "Text", "unnamed": 1, "visible": True} o_disinfectHome_Heat_Disinfect = {"container": o_DisinfectStack_disinfectHome_TreatmentFlowBase, "text": "Heat Disinfect", "type": "Text", "unnamed": 1, "visible": True} o_DisinfectStack_disinfectHeat_TreatmentFlowBase = {"container": o_DisinfectStack_DisinfectStack, "objectName": "_disinfectHeat", "type": "TreatmentFlowBase", "visible": True} +#Disinfection-bullet verification o_disinfect_dynamic_StepBullet = {"type": "StepBullet", "unnamed": 1, "visible": True} o_disinfect_dynamic_StepBullet_Text = {"type": "Text", "unnamed": 1, "visible": True} - - -o_DisinfectStack_disinfectFlush_TreatmentFlowBase = {"container": o_DisinfectStack_DisinfectStack, "objectName": "_disinfectFlush", "type": "TreatmentFlowBase", "visible": True} +#Heat-Disinfection o_disinfectHeat_Heat_Disinfect_Text = {"container": o_DisinfectStack_disinfectHeat_TreatmentFlowBase, "occurrence": 2, "text": "Heat Disinfect", "type": "Text", "unnamed": 1, "visible": True} o_disinfectHeat_nextStepsBullet_StepBullet = {"container": o_DisinfectStack_disinfectHeat_TreatmentFlowBase, "id": "_nextStepsBullet", "type": "StepBullet", "unnamed": 1, "visible": True} - - - - o_disinfectHeat_headStepBullet_StepBullet = {"container": o_DisinfectStack_disinfectHeat_TreatmentFlowBase, "id": "_headStepBullet", "type": "StepBullet", "unnamed": 1, "visible": True} o_disinfectHeat_confirmButton_TouchRect = {"container": o_DisinfectStack_disinfectHeat_TreatmentFlowBase, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} - o_disinfectHeat_NotificationBar_NotificationBar = {"container": o_DisinfectStack_disinfectHeat_TreatmentFlowBase, "objectName": "NotificationBar", "type": "NotificationBar", "visible": True} o_disinfectHeat_backButton_BackButton = {"container": o_DisinfectStack_disinfectHeat_TreatmentFlowBase, "objectName": "_backButton", "type": "BackButton", "visible": True} - - - +#Flush-Disinfection +o_DisinfectStack_disinfectFlush_TreatmentFlowBase = {"container": o_DisinfectStack_DisinfectStack, "objectName": "_disinfectFlush", "type": "TreatmentFlowBase", "visible": True} o_disinfectFlush_Water_Flush_Text = {"container": o_DisinfectStack_disinfectFlush_TreatmentFlowBase, "occurrence": 2, "text": "Water Flush", "type": "Text", "unnamed": 1, "visible": True} o_disinfectFlush_nextStepsBullet_StepBullet = {"container": o_DisinfectStack_disinfectFlush_TreatmentFlowBase, "id": "_nextStepsBullet", "type": "StepBullet", "unnamed": 1, "visible": True} o_disinfectFlush_headStepBullet_StepBullet = {"container": o_DisinfectStack_disinfectFlush_TreatmentFlowBase, "id": "_headStepBullet", "type": "StepBullet", "unnamed": 1, "visible": True} o_disinfectFlush_confirmButton_TouchRect = {"container": o_DisinfectStack_disinfectFlush_TreatmentFlowBase, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} o_disinfectFlush_NotificationBar_NotificationBar = {"container": o_DisinfectStack_disinfectFlush_TreatmentFlowBase, "objectName": "NotificationBar", "type": "NotificationBar", "visible": True} - - +#Home-Disinfection o_MainHome_NotificationBar_NotificationBar = {"container": o_MainHome_MainHome, "objectName": "NotificationBar", "type": "NotificationBar", "visible": False} 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} o_disinfectHome_Disinfection_Text = {"container": o_DisinfectStack_disinfectHome_TreatmentFlowBase, "occurrence": 2, "text": "Disinfection", "type": "Text", "unnamed": 1, "visible": True} - - Index: tst_disinfection/test.py =================================================================== diff -u -rfafc6e0cf130380ef845bd0519ef31049a3fbec4 -ra53831cea0eb42896e18bba5fd32e47c667e4c61 --- tst_disinfection/test.py (.../test.py) (revision fafc6e0cf130380ef845bd0519ef31049a3fbec4) +++ tst_disinfection/test.py (.../test.py) (revision a53831cea0eb42896e18bba5fd32e47c667e4c61) @@ -15,7 +15,6 @@ # This test contradicts verification of Disinfection from Application UI # section - import names from dialin.ui import utils from dialin.ui.hd_simulator import HDSimulator @@ -30,24 +29,25 @@ "Chemical" : names.o_DisinfectStack_disinfectChemical_TreatmentFlowBase, "Heat" : names.o_DisinfectStack_disinfectHeat_TreatmentFlowBase, "Flush" : names.o_DisinfectStack_disinfectFlush_TreatmentFlowBase - } + DISINFECT_NOTIFICATION_OBJECT = { "Chemical" : names.o_disinfectChemical_NotificationBar_NotificationBar, "Heat" : names.o_disinfectHeat_NotificationBar_NotificationBar, "Flush" : names.o_disinfectFlush_NotificationBar_NotificationBar - } hd_simulator = HDSimulator() -dg_simulator = DGSimulator() def verify_right_navigation_for_chemical_disinfection(num_of_instructions, indicator_object, left_arrow_object, right_arrow_object): """ The method is used to verify the functionality of the right arrow in the disinfection navigation, as well as the visibility of the two arrows - @ - + @param num_of_instructions (Int): Number of training screen - (it is dynamically figuring from Application) + @param indicator_object (Dict): page step indicator object + @param left_arrow_object (Dict): Object of left arrow from disinfection type + @param right_arrow_object (Dict): Object of right arrow from disinfection type + @returns : None """ test.startSection("Rightward navigation") test.verify(not object.exists(left_arrow_object), "The left navigation arrow should not be present on the first screen of instruction") @@ -67,7 +67,12 @@ def verify_left_navigation_for_chemical_disinfection(num_of_instructions, indicator_object, left_arrow_object, right_arrow_object): """ The method is used to verify the functionality of the left arrow in the instruction navigation, as well as the visibility of the two arrows - """ + @param num_of_instructions (Int): Number of training screen - (it is dynamically figuring from Application) + @param indicator_object (Dict): page step indicator object + @param left_arrow_object (Dict): Object of left arrow from disinfection type + @param right_arrow_object (Dict): Object of right arrow from disinfection type + @returns : None + """ test.startSection("Leftward instruction navigation") test.verify(not object.exists(right_arrow_object), "The right navigation arrow should not be present on the last screen of instruction") @@ -86,7 +91,11 @@ def verify_bullet_navigation(num_of_instructions, indicator, indicator_object): """ - This method verifies the properties of the bullets present in the instruction navigation screen + This method verifies the properties of the bullets present in the instruction navigation screen. + @param num_of_instructions (Int): Number of training screen - (it is dynamically figuring from Application) + @param indicator_object (Dict): page step indicator(bullet) object + @param indicator (Int): Current position index of indicator + @returns : None """ test.startSection("Instruction bullet verification for screens " + str(indicator)) child = object.children(waitForObject(indicator_object)) @@ -108,11 +117,14 @@ def verify_request_rejection_mode(item): """ - Method to verify rejection mode of create custom treatment + Method to verify rejection mode of create custom treatment. + @param item (String): Disinfection type -(Flush,Heat or Chemical) + @return: None """ test.startSection("Section to verify rejection mode of create custom treatment") for rejection in range(1, config.NUM_OF_REQUEST_REJECT_REASONS + 1): hd_simulator.cmd_send_hd_disinfect_response(accepted = 0, reason = rejection) + utils.waitForGUI(0.1) rejection_message = waitForObjectExists(DISINFECT_NOTIFICATION_OBJECT[item]) test.compare(rejection_message.text, config.REJECTION_REASON[rejection], "expected rejection {msg} displayed".format(msg=config.REJECTION_REASON[rejection])) test.endSection() @@ -121,13 +133,19 @@ def verify_confirm_disinfect(): """ Method to accept treatment response. + @param : None + @return: None """ - test.startSection("Section to accept treatment response") + test.log("Section to accept treatment response") hd_simulator.cmd_send_hd_disinfect_response(accepted = 1, reason = 0) - test.endSection() + def verify_disinfection_states(): - + """ + Method to verify Disinfection Home page. This test covers the disinfection states. + @param : None + @return: None + """ test.startSection("Section to verifies disinfection states") hd_simulator.cmd_send_hd_operation_mode(op_mode = 3, sub_mode = 1) standby_status = waitForObjectExists(names.o_MainHome_NotificationBar_NotificationBar) @@ -139,7 +157,6 @@ verify_right_navigation_for_chemical_disinfection(list_of_bullets, names.o_disinfectHome_gridSteps_Grid, names.o_disinfectHome_leftImage_Image, names.o_disinfectHome_rightImage_Image) verify_left_navigation_for_chemical_disinfection(list_of_bullets, names.o_disinfectHome_gridSteps_Grid, names.o_disinfectHome_leftImage_Image, names.o_disinfectHome_rightImage_Image) - #NB: Disinfection states are yet to be added - Future development #verification of chemical disinfection states for chemical_mode_state in range(DGChemicalDisinfectStates.NUM_OF_DG_CHEM_DISINFECT_STATES.value): @@ -154,8 +171,13 @@ test.compare(waitForObjectExists(names.o_disinfectHome_Disinfection_Text).text, config.DISINFECT_TEXT, "Disinfection text is verified !") test.endSection() + def get_dynamic_bullet_count(bullet_object): - + """ + Method to get indicator count dynamically from application. + @param bullet_object (Dict): Object of disinfection type. + @return chemical_disinfect_count (Int): Number of page step indicator. + """ chemical_disinfect_count = 0 child = object.children(waitForObject(bullet_object)) for dynamic_indicator_count in range (len(child)): @@ -166,7 +188,11 @@ def verify_chemical_disinfect(): - + """ + Method to verify Chemical Disinfect from Disinfection. + @param : None + @return: None + """ test.startSection("Verification of chemical disinfection.") hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_STAN.value,HDOpSubModes.STANDBY_WAIT_FOR_DISINFECT_STATE.value) mouseClick(waitForObject(names.o_disinfectHome_Chemical_Disinfect)) @@ -201,7 +227,11 @@ def verify_heat_disinfect(): - + """ + Method to verify Heat Disinfect from Disinfection. + @param : None + @return: None + """ test.startSection("Verification of heat disinfection.") hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_STAN.value,HDOpSubModes.STANDBY_WAIT_FOR_DISINFECT_STATE.value) mouseClick(waitForObject(names.o_disinfectHome_Heat_Disinfect)) @@ -223,7 +253,11 @@ def verify_water_flush(): - + """ + Method to verify water Flush from Disinfection. + @param : None + @return: None + """ test.startSection("Verification of Water Flush.") hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_STAN.value,HDOpSubModes.STANDBY_WAIT_FOR_DISINFECT_STATE.value) mouseClick(waitForObject(names.o_disinfectHome_TouchRect)) @@ -242,6 +276,7 @@ test.endSection() + def main(): utils.tstStart(__file__) @@ -255,5 +290,3 @@ utils.tstDone() - -