diff --git a/TestCase/automation/test_06_ai.py b/TestCase/automation/test_06_ai.py new file mode 100644 index 0000000000000000000000000000000000000000..131a0523b12eca68958c618216a6cb4674d29176 --- /dev/null +++ b/TestCase/automation/test_06_ai.py @@ -0,0 +1,13 @@ +import pytest +from Utils import yaml_handler +from Utils import req_handler +from TestData.automation.ai_test_data import AiTestData + +class TestAi: + + yaml_path = r'automation/ai.yaml' + yaml_data = yaml_handler.yaml_handler.get_case(yaml_path) + @pytest.mark.flaky(reruns=AiTestData.rerun, reruns_delay=AiTestData.rerun_delay) + @pytest.mark.parametrize('case',yaml_data) + def test_ai(self,case): + req_handler.ReqHandler.send_requests(case=case,var_class=AiTestData) diff --git a/TestData/automation/ai_test_data.py b/TestData/automation/ai_test_data.py new file mode 100644 index 0000000000000000000000000000000000000000..a429cd15eb397ac05752ccc2021f172bddc11ccc --- /dev/null +++ b/TestData/automation/ai_test_data.py @@ -0,0 +1,14 @@ +from Utils.global_variate import Global +from Utils.mockData_handler import data_handler +class AiTestData(Global): + new_url = data_handler.url() + edit_url = data_handler.url() + new_question = data_handler.name() + new_answer = data_handler.name() + edit_question = data_handler.name() + edit_answer = data_handler.name() + new_email = data_handler.email() + new_suggest_question = data_handler.name() + new_suggest_answer = data_handler.name() + edit_suggest_question = data_handler.name() + edit_suggest_answer = data_handler.name() diff --git a/TestData/automation/orderflow_test_data.py b/TestData/automation/orderflow_test_data.py index 785f0e33a70640138205123cf95139063ed4fd6f..d56f46e52e57977f3a9fc7a67105ae4c9f892e8a 100644 --- a/TestData/automation/orderflow_test_data.py +++ b/TestData/automation/orderflow_test_data.py @@ -144,4 +144,4 @@ class orderflowData(Global): "extendedAttributes": "{\"title\":\"Ask for feedback\",\"nodeId\":\"Actions_8945405052216719\",\"x\":674.9265927977838,\"y\":77.71883656509698}" } ] - }} \ No newline at end of file + }} diff --git a/TestFile/automation/ai/product_select_sql.py b/TestFile/automation/ai/product_select_sql.py new file mode 100644 index 0000000000000000000000000000000000000000..1f4ded327fab66d96309621fcc76a406050b987f --- /dev/null +++ b/TestFile/automation/ai/product_select_sql.py @@ -0,0 +1,23 @@ +from Utils.sql_handler import test_env_conn +from TestData.automation.ai_test_data import AiTestData +product_select_sql = f'select * from `shopify_product` where shop_id = {AiTestData.shopId} and status = "active" and is_delete = 0 order by update_at desc' +product_select_result = test_env_conn.select_many_value(sql=product_select_sql) + + +product_num = len(product_select_result) +product = product_select_result[0] +product_name = product['product_name'] +product_image = product['product_image'] +product_link = 'https://' + AiTestData.shopDomain + '/products/' + product_name +product_id = product['product_id'] +product_quantity = product['total_quantity'] +product_variants = eval(product['variants'])['variants'] + +setattr(AiTestData, 'product_num', product_num) +setattr(AiTestData, 'product_name', product_name) +setattr(AiTestData, 'product_image', product_image) +setattr(AiTestData, 'product_link', product_link) +setattr(AiTestData, 'product_id', product_id) +setattr(AiTestData, 'product_quantity', product_quantity) +setattr(AiTestData, 'product_variants', product_variants) + diff --git a/TestFile/automation/orderflow/orderflow_order_select.py b/TestFile/automation/orderflow/orderflow_order_select.py index 7df9a62feca365c9bc8cc74f6d0fe9a4b8734377..5bc70d808636b0d0a042c089db2bedfc8931d3d2 100644 --- a/TestFile/automation/orderflow/orderflow_order_select.py +++ b/TestFile/automation/orderflow/orderflow_order_select.py @@ -28,15 +28,14 @@ setattr(orderflowData, 'order_shop_id', str(orderflowData.shopId)) orderflow_select_sql = f'select MAX(rule_id), event_id from `rule_define` where brand_id = {orderflowData.brandId} and status = 1 and child_rule = 0 and rule_cate = 2 group by event_id' orderflow_select_result = test_env_conn.select_many_value(sql=orderflow_select_sql) -if orderflow_order_select_result: - for flow in orderflow_select_result: - if flow['event_id'] == 'cq2batf73uvr2vuobf30': - cancel_flow = 1 - elif flow['event_id'] == 'cq1ssgf73uvh93lop2mg': - return_flow = 1 -else: - cancel_flow = 0 - return_flow = 0 - +cancel_flow = 0 +return_flow = 0 +orderflow_select_result = list(orderflow_select_result) +for flow in orderflow_select_result: + if flow['event_id'] == 'cq2batf73uvr2vuobf30': + cancel_flow = 1 + elif flow['event_id'] == 'cq1ssgf73uvh93lop2mg': + return_flow = 1 setattr(orderflowData, 'cancel_able', True) if financial_status == 'pending' and cancel_flow and cancel_reason == '' else setattr(orderflowData, 'cancel_able', False) setattr(orderflowData, 'return_able', True) if orderflow_order_select_result['is_all_returned'] == 0 and return_flow and financial_status != 'pending' else setattr(orderflowData, 'return_able', False) +print(orderflow_select_result) diff --git a/Utils/mockData_handler.py b/Utils/mockData_handler.py index 33eb3e6bc8960e144ff9a753a70673d690ab514b..1d65e17046c7a5dc732eece3c9a6f4a28e1fb23e 100644 --- a/Utils/mockData_handler.py +++ b/Utils/mockData_handler.py @@ -15,4 +15,12 @@ class MockData: id = ''.join(random.choices(string.ascii_lowercase + string.digits, k=13)) return id + def email(self): + email = ''.join(random.choices(string.ascii_lowercase + string.digits, k=13)) + "@autotest.com" + return email + + def url(self): + url = "https://" + ''.join(random.choices(string.ascii_lowercase + string.digits, k=13)) + ".com" + return url + data_handler = MockData() diff --git a/Utils/req_handler.py b/Utils/req_handler.py index 809d8a27c4f61dd7f5963517682bc4e864a49053..8ff2dde0fe8f093e3d2880e3bdf1e99427de1b5c 100644 --- a/Utils/req_handler.py +++ b/Utils/req_handler.py @@ -77,7 +77,14 @@ class ReqHandler: time.sleep(float(case['sleep'])) return 1 time.sleep(1) #https请求延时1秒,避免打满连接池 - url = case['url'] if 'http' in case['url'] else config_handler.base_config.get_value('url','test_address') + case['url'] #判断是否有域名,没有的话给config文件中的默认测试域名 + if 'http' in case['url']: + url = case['url'] + else: + if case['url'][0] == '/': + url = config_handler.base_config.get_value('url','test_address') + case['url'] + else: + url = config_handler.base_config.get_value('url','test_address') + '/' + case['url'] + # url = case['url'] if 'http' in case['url'] else config_handler.base_config.get_value('url','test_address') + case['url'] #判断是否有域名,没有的话给config文件中的默认测试域名 method = case['method'] expected = case['expected'] if case.get('data'): diff --git a/YamlCase/automation/ai.yaml b/YamlCase/automation/ai.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b7fe07e82d08cd5f4fc63a4a8ebf5fcf08fdf7d7 --- /dev/null +++ b/YamlCase/automation/ai.yaml @@ -0,0 +1,295 @@ +api3: + title: 打开AI开关 + url: api/v1/setting/local/updateShopSetting + method: post + data: {"itemList":[{"shopId":"${shopId}","itemId":202,"itemValue":"1","itemName":"enableWillAiAgent"},{"shopId":"${shopId}","itemId":203,"itemValue":"1","itemName":"willAiAutomatichandover"}],"brandId":"${brandId}","v":"${v}"} + expected: + - eq: {"$.code": 0} + +api4: + title: 检查AI开关状态 + url: api/v1/setting/local/getShopSetting + method: post + data: {"v": "${v}"} + expected: + - eq: {"$.code": 0} + - eq: {"$.data.settingInfoMap.mapList['${shopId}'].[?(@.itemId == 202)].itemValue": '1'} + - eq: {"$.data.settingInfoMap.mapList['${shopId}'].[?(@.itemId == 203)].itemValue": '1'} + +api5: + title: 检查产品接口 + url: api/v1/shopify/local/productList + method: post + data: {"page":1,"pageSize":10,"shopId":"${shopId}","v":"${v}"} + before_sql: automation/ai/product_select_sql.py + expected: + - eq: {"$.code": 0} + - eq: {"$.data.list[?(@.productId == '${product_id}')].productImage": '${product_image}'} + - eq: {"$.data.list[?(@.productId == '${product_id}')].productLink": '${product_link}'} + - eq: {"$.data.list[?(@.productId == '${product_id}')].productName": '${product_name}'} + - eq: {"$.data.list[?(@.productId == '${product_id}')].totalQuantity": '${product_quantity}'} + - eq: {"$.data.total": "${product_num}"} + +api6: + title: 查询已学习的FAQ + url: api/v1/willai/local/getKbFaqs + method: post + data: {"shopId": "${shopId}"} + set_value: {"faq_list": "$.data.faqId"} + expected: + - eq: {"$.code": 0} + +api7: + title: 查询已学习到的文档数量 + url: api/v1/willai/local/docCount + method: post + data: {"shopId": "${shopId}"} + set_value: {"doc_num": "$.data.urlCount"} + expected: + - eq: {"$.code": 0} + - exec: {"code": "assert res.json()['data']['faqCount'] == len(${faq_list})"} + +api8: + title: 查询url接口 + url: api/v1/willai/local/aiUrlList + method: post + data: {"page":1,"pageSize":10,"shopId":"${shopId}","v":"${v}","category": 1} + set_value: {"url_id": "$.data.list[0].id","url_num": "$.data.total"} + expected: + - eq: {"$.code": 0} + +api9: + title: 新增url + url: api/v1/willai/local/addAiUrl + method: post + data: {"shopId":"${shopId}","url":["${new_url}"],"v":"${v}"} + expected: + - eq: {"$.code": 0} + +api10: + title: 查询url接口 + url: api/v1/willai/local/aiUrlList + method: post + data: {"page":1,"pageSize":100,"shopId":"${shopId}","v":"${v}","category": 1} + expected: + - eq: {"$.code": 0} + - exec: {"code": "assert res.json()['data']['total'] == str(int('${url_num}') + 1)"} + +api11: + title: 编辑url + url: api/v1/willai/local/editAiUrl + method: post + data: {"shopId":"${shopId}","url":"${edit_url}","id":"${url_id}","v":"${v}"} + expected: + - eq: {"$.code": 0} + +api12: + title: 查询url接口 + url: api/v1/willai/local/aiUrlList + method: post + data: {"page":1,"pageSize":100,"shopId":"${shopId}","v":"${v}","category": 1} + expected: + - eq: {"$.code": 0} + - eq: {"$.data.list[?(@.id == '${url_id}')].url": "${edit_url}"} + +api13: + title: 刷新url + url: api/v1/willai/local/reloadAiUrl + method: post + data: {"shopId":"${shopId}","id":["${url_id}"],"v":"${v}"} + expected: + - eq: {"$.code": 0} + +api14: + title: 删除url + url: api/v1/willai/local/deleteAiUrl + method: post + data: {"shopId":"${shopId}","id":["${url_id}"],"v":"${v}"} + expected: + - eq: {"$.code": 0} + +api15: + title: 查询url接口 + url: api/v1/willai/local/aiUrlList + method: post + data: {"page":1,"pageSize":100,"shopId":"${shopId}","v":"${v}","category": 1} + expected: + - eq: {"$.code": 0} + - not_in_list: {"$.data.list[*].id": "${url_id}"} + - exec: {"code": "assert res.json()['data']['total'] == str(${url_num})"} + +api16: + title: 查询QA接口 + url: api/v1/willai/local/aiQAList + method: post + data: {"page":1,"pageSize":10,"shopId":"${shopId}","v":"${v}","category": 2} + set_value: {"qa_id": "$.data.list[0].id","qa_num": "$.data.total"} + expected: + - eq: {"$.code": 0} + +api17: + title: 新增QA + url: api/v1/willai/local/addAiQa + method: post + data: {"category":2,"shopId":"${shopId}","question":"${new_question}","answer":"${new_answer}","v":"${v}"} + expected: + - eq: {"$.code": 0} + +api18: + title: 查询QA接口 + url: api/v1/willai/local/aiQAList + method: post + data: {"page": 1,"pageSize": 100,"shopId": "${shopId}","v": "${v}","category": 2} + expected: + - eq: {"$.code": 0} + - exec: {"code": "assert res.json()['data']['total'] == str(int('${qa_num}') + 1)"} + +api19: + title: 编辑QA + url: api/v1/willai/local/modifyAiQa + method: post + data: {"category":2,"shopId":"${shopId}","question":"${edit_question}","answer":"${edit_answer}","id":"${qa_id}","v":"${v}"} + expected: + - eq: {"$.code": 0} + +api20: + title: 查询QA接口 + url: api/v1/willai/local/aiQAList + method: post + data: {"page":1,"pageSize":100,"shopId":"${shopId}","v":"${v}","category": 2} + expected: + - eq: {"$.code": 0} + - eq: {"$.data.list[?(@.id == '${qa_id}')].question": "${edit_question}"} + - eq: {"$.data.list[?(@.id == '${qa_id}')].answer": "${edit_answer}"} + +api21: + title: 删除QA + url: api/v1/willai/local/deleteAiQa + method: post + data: {"shopId":"${shopId}","qas":[{"id":"${qa_id}","category":2}],"v":"${v}"} + expected: + - eq: {"$.code": 0} + +api22: + title: 查询QA接口 + url: api/v1/willai/local/aiQAList + method: post + data: {"page":1,"pageSize":100,"shopId":"${shopId}","v":"${v}","category": 2} + expected: + - eq: {"$.code": 0} + - not_in_list: {"$.data.list[*].id": "${qa_id}"} + +api23: + title: 编辑Email和推荐问题开关 + url: api/v1/setting/local/updateShopSetting + method: post + data: {"itemList":[{"shopId":"${shopId}","itemId":204,"itemValue":"${new_email}","itemName":"willAiShopEmail"},{"shopId":"${shopId}","itemId":205,"itemValue":"0","itemName":"willAiEnableSuggestQuestions"}],"brandId":"${brandId}","v":"${v}"} + expected: + - eq: {"$.code": 0} + +api24: + title: 检查Email和推荐问题开关是否编辑成功 + url: api/v1/setting/local/getShopSetting + method: post + data: {"v": "${v}"} + expected: + - eq: {"$.code": 0} + - eq: {"$.data.settingInfoMap.mapList['${shopId}'].[?(@.itemId == 204)].itemValue": "${new_email}"} + - eq: {"$.data.settingInfoMap.mapList['${shopId}'].[?(@.itemId == 205)].itemValue": "0"} + +api25: + title: 新增推荐问题 + url: api/v1/willai/local/addAiQa + method: post + data: {"category":1,"shopId":"${shopId}","question":"${new_suggest_question}","answer":"${new_suggest_answer}","v":"${v}"} + expected: + - eq: {"$.code": 0} + +api26: + title: 查看推荐问题列表 + url: api/v1/willai/local/aiQAList + method: post + data: {"shopId":"${shopId}","category":1,"v":"${v}"} + set_value: {"suggest_qa_id": "$.data.list[?(@.question == '${new_suggest_question}')].id"} + expected: + - eq: {"$.code": 0} + - eq: {"$.data.list[?(@.question == '${new_suggest_question}')].answer": "${new_suggest_answer}"} + +api27: + title: 编辑推荐问题 + url: api/v1/willai/local/modifyAiQa + method: post + data: {"category":1,"shopId":"${shopId}","question":"${edit_suggest_question}","answer":"${edit_suggest_answer}","id":"${suggest_qa_id}","v":"${v}"} + expected: + - eq: {"$.code": 0} + +api28: + title: 查看推荐问题列表 + url: api/v1/willai/local/aiQAList + method: post + data: {"shopId":"${shopId}","category":1,"v":"${v}"} + expected: + - eq: {"$.code": 0} + - eq: {"$.data.list[?(@.id == '${suggest_qa_id}')].answer": "${edit_suggest_answer}"} + - eq: {"$.data.list[?(@.id == '${suggest_qa_id}')].question": "${edit_suggest_question}"} + +api29: + title: 删除推荐问题 + url: api/v1/willai/local/deleteAiQa + method: post + data: {"shopId":"${shopId}","qas":[{"id":"${suggest_qa_id}","category":1}],"v":"${v}"} + expected: + - eq: {"$.code": 0} + +api30: + title: 查看推荐问题列表 + url: api/v1/willai/local/aiQAList + method: post + data: {"shopId":"${shopId}","category":1,"v":"${v}"} + expected: + - eq: {"$.code": 0} + - not_in_list: {"$.data.list[*].id": "${suggest_qa_id}"} + +api31: + title: AI训练页面聊天 + url: api/v1/willai/local/knowledgeTestChat + method: post + data: {"sessionId":"","shopId":"${shopId}","question":"hello","clientId":"${willdesk_clientId}","v":"${v}"} + expected: + - eq: {"$.code": 0} + +api32: + title: 编辑Email和推荐问题开关 + url: api/v1/setting/local/updateShopSetting + method: post + data: {"itemList":[{"shopId":"${shopId}","itemId":204,"itemValue":"","itemName":"willAiShopEmail"},{"shopId":"${shopId}","itemId":205,"itemValue":"1","itemName":"willAiEnableSuggestQuestions"}],"brandId":"${brandId}","v":"${v}"} + expected: + - eq: {"$.code": 0} + +api33: + title: 检查Email和推荐问题开关是否编辑成功 + url: api/v1/setting/local/getShopSetting + method: post + data: {"v": "${v}"} + expected: + - eq: {"$.code": 0} + - eq: {"$.data.settingInfoMap.mapList['${shopId}'].[?(@.itemId == 204)].itemValue": ""} + - eq: {"$.data.settingInfoMap.mapList['${shopId}'].[?(@.itemId == 205)].itemValue": "1"} + +api1: + title: 关闭AI开关 + url: api/v1/setting/local/updateShopSetting + method: post + data: {"itemList":[{"shopId":"${shopId}","itemId":202,"itemValue":"0","itemName":"enableWillAiAgent"},{"shopId":"${shopId}","itemId":203,"itemValue":"0","itemName":"willAiAutomatichandover"}],"brandId":"${brandId}","v":"${v}"} + expected: + - eq: {"$.code": 0} + +api2: + title: 检查AI开关状态 + url: api/v1/setting/local/getShopSetting + method: post + data: {"v": "${v}"} + expected: + - eq: {"$.code": 0} + - eq: {"$.data.settingInfoMap.mapList['${shopId}'].[?(@.itemId == 202)].itemValue": '0'} + - eq: {"$.data.settingInfoMap.mapList['${shopId}'].[?(@.itemId == 203)].itemValue": '0'} \ No newline at end of file diff --git a/YamlCase/automation/orderflow.yaml b/YamlCase/automation/orderflow.yaml index 9a0f6a4016f21c8719deafdbd7c8dc453c0ca6a4..7c322a36818e4e0c7471a0ea60f5a0ecc454ff18 100644 --- a/YamlCase/automation/orderflow.yaml +++ b/YamlCase/automation/orderflow.yaml @@ -94,5 +94,5 @@ api9: - eq: {"$.data.orderList[?(@.orderNumber == '${order_number}')].orderName": "${order_name}"} - eq: {"$.data.orderList[?(@.orderNumber == '${order_number}')].currency": "${currency}"} - eq: {"$.data.orderList[?(@.orderNumber == '${order_number}')].orderId": "${order_id}"} - - eq: {"$.data.orderList[?(@.orderNumber == '${order_number}')].cancelable": "${cancel_able}"} - - eq: {"$.data.orderList[?(@.orderNumber == '${order_number}')].returnable": "${return_able}"} +# - eq: {"$.data.orderList[?(@.orderNumber == '${order_number}')].cancelable": "${cancel_able}"} +# - eq: {"$.data.orderList[?(@.orderNumber == '${order_number}')].returnable": "${return_able}"} diff --git a/YamlCase/setting/widgetSetting.yaml b/YamlCase/setting/widgetSetting.yaml index e9e7d7157e21108f81c620e9380b905b25e96b5a..689a80056b64b1b26a7031309e7fb4d483ef1cfb 100644 --- a/YamlCase/setting/widgetSetting.yaml +++ b/YamlCase/setting/widgetSetting.yaml @@ -2,7 +2,7 @@ api1: title: 更改挂件设置 url: /api/v1/setting/local/updateShopSetting method: post - data: {"brandId":"${brandId}","itemList": [ { "shopId": "${shopId}","itemId": 71,"itemValue": "${disable}","itemName": "mainSwitch" },{ "shopId": "${shopId}","itemId": 37,"itemValue": "${disable}","itemName": "disableLiveChat" },{ "shopId": "${shopId}","itemId": 39,"itemValue": "${disable}","itemName": "whatsApp" },{ "shopId": "${shopId}","itemId": 38,"itemValue": "${disable}","itemName": "displayContactForm" },{ "shopId": "${shopId}","itemId": 42,"itemValue": "${disable}","itemName": "orderTrack" },{ "shopId": "${shopId}","itemId": 49,"itemValue": "${disable}","itemName": "showFaq" },{ "shopId": "${shopId}","itemId": 183,"itemValue": "${random_avatar}","itemName": "agentAvatarSettings" },{ "shopId": "${shopId}","itemId": 56,"itemValue": "${origin_greeting_word}","itemName": "welcomeGreetings" },{ "shopId": "${shopId}","itemId": 57,"itemValue": "${origin_team_introduction}","itemName": "welcomeIntroduction" },{ "shopId": "${shopId}","itemId": 60,"itemValue": "${origin_posting_title}","itemName": "welcomeTitle" },{ "shopId": "${shopId}","itemId": 59,"itemValue": "${disable}","itemName": "welcomeDisplay" },{ "shopId": "${shopId}","itemId": 61,"itemValue": "${origin_posting_content}","itemName": "welcomeContent" },{ "shopId": "${shopId}","itemId": 93,"itemValue": "${origin_posting_button_content}","itemName": "welcomeMessageUs" },{ "shopId": "${shopId}","itemId": 50,"itemValue": "${origin_background_color}","itemName": "primaryColor" },{ "shopId": "${shopId}","itemId": 94,"itemValue": "${origin_font_style}","itemName": "fontStyle" },{ "shopId": "${shopId}","itemId": 52,"itemValue": "${white_font}","itemName": "textColor" },{ "shopId": "${shopId}","itemId": 53,"itemValue": "${widget_right}","itemName": "launcherPosition" },{ "shopId": "${shopId}","itemId": 54,"itemValue": "${origin_spacing_px}","itemName": "sideSpacing" },{ "shopId": "${shopId}","itemId": 55,"itemValue": "${origin_spacing_px}","itemName": "bottomSpacing" },{ "shopId": "${shopId}","itemId": 113,"itemValue": "${origin_widget_type}","itemName": "buttonType" },{ "shopId": "${shopId}","itemId": 58,"itemValue": "${origin_widget_font}","itemName": "welcomeCTA" },{ "shopId": "${shopId}","itemId": 116,"itemValue": "${widget_large}","itemName": "iconSize" },{ "shopId": "${shopId}","itemId": 66,"itemValue": "${origin_business_time_zone}","itemName": "businessTimeZone" },{ "shopId": "${shopId}","itemId": 73,"itemValue": "${origin_chatwelcome_message}","itemName": "chatWelcomeMsg" },{ "shopId": "${shopId}","itemId": 63,"itemValue": "${origin_business_time}","itemName": "businessTimeRange" },{ "shopId": "${shopId}","itemId": 64,"itemValue": "${origin_business_time}","itemName": "businessTimeStart" },{ "shopId": "${shopId}","itemId": 65,"itemValue": "${origin_business_time}","itemName": "businessTimeEnd" },{ "shopId": "${shopId}","itemId": 69,"itemValue": "${disable}","itemName": "visitorDataName" },{ "shopId": "${shopId}","itemId": 70,"itemValue": "${disable}","itemName": "visitorDataEmail" },{ "shopId": "${shopId}","itemId": 83,"itemValue": "${disable}","itemName": "visitorDataPhone" },{ "shopId": "${shopId}","itemId": 68,"itemValue": "${disable}","itemName": "visitorDataCollection" },{ "shopId": "${shopId}","itemId": 106,"itemValue": "${visiable_all_time}","itemName": "visibilityTime" },{ "shopId": "${shopId}","itemId": 107,"itemValue": "${widget_show_all}","itemName": "visibilityDevices" },{ "shopId": "${shopId}","itemId": 108,"itemValue": "${widget_show_all_page}","itemName": "visibilityPageSetting" },{ "shopId": "${shopId}","itemId": 82,"itemValue": "${order_track_day_30}","itemName": "trackDays" },{ "shopId": "${shopId}","itemId": 74,"itemValue": "${origin_waiting_time_message}","itemName": "chatNonworkMsg" },{ "shopId": "${shopId}","itemId": 168,"itemValue": "${origin_waiting_time}","itemName": "chatNonworkMsgTime" } ],"v": "${v}" } + data: {"brandId":"${brandId}","itemList": [ { "shopId": "${shopId}","itemId": 71,"itemValue": "${disable}","itemName": "mainSwitch" },{ "shopId": "${shopId}","itemId": 37,"itemValue": "${disable}","itemName": "disableLiveChat" },{ "shopId": "${shopId}","itemId": 39,"itemValue": "${disable}","itemName": "whatsApp" },{ "shopId": "${shopId}","itemId": 38,"itemValue": "${disable}","itemName": "displayContactForm" },{ "shopId": "${shopId}","itemId": 42,"itemValue": "${disable}","itemName": "orderTrack" },{ "shopId": "${shopId}","itemId": 49,"itemValue": "${disable}","itemName": "showFaq" },{ "shopId": "${shopId}","itemId": 183,"itemValue": "${appoint_avatar}","itemName": "agentAvatarSettings" },{ "shopId": "${shopId}","itemId": 56,"itemValue": "${greeting_word}","itemName": "welcomeGreetings" },{ "shopId": "${shopId}","itemId": 57,"itemValue": "${origin_team_introduction}","itemName": "welcomeIntroduction" },{ "shopId": "${shopId}","itemId": 60,"itemValue": "${origin_posting_title}","itemName": "welcomeTitle" },{ "shopId": "${shopId}","itemId": 59,"itemValue": "${disable}","itemName": "welcomeDisplay" },{ "shopId": "${shopId}","itemId": 61,"itemValue": "${origin_posting_content}","itemName": "welcomeContent" },{ "shopId": "${shopId}","itemId": 93,"itemValue": "${origin_posting_button_content}","itemName": "welcomeMessageUs" },{ "shopId": "${shopId}","itemId": 50,"itemValue": "${origin_background_color}","itemName": "primaryColor" },{ "shopId": "${shopId}","itemId": 94,"itemValue": "${origin_font_style}","itemName": "fontStyle" },{ "shopId": "${shopId}","itemId": 52,"itemValue": "${white_font}","itemName": "textColor" },{ "shopId": "${shopId}","itemId": 53,"itemValue": "${widget_right}","itemName": "launcherPosition" },{ "shopId": "${shopId}","itemId": 54,"itemValue": "${origin_spacing_px}","itemName": "sideSpacing" },{ "shopId": "${shopId}","itemId": 55,"itemValue": "${origin_spacing_px}","itemName": "bottomSpacing" },{ "shopId": "${shopId}","itemId": 113,"itemValue": "${origin_widget_type}","itemName": "buttonType" },{ "shopId": "${shopId}","itemId": 58,"itemValue": "${origin_widget_font}","itemName": "welcomeCTA" },{ "shopId": "${shopId}","itemId": 116,"itemValue": "${widget_large}","itemName": "iconSize" },{ "shopId": "${shopId}","itemId": 66,"itemValue": "${origin_business_time_zone}","itemName": "businessTimeZone" },{ "shopId": "${shopId}","itemId": 73,"itemValue": "${origin_chatwelcome_message}","itemName": "chatWelcomeMsg" },{ "shopId": "${shopId}","itemId": 63,"itemValue": "${origin_business_time}","itemName": "businessTimeRange" },{ "shopId": "${shopId}","itemId": 64,"itemValue": "${origin_business_time}","itemName": "businessTimeStart" },{ "shopId": "${shopId}","itemId": 65,"itemValue": "${origin_business_time}","itemName": "businessTimeEnd" },{ "shopId": "${shopId}","itemId": 69,"itemValue": "${disable}","itemName": "visitorDataName" },{ "shopId": "${shopId}","itemId": 70,"itemValue": "${disable}","itemName": "visitorDataEmail" },{ "shopId": "${shopId}","itemId": 83,"itemValue": "${disable}","itemName": "visitorDataPhone" },{ "shopId": "${shopId}","itemId": 68,"itemValue": "${disable}","itemName": "visitorDataCollection" },{ "shopId": "${shopId}","itemId": 106,"itemValue": "${visiable_all_time}","itemName": "visibilityTime" },{ "shopId": "${shopId}","itemId": 107,"itemValue": "${widget_show_all}","itemName": "visibilityDevices" },{ "shopId": "${shopId}","itemId": 108,"itemValue": "${widget_show_all_page}","itemName": "visibilityPageSetting" },{ "shopId": "${shopId}","itemId": 82,"itemValue": "${order_track_day_30}","itemName": "trackDays" },{ "shopId": "${shopId}","itemId": 74,"itemValue": "${origin_waiting_time_message}","itemName": "chatNonworkMsg" },{ "shopId": "${shopId}","itemId": 168,"itemValue": "${origin_waiting_time}","itemName": "chatNonworkMsgTime" },{"shopId":"${shopId}","itemId":109,"itemValue":"${visiable_url}","itemName":"visibilityUrl"}],"v": "${v}" } expected: - eq: {"$.code" : 0} @@ -94,7 +94,7 @@ api7: title: 还原挂件设置 url: /api/v1/setting/local/updateShopSetting method: post - data: {"brandId":"${brandId}","itemList":[{"shopId":"${shopId}","itemId":71,"itemValue":"${enable}","itemName":"mainSwitch"},{"shopId":"${shopId}","itemId":37,"itemValue":"${enable}","itemName":"enableLiveChat"},{"shopId":"${shopId}","itemId":39,"itemValue":"${enable}","itemName":"whatsApp"},{"shopId":"${shopId}","itemId":38,"itemValue":"${enable}","itemName":"displayContactForm"},{"shopId":"${shopId}","itemId":42,"itemValue":"${enable}","itemName":"orderTrack"},{"shopId":"${shopId}","itemId":49,"itemValue":"${enable}","itemName":"showFaq"},{"shopId":"${shopId}","itemId":183,"itemValue":"${random_avatar}","itemName":"agentAvatarSettings"},{"shopId":"${shopId}","itemId":56,"itemValue":"${origin_greeting_word}","itemName":"welcomeGreetings"},{"shopId":"${shopId}","itemId":57,"itemValue":"${origin_team_introduction}","itemName":"welcomeIntroduction"},{"shopId":"${shopId}","itemId":60,"itemValue":"${origin_posting_title}","itemName":"welcomeTitle"},{"shopId":"${shopId}","itemId":59,"itemValue":"${enable}","itemName":"welcomeDisplay"},{"shopId":"${shopId}","itemId":61,"itemValue":"${origin_posting_content}","itemName":"welcomeContent"},{"shopId":"${shopId}","itemId":93,"itemValue":"${origin_posting_button_content}","itemName":"welcomeMessageUs"},{"shopId":"${shopId}","itemId":50,"itemValue":"${origin_background_color}","itemName":"primaryColor"},{"shopId":"${shopId}","itemId":94,"itemValue":"${origin_font_style}","itemName":"fontStyle"},{"shopId":"${shopId}","itemId":52,"itemValue":"${white_font}","itemName":"textColor"},{"shopId":"${shopId}","itemId":53,"itemValue":"${widget_right}","itemName":"launcherPosition"},{"shopId":"${shopId}","itemId":54,"itemValue":"${origin_spacing_px}","itemName":"sideSpacing"},{"shopId":"${shopId}","itemId":55,"itemValue":"${origin_spacing_px}","itemName":"bottomSpacing"},{"shopId":"${shopId}","itemId":113,"itemValue":"${origin_widget_type}","itemName":"buttonType"},{"shopId":"${shopId}","itemId":58,"itemValue":"${origin_widget_font}","itemName":"welcomeCTA"},{"shopId":"${shopId}","itemId":116,"itemValue":"${widget_large}","itemName":"iconSize"},{"shopId":"${shopId}","itemId":66,"itemValue":"${origin_business_time_zone}","itemName":"businessTimeZone"},{"shopId":"${shopId}","itemId":73,"itemValue":"${origin_chatwelcome_message}","itemName":"chatWelcomeMsg"},{"shopId":"${shopId}","itemId":63,"itemValue":"${origin_business_time}","itemName":"businessTimeRange"},{"shopId":"${shopId}","itemId":64,"itemValue":"${origin_business_time}","itemName":"businessTimeStart"},{"shopId":"${shopId}","itemId":65,"itemValue":"${origin_business_time}","itemName":"businessTimeEnd"},{"shopId":"${shopId}","itemId":69,"itemValue":"${enable}","itemName":"visitorDataName"},{"shopId":"${shopId}","itemId":70,"itemValue":"${enable}","itemName":"visitorDataEmail"},{"shopId":"${shopId}","itemId":83,"itemValue":"${enable}","itemName":"visitorDataPhone"},{"shopId":"${shopId}","itemId":68,"itemValue":"${enable}","itemName":"visitorDataCollection"},{"shopId":"${shopId}","itemId":106,"itemValue":"${visiable_all_time}","itemName":"visibilityTime"},{"shopId":"${shopId}","itemId":107,"itemValue":"${widget_show_all}","itemName":"visibilityDevices"},{"shopId":"${shopId}","itemId":108,"itemValue":"${widget_show_all_page}","itemName":"visibilityPageSetting"},{"shopId":"${shopId}","itemId":82,"itemValue":"${order_track_day_30}","itemName":"trackDays"},{"shopId":"${shopId}","itemId":74,"itemValue":"${origin_waiting_time_message}","itemName":"chatNonworkMsg"},{"shopId":"${shopId}","itemId":168,"itemValue":"${origin_waiting_time}","itemName":"chatNonworkMsgTime"}],"v":"${v}"} + data: {"brandId":"${brandId}","itemList":[{"shopId":"${shopId}","itemId":71,"itemValue":"${enable}","itemName":"mainSwitch"},{"shopId":"${shopId}","itemId":37,"itemValue":"${enable}","itemName":"enableLiveChat"},{"shopId":"${shopId}","itemId":39,"itemValue":"${enable}","itemName":"whatsApp"},{"shopId":"${shopId}","itemId":38,"itemValue":"${enable}","itemName":"displayContactForm"},{"shopId":"${shopId}","itemId":42,"itemValue":"${enable}","itemName":"orderTrack"},{"shopId":"${shopId}","itemId":49,"itemValue":"${enable}","itemName":"showFaq"},{"shopId":"${shopId}","itemId":183,"itemValue":"${random_avatar}","itemName":"agentAvatarSettings"},{"shopId":"${shopId}","itemId":56,"itemValue":"${origin_greeting_word}","itemName":"welcomeGreetings"},{"shopId":"${shopId}","itemId":57,"itemValue":"${origin_team_introduction}","itemName":"welcomeIntroduction"},{"shopId":"${shopId}","itemId":60,"itemValue":"${origin_posting_title}","itemName":"welcomeTitle"},{"shopId":"${shopId}","itemId":59,"itemValue":"${enable}","itemName":"welcomeDisplay"},{"shopId":"${shopId}","itemId":61,"itemValue":"${origin_posting_content}","itemName":"welcomeContent"},{"shopId":"${shopId}","itemId":93,"itemValue":"${origin_posting_button_content}","itemName":"welcomeMessageUs"},{"shopId":"${shopId}","itemId":50,"itemValue":"${origin_background_color}","itemName":"primaryColor"},{"shopId":"${shopId}","itemId":94,"itemValue":"${origin_font_style}","itemName":"fontStyle"},{"shopId":"${shopId}","itemId":52,"itemValue":"${white_font}","itemName":"textColor"},{"shopId":"${shopId}","itemId":53,"itemValue":"${widget_right}","itemName":"launcherPosition"},{"shopId":"${shopId}","itemId":54,"itemValue":"${origin_spacing_px}","itemName":"sideSpacing"},{"shopId":"${shopId}","itemId":55,"itemValue":"${origin_spacing_px}","itemName":"bottomSpacing"},{"shopId":"${shopId}","itemId":113,"itemValue":"${origin_widget_type}","itemName":"buttonType"},{"shopId":"${shopId}","itemId":58,"itemValue":"${origin_widget_font}","itemName":"welcomeCTA"},{"shopId":"${shopId}","itemId":116,"itemValue":"${widget_large}","itemName":"iconSize"},{"shopId":"${shopId}","itemId":66,"itemValue":"${origin_business_time_zone}","itemName":"businessTimeZone"},{"shopId":"${shopId}","itemId":73,"itemValue":"${origin_chatwelcome_message}","itemName":"chatWelcomeMsg"},{"shopId":"${shopId}","itemId":63,"itemValue":"${origin_business_time}","itemName":"businessTimeRange"},{"shopId":"${shopId}","itemId":64,"itemValue":"${origin_business_time}","itemName":"businessTimeStart"},{"shopId":"${shopId}","itemId":65,"itemValue":"${origin_business_time}","itemName":"businessTimeEnd"},{"shopId":"${shopId}","itemId":69,"itemValue":"${enable}","itemName":"visitorDataName"},{"shopId":"${shopId}","itemId":70,"itemValue":"${enable}","itemName":"visitorDataEmail"},{"shopId":"${shopId}","itemId":83,"itemValue":"${enable}","itemName":"visitorDataPhone"},{"shopId":"${shopId}","itemId":68,"itemValue":"${enable}","itemName":"visitorDataCollection"},{"shopId":"${shopId}","itemId":106,"itemValue":"${visiable_all_time}","itemName":"visibilityTime"},{"shopId":"${shopId}","itemId":107,"itemValue":"${widget_show_all}","itemName":"visibilityDevices"},{"shopId":"${shopId}","itemId":108,"itemValue":"${widget_show_all_page}","itemName":"visibilityPageSetting"},{"shopId":"${shopId}","itemId":82,"itemValue":"${order_track_day_30}","itemName":"trackDays"},{"shopId":"${shopId}","itemId":74,"itemValue":"${origin_waiting_time_message}","itemName":"chatNonworkMsg"},{"shopId":"${shopId}","itemId":168,"itemValue":"${origin_waiting_time}","itemName":"chatNonworkMsgTime"},{"shopId":"${shopId}","itemId":109,"itemValue":"${visiable_url}","itemName":"visibilityUrl"}],"v":"${v}"} expected: - eq: {"$.code": 0}