Index: tst_ui_alarms_dialog/test.py =================================================================== diff -u -r7ec619e4740a21f0e6dee6421f59638baaba4c6c -r316fd2f51b0fa89c0f69949d79ef246e1e4bc4ed --- tst_ui_alarms_dialog/test.py (.../test.py) (revision 7ec619e4740a21f0e6dee6421f59638baaba4c6c) +++ tst_ui_alarms_dialog/test.py (.../test.py) (revision 316fd2f51b0fa89c0f69949d79ef246e1e4bc4ed) @@ -1,15 +1,19 @@ # -*- coding: utf-8 -*-" -# Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. -# copyright -# THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, -# IN PART OR IN WHOLE, -# WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. +########################################################################### # -# file tst_post -# @author (last) Joseph varghese -# @date (last) 02-Feb-2022 -# This test contradicts verification of ui alarms dialog -# section +# Copyright (c) 2022-2025 Diality Inc. - All Rights Reserved. +# +# THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN +# WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. +# +# @file test.py +# +# @author (last) Behrouz NematiPour +# @date (last) 12-Jun-2024 +# @author (original) joseph_varghese +# @date (original) 04-Feb-2022 +# +############################################################################ import csv import names @@ -109,7 +113,7 @@ @output N/A """ mouseClick(waitForObject(names.o_alarm_button_minimize)) - utils.waitForGUI(1) # this wait is necessary. Due to dialog animation it will be hide until the animation is done. + utils.waitForGUI(0.2) # this wait is necessary. Due to dialog animation it will be hide until the animation is done. def maximize(): @@ -119,7 +123,7 @@ @output N/A """ mouseClick(waitForObject(names.o_alarm_bar_maximize)) - utils.waitForGUI(1) # this wait is necessary. Due to dialog animation it will be hide until the animation is done. + utils.waitForGUI(0.2) # this wait is necessary. Due to dialog animation it will be hide until the animation is done. def test_button(flag, vButtons): @@ -155,20 +159,18 @@ if waitForObjectExists(names.o_alarm_button_ok ).visible: # Ok button obj = waitForObjectExists(names.o_ok_button_mouse_area) if obj.visible : mouseClick(obj) - utils.waitForGUI(0.5) if waitForObjectExists(names.o_alarm_button_resume ).visible: # Resume button obj = waitForObjectExists(names.o_resume_button_mouse_Area) if obj.visible : mouseClick(obj) - utils.waitForGUI(0.5) if waitForObjectExists(names.o_alarm_button_rinseback ).visible: # Rinse back button obj = waitForObjectExists(names.o_rinseback_mouse_area) if obj.visible : mouseClick(obj) - utils.waitForGUI(0.5) if waitForObjectExists(names.o_alarm_button_end ).visible: # End button obj = waitForObjectExists(names.o_end_button_mouse_area) if obj.visible : mouseClick(obj) - utils.waitForGUI(0.5) + utils.waitForGUI(0.2) + alarm.cmd_alarm_condition_cleared(alarm_id = 1) def test_all_buttons(): @@ -262,7 +264,7 @@ #enables alarm 4 and press all buttons on screen flag_status = alarm.cmd_make_alarm_flags(no_resume=0, no_rinseback=0, no_end_treatment=0, user_must_ack=1, no_minimize=1, alarms_silenced=1) alarm.cmd_activate_alarm_id(state = 2, alarm = 4, flags = flag_status) - utils.waitForGUI(1) + utils.waitForGUI(0.2) test_all_buttons() test.endSection() @@ -300,7 +302,6 @@ test.compare(str(waitForObjectExists(names.o_alarm_bar_text ).text), config.UNDEFINED_ALARM_ID_MSG.format(alarm_id), "verified alarm message for exceeded alarm id's") else: test.log(str(alarm_id)) -# utils.waitForGUI(0.5) test.compare(str(waitForObjectExists(names.o_alarm_text_description).text), alarm_info_dict[alarm_id]['message'], "Alarm message is verified from alarm dialog box") minimize() test.compare(str(waitForObjectExists(names.o_alarm_bar_text ).text), alarm_info_dict[alarm_id]['title'], "Alarm title is verified from alarm bar") @@ -356,14 +357,15 @@ """ test.startSection("verification of alarm bar parameters") alarm_info_dict = utility.extract_alarm_info_from_alarms_conf_file() - for alarm_id in range(0, config.NUM_OF_ALARM_ID): + + for alarm_id in range(0, config.NUM_OF_ALARM_ID): # VY TODO change to length of dictionary # for alarm_id in [73]: if alarm_id == config.ALARM_ID_NO_ALARM: test.log("validate alarm condition for alarm id : 0") alarm.cmd_set_alarm_cleared_condition(alarm_id = 0) alarm.cmd_activate_alarm_id(0, 0, 0, 0, 0) - utils.waitForGUI() + utils.waitForGUI(0.2) dlg = names.o_modalDialog bar = names.o_alarm_bar dlg_exists = object.exists(dlg)