Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b -r4213d76652a6ccc9a8dec97a9f3b929b6e401226 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 4213d76652a6ccc9a8dec97a9f3b929b6e401226) @@ -12,7 +12,7 @@ # ############################################################################ - +import names import sys import test import squish @@ -108,3 +108,7 @@ raise LookupError("zone object is not in view to the user after " + \ "trying 100 times") + +def rejection_msg(text): + names.o_treatment_saline_notification_msg["text"] = text + return names.o_treatment_saline_notification_msg Index: shared/scripts/names.py =================================================================== diff -u -r20f71633acc71b9332335b30d882c45223e02c22 -r4213d76652a6ccc9a8dec97a9f3b929b6e401226 --- shared/scripts/names.py (.../names.py) (revision 20f71633acc71b9332335b30d882c45223e02c22) +++ shared/scripts/names.py (.../names.py) (revision 4213d76652a6ccc9a8dec97a9f3b929b6e401226) @@ -62,7 +62,7 @@ o_treatmentHome_delivered_unit = {"container": o_treatmentHome, "occurrence": 35, "type": "Text", "unnamed": 1, "visible": True} o_treatmentHome_ultrafiltrationTouchArea_TreatmentUltrafiltration = {"container": o_treatmentHome, "id": "_ultrafiltrationTouchArea", "type": "TreatmentUltrafiltration", "unnamed": 1, "visible": True} o_treatmentHome_startFluidButton_TouchRect = {"container": o_treatmentHome, "id": "_startFluidButton", "type": "TouchRect", "unnamed": 1, "visible": True} -o_treatment_notification_bar = {"container": ":o_treatmentHome", "occurrence": 3, "objectName": "NotificationBar", "type": "NotificationBarSmall", "visible": True} +o_treatment_saline_notification_msg = {"container": o_treatmentHome, "id": "_text", "type": "Text", "unnamed": 1, "visible": True} Index: tst_treatment_saline_data/test.py =================================================================== diff -u -rc34ef8c984d49d631b04cd06e2afb65499485f19 -r4213d76652a6ccc9a8dec97a9f3b929b6e401226 --- tst_treatment_saline_data/test.py (.../test.py) (revision c34ef8c984d49d631b04cd06e2afb65499485f19) +++ tst_treatment_saline_data/test.py (.../test.py) (revision 4213d76652a6ccc9a8dec97a9f3b929b6e401226) @@ -20,7 +20,7 @@ from dialin.ui.hd_simulator import HDSimulator from dialin.common.ui_defs import TXStates as txStates from dialin.common.msg_defs import RequestRejectReasons as rejectReason -from configuration import config +from configuration import config, utility #testing options for main treatment saline SALINE_BOLUS_TARGET = [0, 1, 25, 30, 50, 80, 70, 150, 180, 220, 250, 280, 300] @@ -97,7 +97,7 @@ # when rejected reason set 16 -> saline bolus in progress if (not accept_status): rejection_reason = rejectReason.REQUEST_REJECT_REASON_SALINE_BOLUS_IN_PROGRESS.value hd_simulator.cmd_set_saline_bolus_response(accepted = accept_status, reason = rejection_reason, target = target) - if (not accept_status): test.compare(findObject(names.o_treatment_notification_bar).text, config.REJECTION_REASON[rejection_reason], \ + if (not accept_status): test.compare(waitForObjectExists(utility.rejection_msg(config.REJECTION_REASON[rejection_reason])).text, config.REJECTION_REASON[rejection_reason], \ "expected rejection {msg} displayed".format(msg=config.REJECTION_REASON[rejection_reason])) #set saline transition state. @@ -120,7 +120,7 @@ test.startSection("verification of rejection messages on saline bolus") for rejection in range(1, config.NUM_OF_REQUEST_REJECT_REASONS): hd_simulator.cmd_set_saline_bolus_response(accepted = accept_status, reason = rejection, target = target) - rejection_message = findObject(names.o_treatment_notification_bar) + rejection_message = waitForObjectExists(utility.rejection_msg(config.REJECTION_REASON[rejection])) test.compare(rejection_message.text, config.REJECTION_REASON[rejection], "expected rejection {msg} displayed".format(msg=config.REJECTION_REASON[rejection])) test.endSection()