diff --git a/TestData/setting/shopify_integration_test_data.py b/TestData/setting/shopify_integration_test_data.py index 8179d15206ac4c86cce5640ef36d8b564a941185..bd8c1469109c2972281b6517e5c41cdd4541ba82 100644 --- a/TestData/setting/shopify_integration_test_data.py +++ b/TestData/setting/shopify_integration_test_data.py @@ -15,6 +15,8 @@ class shopifyIntegrationData(Global): append_shop_currency = '' append_shop_connect_status = 1 shop_source = 2 + append_js_shop_name = 'autotest_js_shop' + append_js_shop_url = 'autotest_js_shop.shopify.com' js_soucrce = 1 active_shop_email = 'zhanhuasheng@channelwill.cn' new_workspance_name = 'autotest_workspace' diff --git a/TestFile/setting/shopifyIntegration/shopifyIntegration_shop_select.py b/TestFile/setting/shopifyIntegration/shopifyIntegration_shop_select.py index 88bfe4a93a26c827a8dcd7f209b8c51be878f38a..2a5fcd360f390a2037ef76f657f27526cb265de9 100644 --- a/TestFile/setting/shopifyIntegration/shopifyIntegration_shop_select.py +++ b/TestFile/setting/shopifyIntegration/shopifyIntegration_shop_select.py @@ -7,7 +7,7 @@ shopify_shop_insert_sql = f"""INSERT INTO willdesk.shop (company_id,brand_id,`so """ new_shop_select_sql = f'select * from `shop` where brand_id = {shopifyIntegrationData.brandId} and shop_name = "{shopifyIntegrationData.append_shop_name}" and shop_domain = "{shopifyIntegrationData.append_shop_url}" and is_delete in (0,2) and `source` = {shopifyIntegrationData.shop_source}' js_shop_insert_sql = f"""INSERT INTO willdesk.shop (company_id,brand_id,`source`,shop_name,website_name,shop_domain,shop_url,shop_owner,phone,email,install_email,third_id,third_token,third_plan,money_format,time_zone,country,country_code,currency,province,city,address,zip,is_review,reviews,`language`,connect_status,shop_js,integrated_email,theme_id,theme_ext_version,faq_willdesk_doamin,faq_cname_domain,embedding_switch,embedding_check_time,is_delete,uninstall_time,create_at,update_at,integration_rdc) VALUES - ({shopifyIntegrationData.companyId},{shopifyIntegrationData.brandId},{shopifyIntegrationData.js_soucrce},'{shopifyIntegrationData.append_shop_name}','','{shopifyIntegrationData.append_shop_url}','','','',{shopifyIntegrationData.append_shop_email},'','{shopifyIntegrationData.append_third_id}','','','','','','','{shopifyIntegrationData.append_shop_currency}','','','','',0,0,'',{shopifyIntegrationData.append_shop_connect_status},'{shopifyIntegrationData.append_shop_js}',{shopifyIntegrationData.append_integrated_email},0,'v1','{shopifyIntegrationData.append_faq_willdesk_domain}',{shopifyIntegrationData.append_faq_cname_domain},1,'2024-04-23 17:18:55',2,NULL,'2024-04-23 17:18:55','2024-04-23 17:18:55',0); + ({shopifyIntegrationData.companyId},{shopifyIntegrationData.brandId},{shopifyIntegrationData.js_soucrce},'{shopifyIntegrationData.append_js_shop_name}','','{shopifyIntegrationData.append_js_shop_url}','','','',{shopifyIntegrationData.append_shop_email},'','{shopifyIntegrationData.append_third_id}','','','','','','','{shopifyIntegrationData.append_shop_currency}','','','','',0,0,'',{shopifyIntegrationData.append_shop_connect_status},'{shopifyIntegrationData.append_shop_js}',{shopifyIntegrationData.append_integrated_email},0,'v1','{shopifyIntegrationData.append_faq_willdesk_domain}',{shopifyIntegrationData.append_faq_cname_domain},1,'2024-04-23 17:18:55',2,NULL,'2024-04-23 17:18:55','2024-04-23 17:18:55',0); """ new_js_select_sql = f'select * from `shop` where brand_id = {shopifyIntegrationData.brandId} and shop_name = "{shopifyIntegrationData.append_shop_name}" and shop_domain = "{shopifyIntegrationData.append_shop_url}" and is_delete in (0,2) and `source` = {shopifyIntegrationData.js_soucrce}' @@ -37,8 +37,8 @@ if shopify_shop_select_result: new_js_select_result = test_env_conn.select_one_value(sql=new_js_select_sql) append_js_id = new_shop_select_result['id'] setattr(shopifyIntegrationData, 'append_js_id', append_js_id) - shop_num = len(test_env_conn.select_many_value(sql=shopify_shop_select_sql)) - setattr(shopifyIntegrationData, 'shop_num', shop_num) + shop_num_result = test_env_conn.select_many_value(sql=shopify_shop_select_sql) + setattr(shopifyIntegrationData, 'shop_num', len(shop_num_result)) else: test_env_conn.execute_sql(sql=shopify_shop_insert_sql) new_shop_select_result = test_env_conn.select_one_value(sql=new_shop_select_sql) @@ -60,7 +60,8 @@ else: shop_id = append_shop_id setattr(shopifyIntegrationData, 'append_shop_id', append_shop_id) setattr(shopifyIntegrationData, 'append_js_id', append_js_id) - setattr(shopifyIntegrationData, 'shop_num', 2) + shop_num_result = test_env_conn.select_many_value(sql=shopify_shop_select_sql) + setattr(shopifyIntegrationData, 'shop_num', len(shop_num_result)) setattr(shopifyIntegrationData, 'shop_id', shop_id) setattr(shopifyIntegrationData, 'shop_brand_id', shop_brand_id) setattr(shopifyIntegrationData, 'shop_company_id', shop_company_id) diff --git a/YamlCase/account/account.yaml b/YamlCase/account/account.yaml index c6a4c7fe70f8179a94d97605accfb6d0c034d4c5..71726068abc0e1a7a28e2e91437494a2fb92a442 100644 --- a/YamlCase/account/account.yaml +++ b/YamlCase/account/account.yaml @@ -11,7 +11,7 @@ api2: title: 更改账户名 url: /api/v1/customerService/updateCustomerServiceAccount method: post - data: {"id" : "${userId}" , "localLang" : "zh-CN" ,"name" : "${new_name}" , "profile" : "${picUrl}", "v" : "${v}"} + data: {"id" : "${userId}" , "localLang" : "${origin_language}" ,"name" : "${new_name}" , "profile" : "${picUrl}", "v" : "${v}"} expected: - eq: {"$.code" : 0} - eq: {"$.msg" : "success"} @@ -30,8 +30,8 @@ api4: url: /api/v1/customerService/getCustomerServiceInfo?v=${v} method: get expected: - - eq: { "$.code": 0 } - - eq: { "$.data.name": "${new_name}" } + - eq: {"$.code": 0 } + - eq: {"$.data.name": "${new_name}" } api5: title: 检查用户名 - inbox页面检查资源列表接口 @@ -86,4 +86,3 @@ api10: data: {"id" : "${userId}" , "localLang" : "${origin_language}" ,"name" : "${old_name}", "profile" : "${picUrl}", "v" : "${v}"} expected: - eq: {"$.code" : 0} - - eq: {"$.msg" : "success"} diff --git a/YamlCase/setting/shopifyIntegration.yaml b/YamlCase/setting/shopifyIntegration.yaml index f774cb64dd0299d6f52eb22df3196997ec70ff87..13afec6674a6bf49b4ddb3651805e84d872696ce 100644 --- a/YamlCase/setting/shopifyIntegration.yaml +++ b/YamlCase/setting/shopifyIntegration.yaml @@ -11,7 +11,7 @@ api2: title: 新增shopify - js集成 url: /api/v1/shop/add method: post - data: {"domain": "${append_shop_url}","shopName": "${append_shop_name}","source": 1,"v": "${v}" } + data: {"domain": "${append_js_shop_url}","shopName": "${append_js_shop_name}","source": 1,"v": "${v}" } set_value: {"append_js_id": "$.data.id"} expected: - eq: { "$.code": 0 }