Index: shared/scripts/names.py =================================================================== diff -u -r5e50c9793e8200292af43dec8657e659a16deca4 -r07424ed0ae21343ce77bab04d3376e38fe135435 --- shared/scripts/names.py (.../names.py) (revision 5e50c9793e8200292af43dec8657e659a16deca4) +++ shared/scripts/names.py (.../names.py) (revision 07424ed0ae21343ce77bab04d3376e38fe135435) @@ -22,3 +22,9 @@ o_settingsHome = {"container": o_QQuickView , "id": "_settingsHome" , "type": "ScreenItem", "unnamed": 1, "visible": True} o_settingsHome_background = {"container": o_settingsHome, "id": "_backgroundRect", "type": "Rectangle" , "unnamed": 1, "visible": True} +# Power off +o_poweroffButton = {"container": o_settingsHome, "id": "_poweroff" , "type": "TouchRect" , "unnamed": 1, "visible": True} +o_powerOffDialog = {"container": o_QQuickView , "id": "_powerOffDialog", "type": "ModalDialog", "unnamed": 1, "visible": True} +o_poweroff_shutdown = {"container": o_QQuickView , "id": "_shutdownRect" , "type": "TouchRect" , "unnamed": 1, "visible": True} +o_poweroff_cancel = {"container": o_QQuickView , "id": "_cancelTouch" , "type": "TouchRect" , "unnamed": 1, "visible": True} + Index: suite.conf =================================================================== diff -u -r5e50c9793e8200292af43dec8657e659a16deca4 -r07424ed0ae21343ce77bab04d3376e38fe135435 --- suite.conf (.../suite.conf) (revision 5e50c9793e8200292af43dec8657e659a16deca4) +++ suite.conf (.../suite.conf) (revision 07424ed0ae21343ce77bab04d3376e38fe135435) @@ -1,9 +1,10 @@ AUT=denali +CWD= ENVVARS=envvars HOOK_SUB_PROCESSES=false IMPLICITAUTSTART=0 LANGUAGE=Python OBJECTMAPSTYLE=script -TEST_CASES=tst_pythonversion tst_homescreen +TEST_CASES=tst_pythonversion tst_homescreen tst_serviceshutdown VERSION=3 WRAPPERS=Qt Index: tst_homescreen/test.py =================================================================== diff -u -ra49c5743cd8623446d0e9387367299aa18d7831b -r07424ed0ae21343ce77bab04d3376e38fe135435 --- tst_homescreen/test.py (.../test.py) (revision a49c5743cd8623446d0e9387367299aa18d7831b) +++ tst_homescreen/test.py (.../test.py) (revision 07424ed0ae21343ce77bab04d3376e38fe135435) @@ -3,13 +3,13 @@ import names def main(): - startApplication("denali") + startApplication("denaliSquish") test.compare( waitForObjectExists(names.o_treatmentHome).visible, True) test.compare(str(waitForObjectExists(names.o_treatmentHome_startTreatment ).text.text), "START TREATMENT" , "SRSUI 024") test.compare(str(waitForObjectExists(names.o_treatmentHome_createTreatment).text.text), "CREATE TREATMENT" , "SRSUI 532") - test.compare( waitForObjectExists(names.o_mainMenu).visible, True , "SRSUI xxx") + test.compare( waitForObjectExists(names.o_mainMenu).visible, True) test.compare(str(waitForObjectExists(names.o_mainMenu_treatment).text.text), "Treatment" , "SRSUI 534") test.compare(str(waitForObjectExists(names.o_mainMenu_manager ).text.text), "Manager" , "SRSUI 026") test.compare(str(waitForObjectExists(names.o_mainMenu_settings ).text.text), "Settings" , "SRSUI 028") Index: tst_serviceshutdown/test.py =================================================================== diff -u --- tst_serviceshutdown/test.py (revision 0) +++ tst_serviceshutdown/test.py (revision 07424ed0ae21343ce77bab04d3376e38fe135435) @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- + +import names +import time + +################################################################################ +# This test need to be changed when the Service screen has been implemented # +# This is only checking the functionality exists and it's working # +################################################################################ + +def main(): + startApplication("denaliSquish") + + # Check the Home screen has the settings button on the Main Menu + test.compare(str(waitForObjectExists(names.o_mainMenu_settings ).text.text), "Settings" , "SRSUI 028") + + # Click on Settings button on the Main Menu + mouseClick (waitForObjectExists(names.o_mainMenu_settings )) + # Upon depress the settings screen shall be visible + test.compare(waitForObjectExists(names.o_settingsHome ).visible, True , "SRSUI 029") + + # Check the shutdown button exists + test.compare(waitForObjectExists(names.o_poweroffButton).visible, True) + # Click on shutdown button + mouseClick (waitForObjectExists(names.o_poweroffButton)) + # 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 + mouseClick (waitForObjectExists(names.o_poweroff_shutdown)) + # Wait for the animation + time.sleep(1) + + # Going back to the screen which has the PowerOff screen + test.compare(waitForObjectExists(names.o_poweroffButton).visible, True) + # Click on shutdown button + mouseClick (waitForObjectExists(names.o_poweroffButton)) + # 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 + time.sleep(1) + + # Go back to Home Screen + mouseClick (waitForObjectExists(names.o_mainMenu_treatment)) + test.compare(waitForObjectExists(names.o_treatmentHome).visible, True , "SRSUI 535") + + print(0) +