Index: tst_serviceshutdown/test.py =================================================================== diff -u -r07424ed0ae21343ce77bab04d3376e38fe135435 -r788873f840aecda5508a2479839e1beb2e0cc75b --- tst_serviceshutdown/test.py (.../test.py) (revision 07424ed0ae21343ce77bab04d3376e38fe135435) +++ tst_serviceshutdown/test.py (.../test.py) (revision 788873f840aecda5508a2479839e1beb2e0cc75b) @@ -2,6 +2,8 @@ import names import time +import subprocess +import shlex ################################################################################ # This test need to be changed when the Service screen has been implemented # @@ -23,6 +25,8 @@ test.compare(waitForObjectExists(names.o_poweroffButton).visible, True) # Click on shutdown button mouseClick (waitForObjectExists(names.o_poweroffButton)) + # Sending can message to show Power off dialog + subprocess.call(shlex.split('cansend can0 020#A5.01.00.01.00.6F.00.00')) # The PowerOff screen shall have a shutdown button test.compare(waitForObjectExists(names.o_poweroff_shutdown).visible, True) # Click on the PowerOff Dialog's shutdown button @@ -34,12 +38,30 @@ test.compare(waitForObjectExists(names.o_poweroffButton).visible, True) # Click on shutdown button mouseClick (waitForObjectExists(names.o_poweroffButton)) + # Sending can message to show Power off dialog + subprocess.call(shlex.split('cansend can0 020#A5.01.00.01.00.6F.00.00')) # The PowerOff screen shall have a Cancel button test.compare(waitForObjectExists(names.o_poweroff_cancel).visible, True) # Click on the PowerOff Dialog's Cancel button mouseClick (waitForObjectExists(names.o_poweroff_cancel)) # Wait for the animation + + #SRSUI 556 + test.compare(waitForObjectExists(names.o_poweroffButton).visible, True) + # Sending can message to show Power off dialog + subprocess.call(shlex.split('cansend can0 020#A5.01.00.01.00.6F.00.00')) + # Test the Power Off dialog is visible upon HD Request + + test.compare(waitForObjectExists(names.o_powerOffDialog).visible, True) + # wait for user reaction and if there is no reaction timeout time.sleep(1) + # Sending can message to Hide Power off dialog + subprocess.call(shlex.split('cansend can0 020#A5.01.00.01.01.5E.00.00')) + # Wait for the animation + time.sleep(1) + # Test the Power Off dialog is hidden upon HD Request after timeout + #so the entry screen with power off button is visible again. + test.compare(waitForObjectExists(names.o_poweroffButton).visible, True , "SRSUI 556") # Go back to Home Screen mouseClick (waitForObjectExists(names.o_mainMenu_treatment))