# -*- coding: utf-8 -*-" ## # Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. # copyright # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, # IN PART OR IN WHOLE, # WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # file tst_settings_information # date 04/29/2022 # author Papiya Mandal # author Akshay Dhawan import names import datetime import test from dialin.ui import utils from configuration import config,utility from dialin.ui.hd_simulator import HDSimulator from dialin.common.hd_defs import HDOpModes hd_simulator = HDSimulator() def verify_settings_parameters(): test.compare(str(waitForObjectExists(names.o_SettingsHome_Clear_Alarm_Condition_Text).text), config.SettingsHome_Clear_Alarm_Condition_Text, "Text should be Clear Alarm Condition") test.compare(waitForObject(names.o_SettingsHome_Clear_Alarm_Condition_Text).enabled, True, "Clear Alarm Condition button should be enabled") test.compare(str(waitForObjectExists(names.o_SettingsHome_Export_Text).text), config.SettingsHome_Export_Text, "Text should be Export") test.compare(waitForObject(names.o_SettingsHome_Export_Text).enabled, True, "Export button should be enabled") test.compare(waitForObject(names.o_SettingsHome_image_Image_2).enabled, True, "UP button should be enabled") mouseClick(waitForObjectExists(names.o_SettingsHome_image_Image_2)) utils.waitForGUI(1) # test.compare(waitForObject(names.o_SettingsHome_Export_Text).enabled, False, "Export button should be disabled") test.compare(str(waitForObjectExists(names.o_SettingsHome_Device_Settings_Text).text), config.SettingsHome_Device_Settings_Text, "Text should be Device Settings") test.compare(str(waitForObjectExists(names.o_SettingsHome_Information_Text).text), config.SettingsHome_Information_Text, "Text should be Information") test.compare(str(waitForObjectExists(names.o_SettingsHome_Volume_And_Brightness_Text).text), config.SettingsHome_Volume_And_Brightness_Text, "Text should be Volume And Brightness") test.compare(str(waitForObjectExists(names.o_SettingsHome_Wi_Fi_Text).text), config.SettingsHome_Wi_Fi_Text, "Text should be Wi-Fi") test.compare(str(waitForObjectExists(names.o_SettingsHome_Bluetooth_Cuff_Text).text), config.SettingsHome_Bluetooth_Cuff_Text, "Text should be Bluetooth Cuff") test.compare(str(waitForObjectExists(names.o_SettingsHome_Dialysate_Generator_Settings_Text).text), config.SettingsHome_Dialysate_Generator_Settings_Text, "Text should be Dialysate Generator Settings") test.compare(str(waitForObjectExists(names.o_SettingsHome_Services_Text).text), config.SettingsHome_Services_Text, "Text should be Services") test.compare(str(waitForObjectExists(names.o_treatment_Text).text), config.SettingsHome_Treatment_Text, "Text should be Treatment") test.compare(str(waitForObjectExists(names.o_manager_Text).text), config.SettingsHome_Manager_Text, "Text should be Manager") test.compare(str(waitForObjectExists(names.o_settings_Text).text), config.SettingsHome_Settings_Text, "Text should be Settings") def verify_information(): test.compare(str(waitForObjectExists(names.o_SettingsBase_Information_Text).text), config.SettingsBase_Information_Text, "Text should be Information") test.compare(str(waitForObjectExists(names.o_SettingsBase_Versions_Text).text), config.SettingsBase_Versions_Text, "Text should be Versions") test.compare(str(waitForObjectExists(names.o_SettingsBase_UI_Version_Text).text), config.SettingsBase_UI_Version_Text, "Text should be UI Version") test.compare(str(waitForObjectExists(names.o_SettingsBase_HD_Version_Text).text), config.SettingsBase_HD_Version_Text, "Text should be HD Version") test.compare(str(waitForObjectExists(names.o_SettingsBase_HD_FPGA_Version_Text).text), config.SettingsBase_HD_FPGA_Version_Text, "Text should be HD FPGA Version") test.compare(str(waitForObjectExists(names.o_SettingsBase_HD_Serial_Number_Text).text), config.SettingsBase_HD_Serial_Number_Text, "Text should be HD Serial Number") test.compare(str(waitForObjectExists(names.o_SettingsBase_DG_Version_Text).text), config.SettingsBase_DG_Version_Text, "Text should be DG Version") test.compare(str(waitForObjectExists(names.o_SettingsBase_DG_FPGA_Version_Text).text), config.SettingsBase_DG_FPGA_Version_Text, "Text should be DG FPGA Version") test.compare(str(waitForObjectExists(names.o_SettingsBase_DG_Serial_Number).text), config.SettingsBase_DG_Serial_Number, "Text should be DG Serial Number") test.compare(str(waitForObjectExists(names.o_SettingsBase_Services_Text).text), config.SettingsBase_Services_Text, "Text should be Services") test.compare(str(waitForObjectExists(names.o_SettingsBase_HD_Last_Service_Date_Text).text), config.SettingsBase_HD_Last_Service_Date_Text, "Text should be HD Last Service Date") test.compare(str(waitForObjectExists(names.o_SettingsBase_HD_Next_Service_Date_Text).text), config.SettingsBase_HD_Next_Service_Date_Text, "Text should be HD Next Service Date") test.compare(str(waitForObjectExists(names.o_SettingsBase_DG_Last_Service_Date_Text).text), config.SettingsBase_DG_Last_Service_Date_Text, "Text should be DG Last Service Date") test.compare(str(waitForObjectExists(names.o_SettingsBase_DG_Next_Service_Date_Text).text), config.SettingsBase_DG_Next_Service_Date_Text, "Text should be DG Next Service Date") def main(): utils.tstStart(__file__) startApplication(config.AUT_NAME) hd_simulator.cmd_send_hd_operation_mode(op_mode = 3, sub_mode = 0) mouseClick(waitForObjectExists(names.o_settings_Text)) verify_settings_parameters() mouseClick(waitForObjectExists(names.o_SettingsHome_image_Image)) #clicking on Information arrow mark verify_information() utils.tstDone()