Index: tst_settings_date_and_time/test.py =================================================================== diff -u -raa6920723efd6d2e2212b3305b03677c033b0621 -raabf1b3f92efc95e93c54ef70fe9d2bb374ef6fc --- tst_settings_date_and_time/test.py (.../test.py) (revision aa6920723efd6d2e2212b3305b03677c033b0621) +++ tst_settings_date_and_time/test.py (.../test.py) (revision aabf1b3f92efc95e93c54ef70fe9d2bb374ef6fc) @@ -44,7 +44,9 @@ DATE_AND_TIME_MESSAGE = "AdjustHDDateTime" INCORRECT_PASSWORD = "abcd" INCORRECT_PASSWORD_MSG = "Incorrect service password" +SERVICE_SCREEN_OPTIONS = ["Information", "Volume And Brightness", "Wi-Fi", "Bluetooth Cuff", "Dialysate Generator Settings", "Set Date And Time", "Set Language", "Software Update", "Factory Reset", "Calibration ", ] + def settings_text_obj(text): names.o_settings_home_text_obj["text"] = text return names.o_settings_home_text_obj @@ -86,8 +88,8 @@ mouseClick(waitForObjectExists(services_screen_text_obj(config.CONFIRM_TEXT))) incorrect_password_text = waitForObjectExists(settings_text_obj(INCORRECT_PASSWORD_MSG)) test.compare(incorrect_password_text.text, INCORRECT_PASSWORD_MSG, "{} message should display upon entering wrong password".format(INCORRECT_PASSWORD_MSG)) - test.endSection() + def navigate_to_services_password_screen_and_enter_password(): """ Method to navigate to services screen @@ -99,12 +101,13 @@ mouseClick(waitForObjectExists(settings_text_obj(config.SERIVCES_TITLE))) services_password_title = waitForObjectExists(services_screen_text_obj(SERVICES_TITLE_TEXT)) test.compare(services_password_title.text, SERVICES_TITLE_TEXT, "{} should display once user is navigated to services password screen".format(SERVICES_TITLE_TEXT)) + utils.waitForGUI(0.5) verify_incorrect_password_msg() - utils.waitForGUI(0.2) + utils.waitForGUI(0.5) mouseClick(waitForObjectExists(settings_text_obj(config.SERIVCES_TITLE))) utils.waitForGUI(0.5) test.log("Clicking on password entry field") - utils.waitForGUI(0.3) + utils.waitForGUI(0.5) mouseClick(waitForObjectExists(names.o_switch_keyboard_to_keypad)) mouseClick(waitForObjectExists(names.o_password_text_field)) with open(SERVICE_CONF_LOCATION, "r") as file: @@ -130,6 +133,9 @@ test.log("Verifying the 'Shutdown' button enabled") test.compare(str(waitForObjectExists(names.o_shutdown_text).text), config.SHUTDOWN_TEXT,"'SHUTDOWN' button text should be {}".format(config.SHUTDOWN_TEXT)) test.compare(waitForObjectExists(names.o_shutdown_text).enabled , True, "'SHUTDOWN' button should be enabled") + for option in SERVICE_SCREEN_OPTIONS: + option_text = waitForObjectExists(settings_text_obj(option)) + test.compare(option_text.text, option, "{} should be available under services screen".format(option)) test.endSection() @@ -169,7 +175,7 @@ time_title_text = time_row_children[TITLE_OBJECT_ITEM_NUMBER_0] date_title_text = date_row_children[TITLE_OBJECT_ITEM_NUMBER_0] test.log("Verifying time title text") - test.compare(time_title_text.text, TIME_TITLE, "{} shoule be the time title text".format(TIME_TITLE)) + test.compare(time_title_text.text, TIME_TITLE, "{} should be the time title text".format(TIME_TITLE)) test.log("Verifying date title text") test.compare(date_title_text.text, DATE_TITLE_TEXT, "{} should be the date title text".format(DATE_TITLE_TEXT)) hour_parent = time_row_children[1] @@ -278,7 +284,6 @@ if not(object.exists(date_time_screen_text_obj(text=config.CONFIRM_TEXT))): test.passes("Confirm button is not available") - def main(): utils.tstStart(__file__)