Index: tst_ServiceShutdown/test.py =================================================================== diff -u -rcea779e4d5eb422603a9194f6b9a01ec7e268612 -rcb8d48033154f4b36a6a05b6f31bd10390e84ac7 --- tst_ServiceShutdown/test.py (.../test.py) (revision cea779e4d5eb422603a9194f6b9a01ec7e268612) +++ tst_ServiceShutdown/test.py (.../test.py) (revision cb8d48033154f4b36a6a05b6f31bd10390e84ac7) @@ -15,40 +15,40 @@ import names from dialin.ui import globals, HDSimulator from dialin.ui import utils +HDSimulator = HDSimulator() - ################################################################################ # 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 test_MainMenu_CurrentItem(vSRSUI=""): # test.compare(waitForObjectExists(names.o_mainMenu).currentIndex, 0) - test.compare(str(waitForObjectExists(names.o_mainMenu).currentTitle), "Treatment", globals.SRSUI(vSRSUI)) + test.compare(str(waitForObjectExists(names.o_mainMenu).currentTitle), "Treatment", utils.SRSUI(vSRSUI)) def gotoScreenNtest_Contains_PowerOffButton(vSRSUI=""): mouseClick (waitForObjectExists(names.o_mainMenu_settings)) utils.waitForGUI() - test.compare(waitForObjectExists(names.o_settingsHome).visible, True, globals.SRSUI(vSRSUI)) + test.compare(waitForObjectExists(names.o_settingsHome).visible, True, utils.SRSUI(vSRSUI)) # the settings test page reverted back and it's no longer on the diagnostic page. #mouseClick(waitForObjectExists(names.o_diagnostics)) def gotoScreenNtest_Contains_TreatmentHome(vSRSUI=""): mouseClick (waitForObjectExists(names.o_mainMenu_treatment)) utils.waitForGUI() - test.compare(waitForObjectExists(names.o_treatmentHome).visible, True, globals.SRSUI(vSRSUI)) + test.compare(waitForObjectExists(names.o_treatmentHome).visible, True, utils.SRSUI(vSRSUI)) def showNtest_PowerOffDialog(vSRSUI=""): - HDSimulator.show_PowerOffDialog() + HDSimulator.cmd_show_poweroff_dialog() test_PowerOffDialog(vSRSUI) def hideNtest_PowerOffDialog(vSRSUI=""): - HDSimulator.hide_PowerOffDialog() + HDSimulator.cmd_hide_poweroff_dialog() test_PowerOffButton(vSRSUI) def showNtest_PowerOffNotificationDialog(vSRSUI=""): mSRSUI = globals.SRSUI(vSRSUI) - HDSimulator.show_PowerOffNotificationDialog() + HDSimulator.cmd_show_poweroff_notification_dialog() test.compare(str(waitForObjectExists(names.o_poweroff_notification).baseUrl.path), "/dialogs/AutoHideInfo.qml", mSRSUI + " - Dialog") constantPartOfTheMessage = "System is shutting down" test.compare(str(waitForObjectExists(names.o_poweroff_notification).text)[0:len(constantPartOfTheMessage)], constantPartOfTheMessage, mSRSUI + " - Message Text") @@ -57,7 +57,7 @@ def showNtest_PowerOffRejectionDialog(vSRSUI=""): mSRSUI = globals.SRSUI(vSRSUI) - HDSimulator.show_PowerOffRejectionDialog() + HDSimulator.cmd_show_poweroff_rejection_dialog() test.compare(str(waitForObjectExists(names.o_poweroff_rejection).baseUrl.path), "/dialogs/AutoHideInfo.qml", mSRSUI + " - Dialog") constantPartOfTheMessage = "Cannot shutdown during " # there might be the reason, concatenated at the end of the string. test.compare(str(waitForObjectExists(names.o_poweroff_rejection).text)[0:len(constantPartOfTheMessage)], constantPartOfTheMessage, mSRSUI + " - Message Text") @@ -66,18 +66,18 @@ def test_PowerOffButton(vSRSUI=""): - test.compare(waitForObjectExists(names.o_poweroffButton).visible, True, globals.SRSUI(vSRSUI)) + test.compare(waitForObjectExists(names.o_poweroffButton).visible, True, utils.SRSUI(vSRSUI)) def test_PowerOffDialog(vSRSUI=""): - test.compare(waitForObjectExists(names.o_modalDialog).visible, True, globals.SRSUI(vSRSUI)) + test.compare(waitForObjectExists(names.o_modalDialog).visible, True, utils.SRSUI(vSRSUI)) def testNclick_ShutdownButton_onPowerOffConfirm(vSRSUI=""): - test.compare(waitForObjectExists(names.o_poweroff_shutdown).visible, True, globals.SRSUI(vSRSUI)) + test.compare(waitForObjectExists(names.o_poweroff_shutdown).visible, True, utils.SRSUI(vSRSUI)) mouseClick (waitForObjectExists(names.o_poweroff_shutdown)) utils.waitForGUI (1) # Wait for the animation def testNclick_CancelButton_onPowerOffConfirm(vSRSUI=""): - test.compare(waitForObjectExists(names.o_poweroff_cancel).visible, True, globals.SRSUI(vSRSUI)) + test.compare(waitForObjectExists(names.o_poweroff_cancel).visible, True, utils.SRSUI(vSRSUI)) mouseClick (waitForObjectExists(names.o_poweroff_cancel)) utils.waitForGUI (1) # Wait for the animation @@ -93,7 +93,7 @@ test_MainMenu_CurrentItem(535) # 028 : The Home Screen shall display a "Settings" button. - test.compare(str(waitForObjectExists(names.o_mainMenu_settings).text.text), "Settings", globals.SRSUI(28)) + test.compare(str(waitForObjectExists(names.o_mainMenu_settings).text.text), "Settings", utils.SRSUI(28)) utils.waitForGUI() # 029 : Upon "Settings" button depress on the Home Screen; the UI shall navigate the user to the Device Settings Screen.