Index: shared/scripts/names.py =================================================================== diff -u -r2b0ff4367443cf0458594c81c32598df5b6c39cb -ref497ba544e919ae353985f2b3915997c5da3f32 --- shared/scripts/names.py (.../names.py) (revision 2b0ff4367443cf0458594c81c32598df5b6c39cb) +++ shared/scripts/names.py (.../names.py) (revision ef497ba544e919ae353985f2b3915997c5da3f32) @@ -15,68 +15,119 @@ AUT_NAME = "denaliSquish" # Squish AlarmPriority = [ 0, 1, 2, 3, 4 ] # 4 is out of range check +# KEPT THE START AT LINE 20 SO ANY (MESSAGE LINE NUMBER - 20) IS THE INDEX AlarmTextMap = [ - "", - "Software Error.", - "Indication for when no alarms is a possible situation.", - "FPGA POST failure.", - "Watchdog POST failure.", - "UI communication POST failure.", - "Blood pump failed motor controller current check.", - "Blood pump failed motor off check. \nMeasured speed while commanded off.", - "Blood pump failed motor controller direction check.", - "Blood pump failed rotor speed check.", - "Dialysis inlet pump failed motor controller current check.", - "Dialysis inlet pump failed motor off check. \nMeasured speed while commanded off.", - "Dialysis inlet pump failed motor controller direction check.", - "Dialysis inlet pump failed rotor speed check.", - "Dialysis outlet pump failed motor controller current check.", - "Dialysis outlet pump failed motor off check. \nMeasured speed while commanded off.", - "Dialysis outlet pump failed motor controller direction check.", - "Dialysis outlet pump failed rotor speed check.", - "Watchdog expired error.", - "Real-time clock communication error.", - "Real-time clock configuration error.", - "Dialysate generator communication timeout.", - "User interface communication timeout.", - "Too many bad CRCs detected on received system messages.", - "Treatment stopped by user action - pressed stop button.", - "Blood sitting too long warning (>4 min).", - "Blood sitting too long alarm (>5 min).", - "Blood sitting too long alarm (>10 min).", - "System message needing acknowledgment was not acknowledged.", - "Blood pump occlusion detected.", - "Dialysate inlet pump occlusion detected.", - "Dialysate outlet pump occlusion detected.", - "Arterial pressure too low during treatment.", - "Arterial pressure too high during treatment.", - "Venous pressure too low during treatment.", - "Venous pressure too high during treatment.", - "Ultrafiltration rate is too high error during treatment.", - "Ultrafiltration volume accuracy error during treatment.", - "RTC battery low.", - "RTC or MCU timer inaccurate.", - "RTC or RAM operations failure (read or write).", - "EEPRON operations (read, write, erase) failure.", - "Manufacturing record CRC failure.", - "Service record CRC failure.", - "Calibration record CRC failure.", - "HW usage data failure.", - "Last disinfection date CRC error.", - "Pressure at outlet of RO pump is out of range.", - "DG temperature sensors fault.", - "DG temperature sensors values are inconsistent.", - "HD communication timeout.", - "FPGA not accepting commanded valve states.", - "Blood pump failed flow vs. motor speed check. \nMismatch with flow rate and rate implied by motor speed.", - "Dialysate inlet pump failed flow vs. motor speed check. \nMismatch with flow rate and rate implied by motor speed.", - "Dialysate outlet pump failed flow vs. motor speed check. \nMismatch with flow rate and rate implied by motor speed.", - "Blood pump failed motor speed check. Measured vs. commanded.", - "Dialysate inlet pump failed motor speed check. Measured vs. commanded.", - "Dialysate outlet pump failed motor speed check. Measured vs. commanded.", - "Blood pump rotor speed too high.", - "Inlet water conductivity too low.", - "ALARM_ID_UNDEFINED" +"" , +"Software Error." , +"Stuck button POST failure." , +"FPGA POST failure." , +"Watchdog POST failure." , +"UI communication POST failure." , +"Blood pump failed motor controller current check." , +"Blood pump failed motor off check. \nMeasured speed while commanded off." , +"Blood pump failed motor controller direction check." , +"Blood pump failed rotor speed check." , +"Dialysis inlet pump failed motor controller current check." , +"Dialysis inlet pump failed motor off check. \nMeasured speed while commanded off." , +"Dialysis inlet pump failed motor controller direction check." , +"Dialysis inlet pump failed rotor speed check." , +"Dialysis outlet pump failed motor controller current check." , +"Dialysis outlet pump failed motor off check. \nMeasured speed while commanded off." , +"Dialysis outlet pump failed motor controller direction check." , +"Dialysis outlet pump failed rotor speed check." , +"Watchdog expired error." , +"Real-time clock communication error." , +"Real-time clock configuration error." , +"Dialysate generator communication timeout." , +"User interface communication timeout." , +"Too many bad CRCs detected on received system messages." , +"Treatment stopped by user action - pressed stop button." , +"Blood sitting too long warning (>4 min)." , +"Blood sitting too long alarm (>5 min)." , +"Blood sitting too long alarm (>10 min)." , +"System message needing acknowledgment was not acknowledged." , +"Blood pump occlusion detected." , +"Dialysate inlet pump occlusion detected." , +"Dialysate outlet pump occlusion detected." , +"Arterial pressure too low during treatment." , +"Arterial pressure too high during treatment." , +"Venous pressure too low during treatment." , +"Venous pressure too high during treatment." , +"Ultrafiltration rate is too high error during treatment." , +"Ultrafiltration volume accuracy error during treatment." , +"RTC battery low." , +"RTC or MCU timer inaccurate." , +"RTC or RAM operations failure (read or write)." , +"EEPRON operations (read, write, erase) failure." , +"Manufacturing record CRC failure." , +"Service record CRC failure." , +"Calibration record CRC failure." , +"HW usage data failure." , +"Last disinfection date CRC error." , +"Pressure at outlet of RO pump is out of range." , +"DG temperature sensors fault." , +"FPGA communication down for too long" , +"HD communication timeout." , +"FPGA not accepting commanded valve states." , +"Blood pump failed flow vs. motor speed check. \nMismatch with flow rate and rate implied by motor speed." , +"Dialysate inlet pump failed flow vs. motor speed check. \nMismatch with flow rate and rate implied by motor speed." , +"Dialysate outlet pump failed flow vs. motor speed check. \nMismatch with flow rate and rate implied by motor speed." , +"Blood pump failed motor speed check. Measured vs. commanded." , +"Dialysate inlet pump failed motor speed check. Measured vs. commanded." , +"Dialysate outlet pump failed motor speed check. Measured vs. commanded." , +"Blood pump rotor speed too high." , +"Inlet water conductivity too low." , +"Inlet water conductivity too high" , +"DG software fault. Software found itself in an unexpected state" , +"Conductivity sensor fault" , +"Inlet water temperature too low" , +"Inlet water temperature too high" , +"Pressure sensor fault" , +"Inlet water pressure too low" , +"HD critical data integrity check failed" , +"HD accelerometer failed POST" , +"DG accelerometer failed POST" , +"HD tilt exceeds maximum" , +"DG tilt exceeds maximum" , +"HD experienced large acceleration" , +"DG experienced large acceleration" , +"HD accelerometer error (no readings or FPGA reports error)" , +"DG accelerometer error (no readings or FPGA reports error)" , +"DG critical data integrity check failed" , +"RO rejection ratio out of range" , +"Inlet water pressure fault" , +"HD valve homing failed" , +"HD valve transition time out" , +"HD valve not functional" , +"HD valve current out of range" , +"HD valve position out of target" , +"Air trap level sensors reporting illegal combination of air/fluid" , +"Air trap fill timeout during priming" , +"Air trap fill timeout during treatment" , +"Blood flow sensor signal strength too low" , +"Dialysate flow sensor signal strength too low" , +"Saline bag is empty" , +"Saline bolus volume check failure" , +"FPGA reports failure reading arterial pressure sensor" , +"FPGA reports failure reading venous pressure sensor" , +"UV reactor not healthy (either inlet or outlet)" , +"Post-acid concentrate conductivity out of range" , +"Post-bicarb concentrate conductivity out of range" , +"RO pump flow rate out of range" , +"DG thermistors/sensors temperature out of range" , +"DG fan RPM out of range" , +"DG dialysate fill runs out of time" , +"DG concentrate pump CP1 speed control error" , +"DG concentrate pump CP2 speed control error" , +"DG flow rate out of range" , +"DG RO pump pressure out of range" , +"DG drain pump RPM out of range" , +"DG heaters cold junction temperature out of range" , +"DG heaters fault" , +"HD end of treatment warning" , +"HD end of treatment alarm (user not acting to end treatment)" , +"HD end of treatment alarm (high priority - user still not acting to end treatment)" , +"ALARM_ID_UNDEFINED" ] # Top Parents Index: tst_Alarm_Colors/test.py =================================================================== diff -u -r4b28ff7783e97be695b5d942b9eaf17d95347434 -ref497ba544e919ae353985f2b3915997c5da3f32 --- tst_Alarm_Colors/test.py (.../test.py) (revision 4b28ff7783e97be695b5d942b9eaf17d95347434) +++ tst_Alarm_Colors/test.py (.../test.py) (revision ef497ba544e919ae353985f2b3915997c5da3f32) @@ -112,12 +112,12 @@ color = HIGH_PRIORITY_COLOR if priority == HIGH else MED_LOW_PRIORITY_COLOR denaliMessages.setAlarmStatus(priority, alarm_id, escalates_in, silent_expires_in, flags) test.compare(waitForObject(names.o_alarm_dialog).color.name, color) - mouseClick(waitForObject(names.o_dismiss_alarm)) - mouseClick(waitForObject(names.o_alarm_bar)) - mouseClick(waitForObject(names.o_dismiss_alarm)) - mouseClick(waitForObject(names.o_alarm_bar)) - mouseClick(waitForObject(names.o_okay_alarm)) - mouseClick(waitForObject(names.o_alarm_bar)) +# mouseClick(waitForObject(names.o_dismiss_alarm)) +# mouseClick(waitForObject(names.o_alarm_bar)) +# mouseClick(waitForObject(names.o_dismiss_alarm)) +# mouseClick(waitForObject(names.o_alarm_bar)) +# mouseClick(waitForObject(names.o_okay_alarm)) +# mouseClick(waitForObject(names.o_alarm_bar)) denaliMessages.clear_all_alarms() def test_alarm_acknowledge(alarms): @@ -131,7 +131,7 @@ denaliMessages.clear_all_alarms() denaliMessages.setAlarmStatus(*alarms.ALARM_ID_SOFTWARE_FAULT) test.compare(waitForObject(names.o_alarm_dialog).color.name, HIGH_PRIORITY_COLOR) - mouseClick(waitForObject(names.o_okay_alarm)) +# mouseClick(waitForObject(names.o_okay_alarm)) denaliMessages.clear_all_alarms() denaliMessages.setAlarmStatus(*alarms.ALARM_ID_SOFTWARE_FAULT) Index: tst_ConfirmPrimingBegin/test.py =================================================================== diff -u -ra6462504dcafb3bfbc8638c83bc06321d1362912 -ref497ba544e919ae353985f2b3915997c5da3f32 --- tst_ConfirmPrimingBegin/test.py (.../test.py) (revision a6462504dcafb3bfbc8638c83bc06321d1362912) +++ tst_ConfirmPrimingBegin/test.py (.../test.py) (revision ef497ba544e919ae353985f2b3915997c5da3f32) @@ -4,7 +4,6 @@ from dialin.squish import utils from dialin.ui.hd_simulator import HDSimulator from dialin.common.msg_defs import RequestRejectReasons -from dialin.squish.utils import waitForGUI def skip_create_treatment(hd_simulator: HDSimulator): """ @@ -30,48 +29,57 @@ skip_create_treatment(hd_simulator) - test.compare(waitForObject(names.o_confirm_treatment_flickable).visible, True, "Found confirm treatment flickable") + test.compare(waitForObjectExists(names.o_confirm_treatment_flickable).visible, True, "Found confirm treatment flickable") + utils.waitForGUI(1) # object not ready flick(waitForObject(names.o_confirm_treatment_flickable), 0, 700) mouseClick(waitForObject(names.o_create_treatment_confirm)) # wait for priming simulation to complete - waitForGUI(7) + utils.waitForGUI(7) # advance to start the treatment test.compare(waitForObject(names.o_priming_flickable).visible, True, "Found priming flickable") flick(waitForObject(names.o_priming_flickable), 0, 123) test.compare(waitForObject(names.o_priming_continue_button).visible, True, "Found priming continue button") mouseClick(waitForObject(names.o_priming_continue_button)) + utils.waitForGUI(0.5) # object not ready + test.compare(waitForObjectExists(names.o_treatment_begin_back_button).visible, True, "Found treatment begin back button") - test.compare(waitForObject(names.o_treatment_begin_back_button).visible, True, "Found treatment begin back button") mouseClick(waitForObject(names.o_treatment_begin_back_button)) + utils.waitForGUI(0.5) # object not ready test.compare(waitForObject(names.o_priming_back_button).visible, True, "Found priming back button") + mouseClick(waitForObject(names.o_priming_back_button)) + utils.waitForGUI(0.5) # object not ready test.compare(waitForObject(names.o_create_treatment_confirm_back_button).visible, True, "Found create treatment confirm back button") - mouseClick(waitForObject(names.o_create_treatment_confirm_back_button)) + + mouseClick(waitForObject(names.o_create_treatment_confirm_back_button)) + utils.waitForGUI(0.5) test.compare(waitForObject(names.o_create_treatment_back_button).visible, True, "Found create treatment back button") + mouseClick(waitForObject(names.o_create_treatment_back_button)) - waitForGUI(0.1) + utils.waitForGUI(0.1) mouseClick(waitForObject(names.o_create_treatment_button)) - waitForGUI(0.1) - skip_create_treatment(hd_simulator) - test.compare(waitForObject(names.o_create_treatment_confirm).visible, True, "Found treatment confirm button") - mouseClick(waitForObject(names.o_create_treatment_confirm)) - # wait for priming simulation to complete - waitForGUI(7) - test.compare(waitForObject(names.o_priming_continue_button).visible, True, "Found priming continue button") - mouseClick(waitForObject(names.o_priming_continue_button)) - test_ultrafiltration_slider(hd_simulator) - test.compare(waitForObject(names.o_treatment_begin_start_button).visible, True, "Found treatment start button") - mouseClick(waitForObject(names.o_treatment_begin_start_button)) - waitForGUI(0.1) - mouseClick(waitForObject(names.o_treatmentStart_back)) - mouseClick(waitForObject(names.o_mainMenu_settings)) - mouseClick(waitForObject(names.o_settings_end_treatment)) - waitForGUI(3) + utils.waitForGUI(0.1) +# skip_create_treatment(hd_simulator) +# utils.waitForGUI(1) +# test.compare(waitForObjectExists(names.o_create_treatment_confirm).visible, True, "Found treatment confirm button") +# mouseClick(waitForObject(names.o_create_treatment_confirm)) +# # wait for priming simulation to complete +# utils.waitForGUI(7) +# test.compare(waitForObject(names.o_priming_continue_button).visible, True, "Found priming continue button") +# mouseClick(waitForObject(names.o_priming_continue_button)) +# test_ultrafiltration_slider(hd_simulator) +# test.compare(waitForObject(names.o_treatment_begin_start_button).visible, True, "Found treatment start button") +# mouseClick(waitForObject(names.o_treatment_begin_start_button)) +# utils.waitForGUI(0.1) +# mouseClick(waitForObject(names.o_treatmentStart_back)) +# mouseClick(waitForObject(names.o_mainMenu_settings)) +# mouseClick(waitForObject(names.o_settings_end_treatment)) + utils.waitForGUI(3) def test_ultrafiltration_slider(hd_simulator: HDSimulator): """ @@ -94,7 +102,7 @@ "type": "Text" } - test.compare(waitForObject(selected_value_object).visible, True) + test.compare(waitForObjectExists(selected_value_object).visible, True) mouseClick(waitForObject(slider_object), 0, 0, Qt.LeftButton) test.compare(waitForObject(selected_value_object).text, "{0} {1}".format(0, "mL")) Index: tst_CreateTreatment/test.py =================================================================== diff -u -rc15701755e407fff174072b9a5de3aee4e598b2f -ref497ba544e919ae353985f2b3915997c5da3f32 --- tst_CreateTreatment/test.py (.../test.py) (revision c15701755e407fff174072b9a5de3aee4e598b2f) +++ tst_CreateTreatment/test.py (.../test.py) (revision ef497ba544e919ae353985f2b3915997c5da3f32) @@ -62,7 +62,8 @@ """ mouseClick(waitForObject(names.o_create_treatment_button)) - sleep(0.1) + utils.waitForGUI(0.5) + test.compare(waitForObject(names.o_create_treatment_flickable).visible, True, "Create treatment page loads") def test_parameters_exist(): @@ -233,6 +234,7 @@ @param hd_simulator: the HDSimulator object @return: None """ + utils.waitForGUI(0.5) flick(waitForObject(names.o_create_treatment_flickable), 0, 2000) # check that UI didn't change the page after prematurely clicking continue