Index: suite_leahi/tst_rinseback/test.py =================================================================== diff -u -rfa71e89d96d4822d2174d6ba9650807ef000c1a6 -rc3fed566691f30e31d3880f6b70cc26d626b5873 --- suite_leahi/tst_rinseback/test.py (.../test.py) (revision fa71e89d96d4822d2174d6ba9650807ef000c1a6) +++ suite_leahi/tst_rinseback/test.py (.../test.py) (revision c3fed566691f30e31d3880f6b70cc26d626b5873) @@ -38,10 +38,9 @@ from leahi_dialin.common.td_defs import TDOpModes,TDTreatmentStates from leahi_dialin.utils import conversions -td =TD_Messaging() -can_interface = td.can_interface -rinsebackrequest = None -# request ="[1] Request is not allowed in the current operating mode" +td = TD_Messaging() +can_interface = td.can_interface +rinsebackrequest = None def change_treatmentstates(state,substate): test.startSection("Change the treatment parameter") @@ -162,13 +161,30 @@ vCountdown = 84, vIsCompleted = 0) timeouttext = waitForObject(names.o_EndTreatmentRinseback_timeout_TimeText, 2000) - test.log(str(timeouttext.time)) + timeoutValue = str(timeouttext.time) + test.compare(timeoutValue,"01:24","Rinseback paused text should be'{}'".format(timeoutValue)) mouseClick(waitForObject(names.o_EndTreatmentRinseback_pauseResumeButton_TouchRect, 2000)) - test.verify(waitFor( lambda: rinsebackrequest == 4, 3000), "Testing FW received Arterial Window Value") + test.verify(waitFor( lambda: rinsebackrequest == 4, 3000), "Testing FW received Resume Rinseback request") change_treatmentstates( TDTreatmentStates.TREATMENT_RINSEBACK_STATE.value, TXStates.RINSEBACK_RUN_STATE) test.endSection() +def verify_increment_decrement_rinseback_values(): + test.startSection("Verify the increment and decrement values in rinseback flow values ") + incrementButton = waitForObject(names.o_EndTreatmentRinseback_incrementFlowRateButton_ArrowButton,1000) + mouseClick(incrementButton) + test.verify(waitFor( lambda: rinsebackrequest == 1, 3000), "Testing FW received Increment value") + decrementButton =waitForObject(names.o_EndTreatmentRinseback_decrementFlowRateButton_ArrowButton,1000) + mouseClick(decrementButton) + test.verify(waitFor( lambda: rinsebackrequest == 2, 3000), "Testing FW received Decrement Value") + endRinseback = waitForObject(names.o_EndTreatmentRinseback_endButton_TouchRect,2000) + mouseClick(endRinseback) + test.verify(waitFor( lambda: rinsebackrequest == 5, 3000), "Testing FW received End Rinseback Value") + change_treatmentstates( TDTreatmentStates.TREATMENT_RINSEBACK_STATE.value, + TXStates.RINSEBACK_STOP_STATE) + + test.endSection() + def main(): utils.tstStart(__file__) startApplication(config.AUT_NAME) @@ -183,28 +199,18 @@ verify_pressure_value() verify_flow_values_rinseback() verify_pause_rinseback() - verify_resume_rinseback + verify_resume_rinseback() + verify_increment_decrement_rinseback_values() - #Increment and decremenet Rinseback - incrementButton = waitForObject(names.o_EndTreatmentRinseback_incrementFlowRateButton_ArrowButton,1000) - mouseClick(incrementButton) - test.verify(waitFor( lambda: rinsebackrequest == 1, 3000), "Testing FW received Arterial Window Value") - decrementButton =waitForObject(names.o_EndTreatmentRinseback_decrementFlowRateButton_ArrowButton,1000) - mouseClick(decrementButton) - test.verify(waitFor( lambda: rinsebackrequest == 2, 3000), "Testing FW received Arterial Window Value") - endRinseback = waitForObject(names.o_EndTreatmentRinseback_endButton_TouchRect,2000) - mouseClick(endRinseback) - test.verify(waitFor( lambda: rinsebackrequest == 5, 3000), "Testing FW received Arterial Window Value") - change_treatmentstates( TDTreatmentStates.TREATMENT_RINSEBACK_STATE.value, - TXStates.RINSEBACK_STOP_STATE) - + test.startSection("Verify the screen changes to Rinseback complete page") test.verify(waitForObjectExists(names.o_EndTreatmentRinsebackComplete_instructionView_InstructionView), "In Rinseback complete page") + test.endSection() + utils.tstDone() -