package net.northking.cctp.scriptcase.constants;

public class ScriptConstant {
    //脚本类型 0-自定义脚本 1-BS脚本 2-CS脚本 3-安卓脚本 4-IOS脚本 5-场景脚本
    public static final String SCRIPT_TYPE_API = "0";
    public static final String SCRIPT_TYPE_BS = "1";
    public static final String SCRIPT_TYPE_CS = "2";
    public static final String SCRIPT_TYPE_ANDROID = "3";
    public static final String SCRIPT_TYPE_IOS = "4";
    public static final String SCRIPT_TYPE_SCENE = "5";

    //脚本测试意图名称 key
    public static final String SCRIPT_TEST_PURPOSE_NAME = "测试轮次名";

    //默认轮次名
    public static final String DEFAULT_PURPOSE_NAME = "默认轮次";

    //一般脚本编号的type
    public static final String SCRIPT_CODE_UD = "Script:UD:Code";

    //场景脚本编号的type
    public static final String SCRIPT_CODE_US = "Script:US:Code";

    //脚本测试意图id key
    public static final String SCRIPT_TEST_PURPOSE_ID = "__row_id__";

    //脚本输入项表头 key
    public static final String SCRIPT_INPUT_TABLE_HEADERS = "tableHeaders";

    //脚本输入项表内容 key
    public static final String SCRIPT_INPUT_TABLE_CONTENT = "tableContent";

    //脚本文件中变量名称的key
    public static final String SCRIPT_INPUT_VARIABLES = "variables";

    //环境id
    public static final String SCRIPT_INPUT_ENV_ID = "envId";

    //环境名称
    public static final String SCRIPT_INPUT_ENV_NAME = "envName";

    //数据来源 -- 脚本输入项
    public static final String SOURCE_FROM_SCRIPT = "1";
    //数据来源 -- 用例集输入项
    public static final String SOURCE_FROM_INPUT_SET = "2";

    //
    public static final String FILE_XLSX = ".xlsx";
    public static final String FILE_XLS = ".xls";

    public static final Integer EXCEL_FIRST_SHEET = 0;
    public static final Integer EXCEL_FIRST_ROW = 0;

    public static final String DATA_SET_LINK_BY_SCRIPT = "1";
    public static final String DATA_SET_LINK_BY_SCENE = "2";
    public static final String DATA_SET_LINK_BY_CASE = "3";

    public static final String INPUT_VARIABLE_DATA_TYPE = "dataType";

    public static final String INPUT_VARIABLE_DEFAULT_VALUE = "defaultValue";

    public static final String INPUT_VARIABLE_NAME = "name";

    public static final String INPUT_VARIABLE_MEMO = "memo";

    public static final String INPUT_VARIABLE_DEFAULT_TYPE = "string";

    public static final String ORDER_BY_UPDATE_TIME = "updated_time";

    public static final String MOB_PLATFORM_ANDROID = "android";
    public static final String MOB_PLATFORM_IOS = "ios";
    public static final String MOB_PLATFORM_HARMONY = "harmonyos";

    public static final String MOB_PACKAGE = "package";
    public static final String VERSION_CODE = "versionCode";
    public static final String VERSION_NAME = "versionName";
    public static final String NAME = "name";
    public static final String LAUNCHER_ACTIVE = "launcherActivities";
    public static final String APPLICATION = "application";

    public static final String PLATFORM_ANDROID = "0";
    public static final String PLATFORM_IOS = "1";
    public static final String PLATFORM_HARMONY = "2";

    public static final String ATU_MOB_APP = "UITEST-ATU-MOBILE:APPFILE:";

    public static final String DEL_APP_MSG = "删除[%s]系统应用：%s" ;
    public static final String APP_MGR_MODULE = "应用管理";
    public static final String LOG_DEL_STATUS = "3";

    public static final String APP_SIZE = "appSize";
    public static final String APP_NAME = "appName";
    public static final String PACKAGE_NAME = "packageName";
    public static final String BUILD_VERSION = "buildVersion";
    public static final String PLATFORM = "platform";
    public static final String APP_ICON = "appIcon";
    public static final String ACTIVITY = "activity";
    public static final String APP_URL = "appUrl";

    public static final String STATUS_ERR = "error";
    public static final String STATUS_SUCCESS = "success";
    public static final String CHARSET_FOR_NAME = "gbk";

    public static final String CONFIG_JSON_NAME = "config.json";
    public static final String FILE_ENDWITH_APK = ".apk";

    public static final String FILE_ID_IS_NOT_NULL = "文件id不能为空";
    public static final String DEL_SUCCESS = "删除成功";

    public static final String CONTENT_DISPOSITION = "Content-Disposition";
    public static final String FILE_NAME = "attachment;filename=";

    public static final String STR_ENCODE = "UTF-8";

    public static final String APP_ID_IS_NOT_NULL = "应用id不能为空";
    public static final String DECIMAL_FORMAT = ".00";
    public static final String APP_SIZE_GB = " GB";
    public static final String APP_SIZE_MB = " MB";
    public static final String APP_SIZE_KB = " KB";
    public static final String APP_SIZE_B = " B";
    public static final String APP_SIZE_DEFAULT = "0 B";

    public static final String USER_AGENT = "User-Agent";
    public static final String APP_VERSION_INFO = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0";

    public static final String SCREEN_SHOT = "screenshot";
    public static final String X_PATH = "//activity[intent-filter/action[@name='android.intent.action.MAIN']]/@name";

    public static final String FILE_APK = "apk";
    public static final String FILE_IPA = "ipa";
    public static final String FILE_HAP = "hap";

    public static final String GET_SCRIPT_PRO_URL = "/interface-test/in/ui/getTestScriptsByProjectId";
    public static final String GET_SCENAR_PRO_URL = "/interface-test/in/ui/getScenariosByProjectId";
    public static final String EXECUTE_SCRIPT_URL =  "/interface-test/in/ui/executeTestScript";
    public static final String GET_RESULT_URL = "/interface-test/in/ui/getExecutionResult/{executionKey}";
    public static final String EXECUTE_SCENARIO_URL = "/interface-test/in/ui/executeScenario";

    public static final String UI_PLATFORM = "UI_PLATFORM_";
    public static final String UI_AUTO = "UI_AUTO_";

    public static final String STR_MINUS_ONE = "-1";
    public static final String STR_ZERO = "0";
    public static final String STR_ONE = "1";
    public static final String STR_TWO = "2";
    public static final String STR_THREE = "3";
    public static final String STR_FOUR = "4";
    public static final String STR_FIVE = "5";
    public static final String STR_SIX = "6";

    public static final String AK = "Ak";
    public static final String HEADER_TYPE = "Content-Type";
    public static final String HEADER_VALUE = "application/json";
    public static final String EXECUTION_KEY = "executionKey";
    public static final String EXECUTE_STATUS = "executeStatus";

    public static final String EXEC_ERR = "执行失败";
    public static final String INVALID = "invalid ";
    public static final String EXEC_TOO_LONG = "执行失败，执行时间过长";

    public static final String SCRIPT_IS_NULL = "保存的脚本内容不能为空";

    public static final String ENGINE_VERSION = "engineVersion";
    public static final String ENGINE_DEFAULT_VERSION = "1.0.0";
    public static final String VARIABLES = "variables";
    public static final String RUNTIME = "runtime";

    public static final String DETAIL_ID = "test";
    public static final String DETAIL_TITLE = "点击控件";
    public static final String DETAIL_IMG = "test.jpg";
    public static final String DETAIL_LIB = "NK.Appium";
    public static final String DETAIL_COMMAND = "ifExist";

    public static final String TARGET_USING = "text";
    public static final String TARGET_VALUE = "首页";
    public static final String TARGET_TYPE = "targetType";
    public static final String TARGET = "target";
    public static final String TEST_TARGET = "testTarget";
    public static final String TYPE_MOB = "mobile";

    public static final String COMMANDS = "commands";
    public static final String TIMEOUT = "timeout";
    public static final String GLOBAL_SET = "globalSettings";

    public static final String CREATED_BY = "createdBy";
    public static final String SCRIPT_INFO = "scriptInfo";

    public static final String SCRIPT_DEP = "scriptDependencies";
    public static final String COM_DEP = "componentDependencies";
    public static final String RESOURCE = "resources";

    public static final String APP_PACKAGE = "appPackage";
    public static final String UUID = "id";

    public static final String DEL_SCRIPT_INFO = "删除[%s]系统脚本：%s";
    public static final String DEL_SCRIPT_LIST = "【批量删除脚本】系统：%s，共%d条";
    public static final String SCRIPT_MODULE = "脚本管理";

    public static final String SCRIPT_URL = "scriptUrl";
    public static final String DATA_URL = "dataUrl";

    public static final String ARGS = "args";
    public static final String RES_ID = "resId";
    public static final String EXT_ATTRS = "extAttrs";
    public static final String COMMAND_NAME = "commandName";

    public static final String SCRIPT_ID = "scriptId";
    public static final String TYPE = "type";

    public static final String CASE_NUM = "caseNum";
    public static final String HAS_AND = "hasAndroid";
    public static final String HAS_IOS = "hasIOS";
    public static final String HAS_PC = "hasPC";
    public static final String HAS_MOB = "hasMob";
    public static final String APP_ALIVE = "appAlive";

    public static final String COPY_SCRIPT_NAME = "%s-副本(%d)";

    public static final String BEGIN_TIME = " 00:00:00";
    public static final String END_TIME = " 23:59:59";
    public static final String TIME_PATTERN = "yyyy-MM-dd HH:ss:mm";

    public static final String CODE = "code";

    public static final String STR_FORMAT = "%05d";
    public static final String SYS_UD = "_UD";

    public static final String SCRIPT_CODE = "UITEST-ScriptCode:";
    public static final String NAME_HAS_SAME = "名称重复,添加失败";

    public static final String REGEX_NAME = "^[a-zA-Z_]([a-zA-Z0-9_]+)?$";

    public static final String DATA_WRITE_SUCCESS = "全局变量值写入成功！";
    public static final String DATA_WRITE_FAIL = "全局变量值写入失败！";

    public static final String INPUT_SET_IMPORT_MODULE = "输入项导入模板";
    public static final String UTF = "utf8";
    public static final String APPLICATION_CHARSET = "application/vnd.ms-excel;charset=utf-8";
    public static final String SIMPLE_FORMAT = "yyyy-MM-dd";

    public static final String START = "start";
    public static final String END = "end";
    public static final String NODES = "nodes";

    public static final String ORDER_BY_ENV = "env_id";

    public static final String PATH = "path";
    public static final String FILE_INPUT_DATA_SET = "输入项数据集";

    public static final String SHEET = "sheet1";
    public static final String FILE_EXPORT_INPUT = "导出输入项名称";

    public static final String COMMON_DATA_SET = "一般用例集";
    public static final String SCENE_DATA_SET = "场景用例集";
    public static final String SYSTEM_TENANT_ID = "NK";

    public static final String DATA_FIRST_NODE = "TOP";
    public static final String DEFAULT_DATA_SET = "默认数据集-[%s]";

    public static final String ANDROID_APP_PACKAGE = "【(Android)%s】";
    public static final String IOS_APP_PACKAGE = "【(IOS)%s】";
    public static final String HARMONY_APP_PACKAGE = "【(Harmony)%s】";

    public static final String APP_LIST = "appList";
    public static final String CREATED_TIME = "created_time";

    public static final String LIB_BUS_COM_TREE = "LIB_BUS_COM_TREE";
    public static final String BUS_COMPONENT_TREE = "BUS_COMPONENT_TREE";
    public static final String ATU_ELEMENT_TREE = "ATU_ELEMENT_TREE";

    public static final String SCRIPT_CASE_NO = "script-case-no";
    public static final String SCRIPT_CASE = "scriptCase";

    public static final String COM_DEFAULT_VERSION = "1.0.0";
    public static final String NEW_FILE = "newFile";

    public static final String BUS_COM_BATCH = "busComBatch";
    public static final String BUS_COM = "busCom";
    public static final String COM_VERSION_LOG = "引用发布";

    public static final String NUM_REGEX = "(\\([0-9]{1,2}\\)$)";

    public static final String TREE_TOP = "TOP";
    public static final String TREE_TOP_ONE = "TOP01";
    public static final String TREE_TOP_TWO = "TOP02";

    public static final String PLATFORM_COM = "公共组件库";
    public static final String PRO_COM = "系统组件库";

    public static final String WS_HOST = "host";
    public static final String WS_PORT = "port";
    public static final String WS_USER = "user";
    public static final String WS_PWD = "password";

    public static final String WS_HOST_NULL = "host不能为空";
    public static final String WS_PORT_NULL = "port不能为空";
    public static final String WS_USER_NULL = "user不能为空";
    public static final String WS_PWD_NULL = "password不能为空";

    public static final String CONNECT = "connect";
    public static final String ERROR =  "Error";
    public static final String TIMED_OUT = "timed out";
    public static final String MESSAGE = "message";
    public static final String AUTH = "Auth";

    public static final String CONNECT_TIME_OUT = "连接服务器超时 请检查ip和端口是否正确！";
    public static final String CONNECT_PWD_ERR = "连接服务器账号或密码错误 请重试！";
    public static final String CONNECT_EXCEPTION = "连接服务器异常 请重试！";
    public static final String FILE_PATH_ERR = "文件路径异常，不能存在特殊字符！";


    public static final String PING = "ping";
    public static final String PONG = "pong";
    public static final String SHOW_FILE_NAME = "ls -F ";
    public static final String DATA = "data";
    public static final String FILE_PATH = "filePath";

    public static final String DEL_ELE_INFO = "删除[%s]系统元素：%s";
    public static final String DEL_ELE_INFO_LIST = "【批量删除元素】系统：%s，共%d条";
    public static final String ELE_INFO_MODULE = "元素库管理";

    public static final String BMP = "bmp";
    public static final String JPG = "jpg";
    public static final String PNG = "png";

    public static final String INPUT_SET_MODULE = "输入项数据集导入模版";
    public static final String FILE_INPUT_SET_END = "-输入项数据集";
    public static final String GET_FIRST_NODE = "获取首节点成功";
    /**
     * 输入项数据集引用类型-静态数据
     */
    public static final String INPUT_SET_QUOTE_TYPE_STATIC = "1";
    /**
     * 输入项数据集引用类型-模糊数据
     */
    public static final String INPUT_SET_QUOTE_TYPE_FUZZY = "2";
    /**
     * 输入项数据集引用默认行
     */
    public static final int INPUT_SET_QUOTE_DEFAULT_ROW = 0;
    /**
     * 模糊数据引用前缀
     */
    public static final String FUZZY_DATA_QUOTE_PREFIX = "%{";
    /**
     * 模糊数据引用后缀
     */
    public static final String FUZZY_DATA_QUOTE_SUFFIX = "}";

    public static final String NODE_TYPE_INTERFACE = "interface";
    public static final String NODE_TYPE_PCBS = "pcbs";
    public static final String NODE_TYPE_PCCS = "pccs";
    public static final String NODE_TYPE_ANDROID = "andrio";
    public static final String NODE_TYPE_IOS = "ios";

}
