Index: shared/scripts/configuration/config.py =================================================================== diff -u -rc5ebcc21d4b278b866b7537b96a16342f4c77957 -r6d63d7b5300eff028710b831e233cd3692f42942 --- shared/scripts/configuration/config.py (.../config.py) (revision c5ebcc21d4b278b866b7537b96a16342f4c77957) +++ shared/scripts/configuration/config.py (.../config.py) (revision 6d63d7b5300eff028710b831e233cd3692f42942) @@ -15,15 +15,22 @@ import os from pathlib import Path +from configuration.strings import * -AUT_NAME = "denaliSquish -S" +AUT_NAME = "denaliSquish -k -K -S" CONFIG_PATH = Path(os.getcwd()) HOME_DIR_PATH = CONFIG_PATH.parent.parent.parent INP_BUF_FILE_LOCATION = "".join([str(HOME_DIR_PATH),'/Desktop/sd-card/cloudsync/']) CLOUD_CREDENTIALS_LOCATION = "".join([str(HOME_DIR_PATH)+'/Desktop/cloudsync/credentials']) LOG_LOCATION = "".join([str(HOME_DIR_PATH),'/Desktop/sd-card/log/']) ERROR_FILE_LOCATION = "".join([str(HOME_DIR_PATH)+'/Desktop/sd-card/service/']) +CLOUDSYNC_FOLDER_PATH = "".join([str(HOME_DIR_PATH)+'/Desktop/']) +SD_CARD_CLOUDSYNC_FOLDER_PATH = "".join([str(HOME_DIR_PATH)+'/Desktop/sd-card/']) +SD_CARD_LOCATION = "".join([str(HOME_DIR_PATH)+'/Desktop/']) +USB_DISK_FOLDER_LOCATION = "".join([str(HOME_DIR_PATH)+'/Desktop/']) +SETTINGS_FOLDER_LOCATION = "".join([str(HOME_DIR_PATH)+'/Projects/application/resources/']) +APPLICATION_FOLDER_LOCATION = "".join([str(HOME_DIR_PATH)+'/Projects/']) PEM_FILES = ['1.pem', '2.pem', '3.pem' ] #standby mode @@ -44,4 +51,48 @@ ACK_REQ_STATUS = 'Ack Req' ACK_BAK_STATUS = 'Ack Bak' +#Settings + + +COLOR_CODES = {"Aqua": "#81ffff", "Blue": "#017dea", "Blue 2": "#1090d5", "Green": "#29fd2d", "Grey": "#d3d3d3", + "Lavender": "#db98f5", "Light Blue": "#acd7f1", "Light Teal": "#29f1da","Lime": "#b7fc36", + "Magenta":"#fd28fd", "Orange": "#f2721c", "Peach":"#f1979a", "Red": "#c53b33", "Rose":"#fc178d", + "Slate blue":"#7f7ffa", "Violet": "#6435c9", "White": "#ffffff", "Yellow": "#fcfc4d"} + +#Service password loction +CONFIG_PATH = Path(os.getcwd()) +HOME_DIR_PATH = CONFIG_PATH.parent.parent.parent +SERVICE_CONF_LOCATION ="".join([str(HOME_DIR_PATH),'/Projects/application/resources/settings/Settings/System.conf']) + +#standby mode +GOODMORNING_START_TIME_SEC = 0 +GOODEVENING_START_TIME_SEC = 43200 + +ENABLED = True +DISABLED = False + +#settings information +BRIGHTNESS_MIN_VAL = 20 +BRIGHTNESS_MAX_VAL = 100 +VOLUME_MIN_VAL = 20 +VOLUME_MAX_VAL = 100 + +#service screen +PASSWORD = 123 + +#wifi screen +IP_ADDRESS = {"valid" : "192.168.1.1","invalid" : "192.168.1"} +GATEWAY = {"valid" : "255.255.255.0", "invalid" : "255.255.255"} +SUBNET_MASK = {"valid" : "255.255.255.0", "invalid" : "255.255.255"} +DNS = {"valid" : "0.0.0.0", "invalid" : "255.255.255"} + +#dg cleaning +WATER_FLUSH_TIME_HOUR = {"valid" : "23","invalid" : "24"} +WATER_FLUSH_TIME_MINUTE = {"valid" : "59","invalid" : "60"} +WATER_FLUSH_CYCLE = {"valid" : "1", "invalid" : "8"} + +HEAT_DISINFECTION_TIME_HOUR = {"valid" : "23","invalid" : "24"} +HEAT_DISINFECTION_TIME_MINUTE = {"valid" : "59","invalid" : "60"} +HEAT_DISINFECTION_CYCLE = {"valid" : "7", "invalid" : "61"} + Index: shared/scripts/configuration/strings.py =================================================================== diff -u -rf7bfeef1136eab7daee4c21ec1e6ee97f3412503 -r6d63d7b5300eff028710b831e233cd3692f42942 --- shared/scripts/configuration/strings.py (.../strings.py) (revision f7bfeef1136eab7daee4c21ec1e6ee97f3412503) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision 6d63d7b5300eff028710b831e233cd3692f42942) @@ -32,3 +32,63 @@ BLOOD_PRIMING_TEXT = "Blood Priming" SALINE_UNIT = "mL" BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" + +#Settings +# -*- coding: utf-8 -*- + +BLOOD_PRIMING_TEXT = "Blood Priming" +SALINE_UNIT = "mL" +BLOOD_PRIMING_UNIT = "mL" +BLOOD_PRIMING_VALUE_0 = "0" +BLOOD_PRIMING_DEFAULT_VALUE = BLOOD_PRIMING_VALUE_0 + " " + BLOOD_PRIMING_UNIT +ACK_REQ_STATUS = 'Ack Req' +ACK_BAK_STATUS = 'Ack Bak' + + +#Setting +DEVICE_SETTINGS_TEXT = "Device Settings" +DEVICE_SETTINGS_SCREEN_PARAMETER = ["Information", "Volume And Brightness", "Wi-Fi", "Bluetooth Cuff", "DG Cleaning", "Service", "Export Logs"] +SettingsHome_Treatment_Text = "Treatment" +SettingsHome_Manager_Text = "Manager" +SettingsHome_Settings_Text = "Settings" + +#Information + +INFORMATION_TITLES = ["Information", "Versions"] +INFORMATION_PARAMETERS = ["Information", "UI Version", "HD Version", "HD FPGA Version", "HD Serial Number", "DG Version", "DG FPGA Version", "DG Serial Number"] +SERVICE_TEXT = "Service" +SERVICES_PARAMETERS = ["HD Last Service Date", "HD Next Service Date", "DG Last Service Date", "DG Next Service Date"] + +#volume and brightness +VOLUME_AND_BRIGHTNESS_TEXT = "Volume And Brightness" +BRIGHTNESS_TEXT = "Brightness" +ALARM_VOLUME_TEXT = "Alarm Volume" +NOTIFICATION_MESSAGE_TEXT = "The response value is incorrect. [1007]" +CONFIRM_TEXT = "CONFIRM" +SERVICE_BACK_BTN = "BACK" +BACK_TEXT = "BACK" +UNIT_OF_VOLUME_AND_BRIGHTNESS = "%" + +#wifi +WIFI_TITLE_TEXT = "Wi-Fi" +IP_ADDRESS_TEXT = "IP Address" +GATEWAY_TEXT = "Gateway" +SUBNET_MASK_TEXT = "Subnet Mask" +DNS_TEXT = "DNS" +SSID_TEXT = "SSID" +SCAN_TEXT = "SCAN" +SCAN_FINISHED_TEXT = "Scan Finished" +BACK_BUTTON_TEXT = "BACK" + +#Bluetooth cuff +BLUETOOTH_CUFF_TITLE_TEXT = "Bluetooth Cuff" +DEVICES_TEXT = "Devices" + +#DG Cleaning +DG_CLEANING_TITLE_TEXT = "DG Cleaning" +WATER_FLUSH_TEXT = "Water Flush" +HEAT_DISINFECTION_TEXT = "Heat Disinfection" +WATER_FLUSH_TIME_TEXT = "Time (HH:MM)" +WATER_FLUSH_CYCLE_TEXT = "Cycle (Days)" +HEAT_DISINFECTION_TIME_TEXT = "Time (HH:MM)" +HEAT_DISINFECTION_CYCLE_TEXT = "Cycle (Days)" Index: shared/scripts/names.py =================================================================== diff -u -r0aa784ff8329e586d6f038069484da93a6ec5236 -r6d63d7b5300eff028710b831e233cd3692f42942 --- shared/scripts/names.py (.../names.py) (revision 0aa784ff8329e586d6f038069484da93a6ec5236) +++ shared/scripts/names.py (.../names.py) (revision 6d63d7b5300eff028710b831e233cd3692f42942) @@ -58,5 +58,147 @@ o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview = {"container": o_PostTreatmentStack_PostTreatmentStack, "objectName": "_treatmentReviewConfirm", "type": "PostTreatmentReview", "visible": True} o_treatmentReviewConfirm_Code_Tx_code_Label = {"container": o_PostTreatmentStack_treatmentReviewConfirm_PostTreatmentReview, "text": "Code: Tx_code", "type": "Label", "unnamed": 1, "visible": True} +#Settings +# Top Parents +o_QQuickView = { "type": "QQuickView"} +o_Overlay = {"container": o_QQuickView, "type": "Overlay"} +o_treatmentHome = {"container": o_QQuickView , "id": "_treatmentHome" , "type": "TreatmentHome", "unnamed": 1, "visible": True} +o_treatmentHome_backgroung = {"container": o_treatmentHome, "id": "_backgroundRect" , "type": "Rectangle" , "unnamed": 1, "visible": True} +o_treatmentHome_startTreatment = {"container": o_treatmentHome, "id": "_startTreatmentRect" , "type": "TouchRect" , "unnamed": 1, "visible": True} +o_treatmentHome_createTreatment = {"container": o_treatmentHome, "id": "_createTreatmentRect", "type": "TouchRect" , "unnamed": 1, "visible": True} +o_Gui_MainView = {"type": "Gui::MainView", "unnamed": 1, "visible": True} +o_Overlay = {"container": o_Gui_MainView, "type": "Overlay", "unnamed": 1, "visible": True} +o_borderRect_Rectangle = {"container": o_Overlay, "gradient": 0, "id": "_borderRect", "type": "Rectangle", "unnamed": 1, "visible": True} +o_minimizeButton_UpDownButton = {"container": o_Overlay, "gradient": 0, "id": "_minimizeButton", "type": "UpDownButton", "unnamed": 1, "visible": True} +o_shape_Shape = {"container": o_Gui_MainView, "id": "_shape", "type": "Shape", "unnamed": 1, "visible": True} +o_PreTreatmentCreateStack_PreTreatmentCreateStack = {"container": o_Gui_MainView, "objectName": "_PreTreatmentCreateStack", "type": "PreTreatmentCreateStack", "visible": True} +o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentCreateStack_PreTreatmentCreateStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} +o_PreTreatmentBase_titleBar_StepNavigationTitleBar = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "id": "_titleBar", "type": "StepNavigationTitleBar", "unnamed": 1, "visible": True} +o_titleBar_Rectangle = {"container": o_Overlay, "gradient": 0, "id": "_titleBar", "type": "Rectangle", "unnamed": 1, "visible": True} +o_treatmentStack_TreatmentStack = {"container": o_Gui_MainView, "objectName": "TreatmentStack", "type": "TreatmentStack", "visible": True} +o_treatmentStack_TreatmentBloodPrime_ScreenItem = {"container": o_treatmentStack_TreatmentStack, "objectName": "_TreatmentBloodPrime", "type": "ScreenItem", "visible": True} +o_PreTreatmentBase_input_TextInput = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} +o_PreTreatmentBase_CONFIRM_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate = {"container": o_PreTreatmentCreateStack_PreTreatmentCreateStack, "objectName": "_PreTreatmentCreate", "type": "PreTreatmentCreate", "visible": True} +o_PreTreatmentCreate_bloodFlowRate_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "gradient": 0, "objectName": "_bloodFlowRate", "type": "SliderCreateTreatment", "visible": True} +o_PreTreatmentCreate_bloodFlowRateSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "gradient": 0, "objectName": "_bloodFlowRateSlider", "type": "Slider", "visible": True} +o_PreTreatmentCreate_dialysateFlowRate_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "gradient": 0, "objectName": "_dialysateFlowRate", "type": "SliderCreateTreatment", "visible": True} +o_PreTreatementCreateStack_PreTreatmentBase_TreatmentFlowBase = {"container":o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase,"objectName":"_PreTreatmentBase","type":"TreatmentFlowBase", "visible": True} +o_treatmentStack_treatmentHome_TreatmentHome = {"container": o_treatmentStack_TreatmentStack, "id": "_treatmentHome", "type": "TreatmentHome", "unnamed": 1, "visible": True} +o_confirmButton_TouchRect = {"container": o_Gui_MainView, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": False} +o_backButton_BackButton = {"container": o_Gui_MainView, "gradient": 0, "objectName": "_backButton", "type": "BackButton", "visible": False} +o_NinePatchImage = {"container": o_Gui_MainView, "occurrence": 6, "type": "NinePatchImage", "unnamed": 1, "visible": False} +o_PreTreatmentBase_backgroundRect_Rectangle = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "id": "_backgroundRect", "type": "Rectangle", "unnamed": 1, "visible": True} +o_PreTreatmentBase_confirmButton_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} + +#standbymode +o_MainHome_MainHome = {"container": o_Gui_MainView, "objectName": "_MainHome", "type": "MainHome", "visible": True} +o_standby_page = {"container": o_MainHome_MainHome, "type": "Column", "unnamed": 1, "visible": True} + + +#in-treatment +o_blood_priming = {"container": o_treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "Blood Priming", "type": "Text", "unnamed": 1, "visible": True} +o_blood_priming_value_by_default = {"container": o_treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "0 mL", "type": "Text", "unnamed": 1, "visible": True} +o_uf_minimum_value = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "0.000", "type": "Text", "unnamed": 1, "visible": True} +o_uf_maximum_value = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} +o_uf_minimum_value_pop_up = {"container": o_Overlay, "text": "0.000", "type": "Text", "unnamed": 1, "visible": True} +o_uf_maximum_value_pop_up = {"container": o_Overlay, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} +o_edit_uf_value = {"container": o_Overlay, "text": "EDIT ULTRAFILTRATION VOLUME", "type": "Text", "unnamed": 1, "visible": True} +o_uf_back_button = {"container": o_Overlay, "text": "BACK", "type": "Text", "unnamed": 1, "visible": True} +o_uf_close_button = {"container": o_Overlay, "id": "_image", "source": "qrc:/images/iClose", "type": "Image", "unnamed": 1, "visible": True} +o_fluid_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Volume Delivered", "type": "Text", "unnamed": 1, "visible": True} +o_cumulative_fluid_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Cumulative Delivered", "type": "Text", "unnamed": 1, "visible": True} + + +#settings_Home +o_SettingsBase_SettingsBase = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsBase", "visible": True} +o_settings_Text = {"container": o_Gui_MainView, "text": "Settings", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsHome_SettingsHome = {"container": o_Gui_MainView, "objectName": "_SettingsHome", "type": "SettingsHome", "visible": True} +o_settings_home_text_obj = {"container": o_SettingsHome_SettingsHome, "type": "Text", "unnamed": 1, "visible": True} +o_eject_btn = {"container": o_SettingsHome_SettingsHome, "id": "_image", "source": "qrc:/images/iEject", "type": "Image", "unnamed": 1, "visible": True} +o_arrow_btn = {"container": o_SettingsHome_SettingsHome, "id": "_image", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} +o_SettingsBase_SettingsBase = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsBase", "visible": True} +o_settings_base_text_obj = {"container": o_SettingsBase_SettingsBase, "type": "Text", "unnamed": 1, "visible": True} +o_service_date_obj = {"container": o_SettingsBase_SettingsBase, "type": "Text", "unnamed": 1, "visible": True} + +#volume and brightness +o_SettingsBase_SettingsVolumeBrightness = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsVolumeBrightness", "visible": True} +o_SettingsBase_Volume_And_Brightness_Text = {"container": o_SettingsBase_SettingsVolumeBrightness, "type": "Text", "unnamed": 1, "visible": True} +o_brightness_parent_obj = {"container": o_SettingsBase_SettingsVolumeBrightness, "gradient": 0, "id": "_brightness", "type": "Slider", "unnamed": 1, "visible": True} + +#Setting WiFi, Bluetooth cuff, DG cleaning +device_settings_screen = {"container": o_Gui_MainView, "text": "Treatment", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsHome_SettingsHome_2 = {"container": o_Gui_MainView, "objectName": "_SettingsHome", "type": "SettingsHome", "visible": True} +o_SettingsHome_mouseArea_MouseArea_2 = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 3, "type": "MouseArea", "unnamed": 1, "visible": True} +o_Gui_MainView = {"type": "Gui::MainView", "unnamed": 1, "visible": True} +o_SettingsBase_SettingsWiFi = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsWiFi", "visible": True} +o_SettingsBase_Wi_Fi_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "Wi-Fi", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_IP_Address_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "IP Address", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_Gateway_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "Gateway", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_Subnet_Mask_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "Subnet Mask", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_DNS_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "DNS", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_SSID_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "SSID", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_SCAN_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "SCAN", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsHome_mouseArea_MouseArea = {"container": o_SettingsHome_SettingsHome_2, "id": "_mouseArea", "occurrence": 4, "type": "MouseArea", "unnamed": 1, "visible": True} +o_SettingsBase_mouseArea_MouseArea_2 = {"container": o_SettingsBase_SettingsBase, "id": "_mouseArea", "type": "MouseArea", "unnamed": 1, "visible": True} +o_SettingsBase_Devices_Label = {"container": o_SettingsBase_SettingsBase, "text": "Devices", "type": "Label", "unnamed": 1, "visible": True} +o_SettingsBase_Bluetooth_Cuff_Text = {"container": o_SettingsBase_SettingsBase, "text": "Bluetooth Cuff", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_SettingsDG = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsDG", "visible": True} +o_SettingsBase_DG_Cleaning_Text = {"container": o_SettingsBase_SettingsDG, "text": "DG Cleaning", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_Water_Flush_Text = {"container": o_SettingsBase_SettingsDG, "text": "Water Flush", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_Heat_Disinfection_Text = {"container": o_SettingsBase_SettingsDG, "text": "Heat Disinfection", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsHome_DG_Cleaning_Text = {"container": o_SettingsHome_SettingsHome_2, "text": "DG Cleaning", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_backButton_BackButton = {"container": o_SettingsBase_SettingsWiFi, "gradient": 0, "objectName": "_backButton", "type": "BackButton", "visible": True} +o_SettingsBase_The_response_value_is_incorrect_1007_Text = {"container": o_SettingsBase_SettingsVolumeBrightness, "text": "The response value is incorrect. [1007]", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_Time_HH_MM_Label = {"container": o_SettingsBase_SettingsDG, "text": "Time (HH:MM)", "type": "Label", "unnamed": 1, "visible": True} +o_SettingsBase_input_TextInput_5 = {"container": o_SettingsBase_SettingsDG, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} +o_SettingsBase_input_TextInput_6 = {"container": o_SettingsBase_SettingsDG, "echoMode": 0, "id": "_input", "occurrence": 2, "type": "TextInput", "unnamed": 1, "visible": True} +o_SettingsBase_Time_HH_MM_Label_2 = {"container": o_SettingsBase_SettingsDG, "occurrence": 2, "text": "Time (HH:MM)", "type": "Label", "unnamed": 1, "visible": True} +o_SettingsBase_input_TextInput_7 = {"container": o_SettingsBase_SettingsDG, "echoMode": 0, "id": "_input", "occurrence": 4, "type": "TextInput", "unnamed": 1, "visible": True} +o_SettingsBase_input_TextInput_8 = {"container": o_SettingsBase_SettingsDG, "echoMode": 0, "id": "_input", "occurrence": 5, "type": "TextInput", "unnamed": 1, "visible": True} +o_SettingsBase_Cycle_Days_Text = {"container": o_SettingsBase_SettingsDG, "text": "Cycle (Days)", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_input_TextInput_9 = {"container": o_SettingsBase_SettingsDG, "echoMode": 0, "id": "_input", "occurrence": 3, "type": "TextInput", "unnamed": 1, "visible": True} +o_SettingsBase_Cycle_Days_Text_2 = {"container": o_SettingsBase_SettingsDG, "occurrence": 2, "text": "Cycle (Days)", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_input_TextInput_10 = {"container": o_SettingsBase_SettingsDG, "echoMode": 0, "id": "_input", "occurrence": 6, "type": "TextInput", "unnamed": 1, "visible": True} +o_back_button = {"container": o_Gui_MainView, "text": "BACK", "type": "Text", "unnamed": 1, "visible": False} +o_dg_cleaning_back_button = {"container": o_SettingsBase_SettingsDG, "id": "_mouseArea", "type": "MouseArea", "unnamed": 1, "visible": True} +o_SettingsBase_SCAN_Text_2 = {"container": o_SettingsBase_SettingsBase, "text": "SCAN", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_mouseArea_MouseArea_4 = {"container": o_SettingsBase_SettingsBase, "id": "_mouseArea", "occurrence": 2, "type": "MouseArea", "unnamed": 1, "visible": True} +o_SettingsBase_ssidText_Text = {"container": o_SettingsBase_SettingsWiFi, "id": "_ssidText", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_input_TextInput = {"container": o_SettingsBase_SettingsWiFi, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} +o_SettingsBase_input_TextInput_2 = {"container": o_SettingsBase_SettingsWiFi, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} +o_SettingsBase_input_TextInput_3 = {"container": o_SettingsBase_SettingsWiFi, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} +o_SettingsBase_input_TextInput_4 = {"container": o_SettingsBase_SettingsWiFi, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} +o_services_screen_text_obj = {"container": o_SettingsBase_SettingsBase, "type": "Text", "unnamed": 1, "visible": True} +o_settings_text = {"container":o_Gui_MainView , "text": "Settings", "type": "Text", "unnamed": 1, "visible": True} +o_service_text = {"container": o_Gui_MainView , "text": "Service", "type": "Text", "unnamed": 1, "visible": True} +o_userConfirmation_UserConfirmation = {"container": o_Gui_MainView, "objectName": "UserConfirmation", "type": "UserConfirmation", "visible": True} +o_service_text_title = {"container": o_userConfirmation_UserConfirmation, "text": "Service Password", "type": "Text", "unnamed": 1, "visible": True} +o_password_text_field = {"container": o_userConfirmation_UserConfirmation, "id": "_password", "type": "TextEntry", "unnamed": 1, "visible": True} +o_show_password = {"container": o_userConfirmation_UserConfirmation, "id": "_showPassword", "source": "qrc:/images/iEye", "type": "Image", "unnamed": 1, "visible": True} +o_switch_keyboard_to_keypad = {"container": o_Gui_MainView, "text": "&123", "type": "Text", "unnamed": 1, "visible": True} +o_keyboard_object = {"container": o_Gui_MainView, "type": "Text", "unnamed": 1, "visible": True} +#virtal keypad input field +o_keypad_input = {"container": o_Gui_MainView, "id": "_keyText", "type": "Text", "unnamed": 1, "visible": True} +#virtal keypad back space key +o_back_space_key = {"container": o_Gui_MainView, "id": "_backspaceKeyIcon", "source": "qrc:/plugins/QtQuick/VirtualKeyboard/Styles/denali/images/iBackspace.svg", "type": "Image", "unnamed": 1, "visible": True} +o_service_confirm_btn = {"container": o_userConfirmation_UserConfirmation, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +o_userConfirmation_backButton_BackButton = {"container": o_userConfirmation_UserConfirmation, "gradient": 0, "objectName": "_backButton", "type": "BackButton", "visible": True} +o_service_back_btn = {"container": o_Gui_MainView, "type": "Text","text": "BACK", "unnamed": 1, "visible": True} +o_incorrect_password_msg = {"container": o_SettingsHome_SettingsHome_2, "text": "Incorrect service password", "type": "Text", "unnamed": 1, "visible": True} + +#wifi parameters +o_ip_address_object = {"container": o_SettingsBase_SettingsWiFi, "id": "_ipAddress", "type": "TextEntry", "unnamed": 1, "visible": True} +o_gateway_object = {"container": o_SettingsBase_SettingsWiFi, "id": "_gateway", "type": "TextEntry", "unnamed": 1, "visible": True} +o_subnet_mask_object = {"container": o_SettingsBase_SettingsWiFi, "id": "_subnetmask", "type": "TextEntry", "unnamed": 1, "visible": True} +o_dns_object = {"container": o_SettingsBase_SettingsWiFi, "id": "_dns", "type": "TextEntry", "unnamed": 1, "visible": True} +o_ip_address_text_inut = {"container": o_SettingsBase_SettingsWiFi, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} +o_gateway_text_inut = {"container": o_SettingsBase_SettingsWiFi, "echoMode": 0, "id": "_input", "occurrence": 2, "type": "TextInput", "unnamed": 1, "visible": True} +o_subnet_mask_text_input = {"container": o_SettingsBase_SettingsWiFi, "echoMode": 0, "id": "_input", "occurrence": 3, "type": "TextInput", "unnamed": 1, "visible": True} +o_dns_text_input = {"container": o_SettingsBase_SettingsWiFi, "echoMode": 0, "id": "_input", "occurrence": 4, "type": "TextInput", "unnamed": 1, "visible": True} +o_SettingsBase_mouseArea_MouseArea = {"container": o_SettingsBase_SettingsWiFi, "id": "_mouseArea", "type": "MouseArea", "unnamed": 1, "visible": True} +o_SettingsBase_Scan_Finished_Text = {"container": o_SettingsBase_SettingsWiFi, "text": "Scan Finished", "type": "Text", "unnamed": 1, "visible": True} +o_SettingsBase_mouseArea_MouseArea_3 = {"container": o_SettingsBase_SettingsWiFi, "id": "_mouseArea", "occurrence": 2, "type": "MouseArea", "unnamed": 1, "visible": True} + Index: tst_cloud_sync - treatment_screen/test.py =================================================================== diff -u -re249ea37ebab6dfe87a5e8f83448bb38e00d36cd -r6d63d7b5300eff028710b831e233cd3692f42942 --- tst_cloud_sync - treatment_screen/test.py (.../test.py) (revision e249ea37ebab6dfe87a5e8f83448bb38e00d36cd) +++ tst_cloud_sync - treatment_screen/test.py (.../test.py) (revision 6d63d7b5300eff028710b831e233cd3692f42942) @@ -17,6 +17,7 @@ import csv import names +import shutil import os import time from dialin.ui import utils @@ -27,11 +28,11 @@ from dialin.common.hd_defs import HDOpModes, PreTreatmentSubModes, PostTreatmentStates from dialin.common.hd_defs import HDOpModes, HDOpSubModes from dialin.utils.conversions import float_to_bytearray, integer_to_bytearray,unsigned_integer_to_bytearray - dg_simulator = DGSimulator() hd_simulator = HDSimulator() ERROR_MESSAGE = { + "500" : "CS Unknown Error ", "501" : "CS Incorrect header ", "502" : "CS Incorrect timestamp ", "503" : "CS Incorrect sequence ", @@ -42,7 +43,17 @@ "508" : "CS Mismatch parameter count ", "509" : "CS Missing parameter ", "510" : "CS No history available ", - "520" : "CS The provided Treatment Code is empty. " + "511" : "CS Duplicate data ", + "512" : "CS The log folder cannot be created. ", + "513" : "CS Error writing to the input file. ", + "514" : "CS The credentials file does not exist. ", + "515" : "CS The credentials folder make failed. ", + "516" : "CS The credentials file copy failed. ", + "517" : "CS The credentials file remove failed. ", + "518" : "CS The credentials folder is empty. ", + "519" : "CS No Treatment Code provided. ", + "520" : "CS The provided Treatment Code is empty. ", + "521" : "CS Out buffer empty " } @@ -57,7 +68,9 @@ eError_ParamMismatch_508 = '1,1639391827,0,2999,0,508' eError_ParamMissing_509 = '1639391827,1,0,2999,3,509,[8,2]' eError_NoHistory_510 = '1639391827,1,0,2006,0' +eError_CredentialMake_514 = '1657706417,7,0,2003,3,,DG1234567890123,06300216' eError_TxCodeEmpty_520 = '1639391827,1,0,2008,1,' +eError_OutFileEmpty_521 = '' POST_TREATMENT_INSTRUCTION_COUNT = 2 @@ -75,7 +88,11 @@ DEVICE_HD_INFO_RESPONSE = '1639391827,1,0,1002,3,HD1234567890123,,sw_version' DEVICE_DG_INFO_RESPONSE = '1639391827,1,0,1002,3,,DG1234567890123,sw_version' - + +def settings_text_obj(text): + names.o_settings_home_text_obj["text"] = text + return names.o_settings_home_text_obj + def verify_code_from_treatment_response(): """ This function is used for verify the code text from treatment log. @@ -111,15 +128,29 @@ return read_line[0] -def verify_error_message(): +def verify_files_error_message(): """ This method is used to verify error message log printing inside denaliSquish.error file. """ - + + set_data_in_cloud_sync_output_file(eError_NoHistory_510) + utils.waitForGUI(2) + test.compare(verify_status(get_error_message_from_log("510")),ERROR_MESSAGE["510"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(str(verify_status(get_error_message_from_log("518"))),ERROR_MESSAGE["518"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(verify_status(get_error_message_from_log("516")),ERROR_MESSAGE["516"], "message is not in unhandled.conf file. verified error message from .err file") + set_data_in_cloud_sync_output_file(eError_HeaderCount_501) utils.waitForGUI(2) - test.compare(str(verify_status(get_error_message_from_log("501"))),ERROR_MESSAGE["501"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(verify_status(get_error_message_from_log("501")),ERROR_MESSAGE["501"], "message is not in unhandled.conf file. verified error message from .err file") + try: + test.compare(verify_status(get_error_message_from_log("521")),ERROR_MESSAGE["521"], "message is not in unhandled.conf file. verified error message from .err file") + except: + test.log("CS Out buffer error not logged ") +def verify_error_message(): + """ + This method is used to verify error message log printing inside denaliSquish.error file. + """ set_data_in_cloud_sync_output_file(eError_Timestamp_502) utils.waitForGUI(2) test.compare(verify_status(get_error_message_from_log("502")),ERROR_MESSAGE["502"], "message is not in unhandled.conf file. verified error message from .err file") @@ -209,12 +240,12 @@ if row[0].isalpha(): pass else: - if count == 30: + if count == 100: test.fail("handler unable to find message text from error file.") break row_length = sum(1 for values in row) try: - if ("["+error_num+":") in row[1]: + if ("["+error_num) in row[1]: if row[1] != None: return row[1] @@ -227,47 +258,130 @@ test.fail("err log file is not created or log file is not created based on standard log naming format.") +def rename_file(path,filename): + """ + This method Rename the original folder name to dummy name. + """ + folder_path = os.listdir(path) + for files in folder_path: + if files == filename+"_1": + if os.path.exists(path+filename+"_1"): + shutil.rmtree(path+filename+"_1") + test.log(str(filename+" name changed to "+files)) + if files == filename: + if os.path.exists(path+filename): + utils.waitForGUI(1) + os.rename(path+filename,path+filename+"_1") + test.log(str(files+" name changed to "+filename+"_1")) + +def rename_old_name(path,filename): + """ + This method Rename the dummy name to original folder name . + """ + folder_path = os.listdir(path) + for files in folder_path: + if files == filename: + if os.path.exists(path+filename): + shutil.rmtree(path+filename) + test.log(str(files+"_1 name changed to "+filename)) + utils.waitForGUI(5) + if files != filename: + if (files == filename+"_1"): + os.rename(path+files,path+filename) + test.log(str(files+" name changed to "+filename)) + +def click_scan_button_wifi(): + """ + Method to verify "Wi-Fi" screen + """ + test.startSection("Verifying Wi-Fi setting") + utils.waitForGUI(0.2) + mouseClick(waitForObjectExists(names.o_SettingsHome_mouseArea_MouseArea_2)) + utils.waitForGUI(5) + mouseClick(waitForObjectExists(names.o_SettingsBase_mouseArea_MouseArea_3)) + mouseClick(waitForObjectExists(names.o_SettingsBase_mouseArea_MouseArea)) + 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)) + 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 rename_folder_names(): + """ + This method is for renaming the folder name and wait application for verifying particular file. + """ + test.startSection("Renaming the cloudsync,sd-card, usb-disk, application folder name") + rename_file(config.SD_CARD_CLOUDSYNC_FOLDER_PATH,"cloudsync") + utils.waitForGUI(5) + rename_old_name(config.SD_CARD_CLOUDSYNC_FOLDER_PATH,"cloudsync") + + rename_file(config.SD_CARD_LOCATION,"sd-card") + utils.waitForGUI(5) + rename_old_name(config.SD_CARD_LOCATION,"sd-card") + + rename_file(config.USB_DISK_FOLDER_LOCATION,"usb-disk") + utils.waitForGUI(5) + rename_old_name(config.USB_DISK_FOLDER_LOCATION,"usb-disk") + + rename_file(config.APPLICATION_FOLDER_LOCATION,"application") + utils.waitForGUI(5) + navigate_to_settings_screen() + click_scan_button_wifi() + rename_old_name(config.APPLICATION_FOLDER_LOCATION,"application") + test.endSection() + def main(): - utility.append_cloudsync_credentials_file() - + rename_file(config.CLOUDSYNC_FOLDER_PATH,"cloudsync") + utils.waitForGUI(1) utils.tstStart(__file__) startApplication(config.AUT_NAME) utils.waitForGUI(1.5) - verify_error_message() - + verify_files_error_message() + rename_old_name(config.CLOUDSYNC_FOLDER_PATH,"cloudsync") + + utility.append_cloudsync_credentials_file() + utils.waitForGUI(5) + verify_error_message() main_item = waitForObjectExists(names.o_mainItem_Item) expected_software_version = str(object.children(main_item)[5]) - + set_data_in_cloud_sync_output_file(CODE_DISPLAY_REQUEST) verify_code_from_treatment_response() - + set_data_in_cloud_sync_output_file(DEVICE_CREDENTIALS_REQUEST) device_credentials_response = utility.retrive_log_data() verify_log_response(device_credentials_response[0], DEVICE_CREDENTIALS_RESPONSE) - + set_data_in_cloud_sync_output_file(DEVICE_FACTORY_RESET_REQUEST) factory_reset_response = utility.retrive_log_data() verify_log_response(factory_reset_response[0], DEVICE_FACTORY_RESET_CONFIRM) - + HD_VERSION = HD_VERSION_SERIAL_REQUEST.split(",") hd_simulator.cmd_send_serial_hd_data(HD_VERSION[5]) set_data_in_cloud_sync_output_file(DEVICE_INFO_REQUEST) device_credentials_response = utility.retrive_log_data() verify_log_response(device_credentials_response[0], DEVICE_HD_INFO_RESPONSE) - + DG_VERSION = DG_VERSION_SERIAL_REQUEST.split(",") dg_simulator.cmd_send_serial_dg_data(DG_VERSION[6]) set_data_in_cloud_sync_output_file(DEVICE_INFO_REQUEST) device_credentials_response = utility.retrive_log_data() verify_log_response(device_credentials_response[0], DEVICE_DG_INFO_RESPONSE) - + hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_STAN.value, sub_mode=HDOpSubModes.STANDBY_WAIT_FOR_TREATMENT_STATE .value) set_data_in_cloud_sync_output_file(DEVICE_STATE_REQUEST) device_credentials_response = utility.retrive_log_data() - verify_log_response(device_credentials_response[0], DEVICE_STATE_RESPONSE) + verify_log_response(device_credentials_response[0], DEVICE_STATE_RESPONSE) + rename_folder_names() utils.tstDone() - - \ No newline at end of file