Index: shared/scripts/configuration/config.py =================================================================== diff -u -rdfe6dbd55749bab2f8390a241c1ac3df9e918389 -r0ae68e3bc7005f5a03eb5985677e13e5323680bd --- shared/scripts/configuration/config.py (.../config.py) (revision dfe6dbd55749bab2f8390a241c1ac3df9e918389) +++ shared/scripts/configuration/config.py (.../config.py) (revision 0ae68e3bc7005f5a03eb5985677e13e5323680bd) @@ -14,24 +14,26 @@ ############################################################################ import os +from pathlib import Path from configuration.strings import * AUT_NAME = "denaliSquish" - TREATMENT_UNHIGHLIGHTED_COLOR = "#000000" TREATMENT_HIGHLIGHTED_COLOR = "#135088" COMMON_PATH = os.environ['HOME']+"/Projects" +CONFIG_PATH = Path(os.getcwd()) +HOME_DIR_PATH = CONFIG_PATH.parent.parent.parent #instructions_imagelocation INSTRUCTION_CONF_LOCATION = "/home/denali/Projects/application/resources/settings/Instructions/Instructions.conf" IMAGE_LOCATION = "file:///home/denali/Projects/application/resources/settings/Instructions/" EXPECTED_IMAGE_LOCATION = "/home/denali/Projects/application/resources/settings/Instructions/" -SERVICE_CONF_LOCATION = os.environ['HOME']+"/Projects/application/resources/settings/Service.conf" TREATMENT_LOG_LOCATION = '/home/denali/Desktop/sd-card/treatment/*.log' -SERVICE_CONF_LOCATION = os.environ['HOME']+"/Projects/application/resources/settings/Service.conf" +#Service password loction +SERVICE_CONF_LOCATION ="".join([str(HOME_DIR_PATH),'/Projects/application/resources/settings/Service.conf']) #standby mode GOODMORNING_START_TIME_SEC = 0 @@ -249,12 +251,7 @@ "rinseback_flow_rate" : [50, 25, 187], } -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"} - #ultrafilteration volume based on flow parameters. Python list contains Rotational speed, Motor speed, # MC speed, MC current and PWM. TREATMENT_ULTRAFILTRATION_FLOW_PARAMETERS = { @@ -370,16 +367,22 @@ MINIMUM_COUNTDOWN_TIME = 0 CONSUMABLE_SELF_TEST_BICARB_PUMP_CHECK_STATE = 3 -VALID = True -INVALID = False - - -#post treatment review +#settings information BRIGHTNESS_MIN_VAL = 20 BRIGHTNESS_MAX_VAL = 100 VOLUME_MIN_VAL = 20 VOLUME_MAX_VAL = 100 +DEVICE_SETTINGS_TEXT = "Device Settings" +SERVICE_TEXT = "Service" +PASSWORD = 123 +CONFIRM_TEXT = "CONFIRM" +SERVICE_BACK_BTN = "BACK" +IP_ADDRESS = "192.168.1.1" +GATEWAY = "255.255.255.0" +SUBNET_MASK = "255.255.255.0" +DNS = "0.0.0.0" + #dictionary consist of review parameters values of post treatment POST_TREATMENT_REVIEW_PARAMETER_RANGE = { "Patient ID": ["abcd", "xyz"], Index: shared/scripts/configuration/utility.py =================================================================== diff -u -rf334a1c3a2a5ef0d38fc9f2a22622d29d08edc78 -r0ae68e3bc7005f5a03eb5985677e13e5323680bd --- shared/scripts/configuration/utility.py (.../utility.py) (revision f334a1c3a2a5ef0d38fc9f2a22622d29d08edc78) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 0ae68e3bc7005f5a03eb5985677e13e5323680bd) @@ -12,8 +12,6 @@ # ############################################################################ - - import builtins import csv import names @@ -25,7 +23,6 @@ import squish import time import test - from builtins import format from builtins import int as pyInt from builtins import str as pyStr @@ -44,7 +41,6 @@ CLOUD_SYNC_LOG_LOCATION = '/home/denali/Desktop/sd-card/cloudsync/' LOG_LOCATION = "/home/denali/Desktop/sd-card/log/*.log" - def color_verification(exp_val = "Red", act_val = "#c53b33"): test.compare(config.COLOR_CODES[color_name],(act_val.color[name])) @@ -72,7 +68,7 @@ return names.o_bullet_object -def get_indicators(screen_obj, txt): +def scroll_to_zone(zone=None, screen_object=None): """ Verifying the busy indicators for BiCarb Pump Check and Acid Pump Check. indicator object of expected text @@ -1019,7 +1015,6 @@ except OSError: test.log("Directory can not be created") - def get_cloud_sync_input_file(): """ This function is the handler for getting file from log folder. @@ -1112,4 +1107,25 @@ if expected_epoch_value > minimum_epoch_value and expected_epoch_value < maximum_epoch_value : return True return False - + + +def keyboard_input(key_value): + names.o_keyboard_object["text"] = key_value + return names.o_keyboard_object + +def enter_keyboard_numeric_value(entry): + """ + Method to enter user desired + value using keypad + @param entry: (str) User expected value + """ + test.startSection("Entering {}".format(entry)) + for value in entry: + if value.isalpha(): + value = pyStr(value) + else: + value = pyInt(value) + key_val = squish.waitForObject(keyboard_input(value)) + squish.mouseClick(key_val) + utils.waitForGUI(0.1) + test.endSection() Index: shared/scripts/names.py =================================================================== diff -u -r7b1821e4eac91025e0363aaeae30677ca8afce41 -r0ae68e3bc7005f5a03eb5985677e13e5323680bd --- shared/scripts/names.py (.../names.py) (revision 7b1821e4eac91025e0363aaeae30677ca8afce41) +++ shared/scripts/names.py (.../names.py) (revision 0ae68e3bc7005f5a03eb5985677e13e5323680bd) @@ -864,6 +864,7 @@ #cloud_sync_device_registeration #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} @@ -966,8 +967,8 @@ 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_Wi_Fi_Text = {"container": o_SettingsHome_SettingsHome_2, "text": "Wi-Fi", "type": "Text", "unnamed": 1, "visible": True} -o_Gui_MainView_2 = {"type": "Gui::MainView", "unnamed": 1, "visible": True} -o_SettingsBase_SettingsWiFi = {"container": o_Gui_MainView_2, "objectName": "_SettingsBase", "type": "SettingsWiFi", "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} @@ -978,19 +979,49 @@ o_SettingsHome_Bluetooth_Cuff_Text = {"container": o_SettingsHome_SettingsHome_2, "text": "Bluetooth Cuff", "type": "Text", "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_2, "objectName": "_SettingsBase", "type": "SettingsDG", "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_SettingsHome_DG_Cleaning_Text = {"container": o_SettingsHome_SettingsHome_2, "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_SettingsBase_Chemical_Disinfection_Text = {"container": o_SettingsBase_SettingsDG, "text": "Chemical Disinfection", "type": "Text", "unnamed": 1, "visible": True} o_SettingsBase_backButton_BackButton = {"container": o_SettingsBase_SettingsWiFi, "gradient": 0, "objectName": "_backButton", "type": "BackButton", "visible": True} -o_back_button = {"container": o_Gui_MainView_2, "text": "BACK", "type": "Text", "unnamed": 1, "visible": False} +o_back_button = {"container": o_Gui_MainView, "text": "BACK", "type": "Text", "unnamed": 1, "visible": False} o_SettingsBase_SCAN_Text_2 = {"container": o_SettingsBase_SettingsBase, "text": "SCAN", "type": "Text", "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} + +