Index: tst_settings_information/test.py =================================================================== diff -u -r219c2c375514eb26ecddaa87c8b3e1add4a2749b -r31eeb7c6928da240d5d4461b03d370629ea2b0eb --- tst_settings_information/test.py (.../test.py) (revision 219c2c375514eb26ecddaa87c8b3e1add4a2749b) +++ tst_settings_information/test.py (.../test.py) (revision 31eeb7c6928da240d5d4461b03d370629ea2b0eb) @@ -63,27 +63,31 @@ DNS_TEXT_INDEX = 1 - def services_screen_text_obj(text): names.o_services_screen_text_obj["text"] = text return names.o_services_screen_text_obj + def settings_text_obj(text): names.o_settings_home_text_obj["text"] = text return names.o_settings_home_text_obj + def settings_base_text_obj(text): names.o_settings_base_text_obj["text"] = text return names.o_settings_base_text_obj + def service_date_obj(text): names.o_service_date_obj["text"] = text return names.o_service_date_obj + def volume_and_brightness_text_obj(text): names.o_SettingsBase_Volume_And_Brightness_Text["text"] = text return names.o_SettingsBase_Volume_And_Brightness_Text + def verify_settings_parameters(): """ Method to verify the buttons @@ -95,6 +99,7 @@ test.compare(parameter_text.text, parameter, "{} should be available under 'Device Settings' screen".format(parameter)) test.endSection() + def verify_parameters_under_information(): """ Method to verify the parameter under 'Information'\ @@ -120,18 +125,20 @@ test.compare(services_par_text.text, services_parameter, "{} should be available under services".format(services_parameter)) test.endSection() + def navigate_to_settings_screen(): """ Method to navigate to "Settings" screen """ test.startSection("Navigating to 'Device Settings' screen") hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_STAN.value, sub_mode=HDOpModes.MODE_FAUL.value) utils.waitForGUI(1) - mouseClick(waitForObjectExists(names.o_settings_Text)) + mouseClick(waitForObjectExists(names.o_settings_Text)) device_settings_text = waitForObjectExists(settings_text_obj(config.DEVICE_SETTINGS_TEXT)) test.compare(device_settings_text.text, config.DEVICE_SETTINGS_TEXT, "{} screen is displayed".format(config.DEVICE_SETTINGS_TEXT)) test.endSection() + def verify_hd_and_dg_versions(hd_major, hd_minor, hd_micro, hd_build, hd_fpga_id, hd_fpga_major, hd_fpga_minor, hd_fpga_lab, hd_compatibility_rev, hd_serial, dg_major, dg_minor, dg_micro, dg_build, dg_fpga_id, dg_fpga_major, @@ -197,6 +204,7 @@ continue test.endSection() + def verify_service_date(hd_day, hd_month, hd_year, hd_interval_days, dg_day, dg_month, dg_year, dg_interval_days): """ Method to simulate the 'HD last service date', @@ -238,6 +246,7 @@ test.compare(dg_next_service_date_text.text, dg_next_service_date, "'DG last service date' should be {}".format(dg_next_service_date)) test.endSection() + def verify_volume_and_brightness_section(): """ Method to verify "Volume and Brightness" screen @@ -261,6 +270,7 @@ utils.waitForGUI(1) test.endSection() + def adjust_and_verify_alarm_volume(volume): """ Method to set the Alarm volume and verify the @@ -305,6 +315,7 @@ test.compare(current_alarm_volume_val, expected_alarm_volume, "Current Alarm volume should be {}".format(expected_alarm_volume)) test.endSection() + def verify_alarm_volume(): """ Method to loop through different alarm volume @@ -315,13 +326,14 @@ back_btn = waitForObjectExists(volume_and_brightness_text_obj(config.BACK_TEXT)) mouseClick(back_btn) + def verify_wifi_setting(): """ Method to verify "Wi-Fi" screen """ test.startSection("Verifying Wi-Fi setting") utils.waitForGUI(0.2) - mouseClick(waitForObjectExists(names.o_SettingsHome_Wi_Fi_Text)) + mouseClick(waitForObjectExists(names.o_SettingsHome_mouseArea_MouseArea_2)) test.compare(waitForObjectExists(names.o_SettingsBase_Wi_Fi_Text).text, config.WIFI_TITLE_TEXT,"Wi-Fi Title must be {}".format(config.WIFI_TITLE_TEXT)) test.compare(waitForObjectExists(names.o_SettingsBase_IP_Address_Text).text, config.IP_ADDRESS_TEXT,"IP Address Text must be {}".format(config.IP_ADDRESS_TEXT)) test.compare(waitForObjectExists(names.o_SettingsBase_Gateway_Text).text, config.GATEWAY_TEXT,"Gateway Text must be {}".format(config.GATEWAY_TEXT)) @@ -340,11 +352,12 @@ test.log("Passing correct values to validate wifi parameters") utils.waitForGUI(0.5) verify_wifi_parameters("valid") - mouseClick(waitForObjectExists(names.o_SettingsBase_SCAN_Text)) + mouseClick(waitForObjectExists(names.o_SettingsBase_mouseArea_MouseArea_3)) test.compare(waitForObjectExists(names.o_SettingsBase_Scan_Finished_Text ).text, config.SCAN_FINISHED_TEXT,"Scan Finished Text must be {}".format(config.SCAN_FINISHED_TEXT)) mouseClick(waitForObjectExists(names.o_SettingsBase_mouseArea_MouseArea)) test.endSection() + def enter_address_value(param,entry): """ Method to enter user desired @@ -366,6 +379,7 @@ utils.waitForGUI(0.1) test.endSection() + def user_input_clear_option(param): """ Tests to clear retained inserted values @@ -380,6 +394,7 @@ type(waitForObject(param), "") utils.waitForGUI(0.1) + def verify_wifi_parameters(parameter): """ Method to enter and verify "Wi-Fi" screen parameters such as ip address, gateway, subnet mask and dns @@ -409,24 +424,26 @@ dns = object.children(waitForObjectExists(names.o_dns_object)) enter_address_value(names.o_dns_text_input,entry=str(config.DNS[parameter])) test.compare(dns[DNS_TEXT_INDEX].text, config.DNS[parameter], "DNS should be {}".format(config.DNS[parameter])) - mouseClick(waitForObjectExists(names.o_SettingsBase_SCAN_Text)) + mouseClick(waitForObjectExists(names.o_SettingsBase_mouseArea_MouseArea_3)) test.endSection() + def verify_bluetooth_cuff_setting(): """ Method to verify "Bluetooth Cuff" screen """ test.startSection("Verifying Bluetooth Cuff Setting") utils.waitForGUI(0.2) - mouseClick(waitForObjectExists(names.o_SettingsHome_Bluetooth_Cuff_Text)) + mouseClick(waitForObjectExists(names.o_SettingsHome_mouseArea_MouseArea)) test.compare(waitForObjectExists(names.o_SettingsBase_Bluetooth_Cuff_Text).text, config.BLUETOOTH_CUFF_TITLE_TEXT,"Bluetooth Cuff Title must be {}".format(config.BLUETOOTH_CUFF_TITLE_TEXT)) test.compare(waitForObjectExists(names.o_SettingsBase_Devices_Label).text, config.DEVICES_TEXT,"Devices must be {}".format(config.DEVICES_TEXT)) test.compare(waitForObjectExists(names.o_SettingsBase_SCAN_Text_2).text, config.SCAN_TEXT,"SCAN Text must be {}".format(config.SCAN_TEXT)) test.compare(waitForObjectExists(names.o_back_button).text, config.BACK_BUTTON_TEXT,"BACK Button Text must be {}".format(config.BACK_BUTTON_TEXT)) - mouseClick(waitForObjectExists(names.o_SettingsBase_SCAN_Text_2)) + mouseClick(waitForObjectExists(names.o_SettingsBase_mouseArea_MouseArea_4)) mouseClick(waitForObjectExists(names.o_SettingsBase_mouseArea_MouseArea_2)) test.endSection() + def verify_water_flush_heat_disinfection_dg_cleaning_setting(parameter): """ Method to enter and verify time and cycle (days) of water flush in DG cleaning @@ -452,6 +469,7 @@ test.compare(waitForObjectExists(names.o_SettingsBase_input_TextInput_10).text, config.HEAT_DISINFECTION_CYCLE[parameter], "Heat Disinfection Cycle(Days) should be {}".format(config.HEAT_DISINFECTION_CYCLE[parameter])) test.endSection() + def verify_dg_cleaning_setting(): """ Method to verify "DG Cleaning" screen @@ -475,6 +493,7 @@ mouseClick(waitForObjectExists(names.o_dg_cleaning_back_button)) test.endSection() + def verify_incorrect_password_response(): """ Method to verify message displayed on entering incorrect password in service screen @@ -493,6 +512,7 @@ test.compare(incorrect_password_text.text, INCORRECT_PASSWORD_MSG, "{} message should display upon entering wrong password".format(INCORRECT_PASSWORD_MSG)) test.endSection() + def verify_service_password_screen(): """         Method to navigate to services screen @@ -603,7 +623,5 @@ verify_dg_cleaning_setting() verify_service_password_screen() - - utils.tstDone() \ No newline at end of file