Commit 3efe469c authored by zhanhuasheng's avatar zhanhuasheng

bugfix

parent be44ee28
......@@ -7,5 +7,7 @@ class accountData(Global):
target_language = 'zh-CN' #要翻译的语言
old_name = 'zhs' #旧名字
new_name = 'auto_test' #新名字
trans_key = 'account.account'
trans_key = 'settingWidget.businessTitle'
accountData_sql_handler = SqlHandler(address=base_config.get_value('mysql','address'),port=int(base_config.get_value('mysql','port')),account=base_config.get_value('mysql','account'),password=base_config.get_value('mysql','password'))
......@@ -10,4 +10,3 @@ class livechatData(Global):
rate = "[&*{\"reviewContent\":\"<p>Would you mind sharing your feedback on your experience so fa222r?</p>\",\"thumbsReviews\":{\"good\":\"\",\"bad\":\"FeedbackURL\"},\"startReviews\":{\"one_start\":\"FeedbackURL\",\"two_start\":\"FeedbackURL\",\"three_start\":\"FeedbackURL\",\"four_start\":\"\",\"five_start\":\"www.baidu.com\"},\"reviewTitle\":\"How was your chat with {AgentName}222?\",\"reviewChoose\":\"thumbs\",\"askSendReview\":\"true\",\"autoSendReview\":\"false\",\"primaryColor\":\"#2C23E5\"}]"
product = "{\"contentList\":\"<a href=\\\"https://zhs-test.myshopify.com/products/selling-plans-ski-wax\\\" title=\\\"https://zhs-test.myshopify.com/products/selling-plans-ski-wax\\\" data-type=\\\"willdesk-product\\\" target=\\\"_blank\\\" style=\\\"display: flex; background: rgb(255, 255, 255); border-radius: 8px; min-height: 80px; max-height: 150px; min-width: 100px; max-width: 100%; width: 300px; box-sizing: border-box; position: relative; text-decoration: none; padding: 12px 16px; border: 1px solid rgb(231, 233, 236);\\\"><img src=\\\"https://cdn.shopify.com/s/files/1/0690/4551/8586/products/snowboard_wax.png?v=1708331992\\\" style=\\\"width: 110px; height: 110px; max-height: 150px; object-fit: cover; border-radius: 8px; margin-right: 4%; flex-shrink: 0; border: 0.5px solid rgb(231, 233, 236);\\\"><div style=\\\"width: calc(100% - 118px); display: flex; flex-direction: column; position: relative; justify-content: center;\\\"><div style=\\\"width: 100%; max-height: 48px; line-height: 24px; color: rgb(18, 17, 39); font-size: 14px; font-weight: bold; overflow: hidden; display: -webkit-box; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2;\\\">Selling Plans Ski Wax</div></div></a>\",\"attachmentList\":[]}"
coupon = "{\"contentList\":\"<a class=\\\"wd-chat-link\\\" data-type=\\\"willdesk-link\\\" href=\\\"https://zhs-test.myshopify.com/discount/KP7ZYSNMS9ES\\\" contenteditable=\\\"false\\\" style=\\\"margin-right: 8px\\\" target=\\\"_blank\\\">KP7ZYSNMS9ES</a>\",\"attachmentList\":[]}"
\ No newline at end of file
......@@ -21,7 +21,7 @@ setattr(channelData, 'channel_open_room_num_add', len(channel_open_room_select_r
customer_service_select_sql = f'select * from `rel_customerservice_brand` where brand_id = {channelData.brandId} and is_delete = 0 and is_activation = 1'
customer_service_select_result = test_env_conn.select_many_value(sql=customer_service_select_sql)
customer_service_id_list = set([i['customer_service_id'] for i in customer_service_select_result])
customer_service_list_select_sql = f'select * from `customer_service` where id in {tuple(customer_service_id_list)}'
customer_service_list_select_sql = f'select * from `customer_service` where id in {tuple(customer_service_id_list)} and customer_type != 1'
customer_service_list_select_result = test_env_conn.select_many_value(sql=customer_service_list_select_sql)
end = 0
......
from TestData.inbox.ticketInfo_test_data import ticketInfoData
all_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 1 and `is_ignore` = 0 and (`room_type` in (0,1) or (`room_type` = 3 and `ai_handle_status` = 100))'
wait_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 2 and `is_ignore` = 0 and (`room_type` in (0,1) or (`room_type` = 3 and `ai_handle_status` = 100))'
close_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 3 and `is_ignore` = 0 and (`room_type` in (0,1) or (`room_type` = 3 and `ai_handle_status` = 100))'
your_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 1 and `allocation_uid` = {ticketInfoData.userId} and `is_ignore` = 0 and (`room_type` in (0,1) or (`room_type` = 3 and `ai_handle_status` = 100))'
your_wait_ticket_sql = f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 2 and `allocation_uid` = {ticketInfoData.userId} and `is_ignore` = 0 and (`room_type` in (0,1) or (`room_type` = 3 and `ai_handle_status` = 100))'
your_close_ticket_sql = f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 3 and `allocation_uid` = {ticketInfoData.userId} and `is_ignore` = 0 and (`room_type` in (0,1) or (`room_type` = 3 and `ai_handle_status` = 100))'
all_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 1 and `is_ignore` = 0 and (`room_type` in (0,1,3) or (`room_type` = 3 and `ai_handle_status` = 100))'
wait_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 2 and `is_ignore` = 0 and (`room_type` in (0,1,3) or (`room_type` = 3 and `ai_handle_status` = 100))'
close_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 3 and `is_ignore` = 0 and (`room_type` in (0,1,3) or (`room_type` = 3 and `ai_handle_status` = 100))'
your_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 1 and `allocation_uid` = {ticketInfoData.userId} and `is_ignore` = 0 and (`room_type` in (0,1,3) or (`room_type` = 3 and `ai_handle_status` = 100))'
your_wait_ticket_sql = f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 2 and `allocation_uid` = {ticketInfoData.userId} and `is_ignore` = 0 and (`room_type` in (0,1,3) or (`room_type` = 3 and `ai_handle_status` = 100))'
your_close_ticket_sql = f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 3 and `allocation_uid` = {ticketInfoData.userId} and `is_ignore` = 0 and (`room_type` in (0,1,3) or (`room_type` = 3 and `ai_handle_status` = 100))'
all_ticket_num = len(ticketInfoData.ticket_info_db.select_many_value(sql=all_ticket_select_sql))
wait_ticket_num = len(ticketInfoData.ticket_info_db.select_many_value(sql=wait_ticket_select_sql))
......
from Utils.sql_handler import test_env_conn
from TestData.inbox.ticketStatus_test_data import ticketStatusData
all_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `is_ignore` = 0 and (`room_type` in (0,1) or (`room_type` = 3 and `ai_handle_status` = 100))'
your_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `allocation_uid` = {ticketStatusData.userId} and `is_ignore` = 0 and (`room_type` in (0,1) or (`room_type` = 3 and `ai_handle_status` = 100))'
unread_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `read_status` = 1 and `is_ignore` = 0 and (`room_type` in (0,1) or (`room_type` = 3 and `ai_handle_status` = 100))'
unassigned_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `allocation_uid` = 0 and `is_ignore` = 0 and (`room_type` in (0,1) or (`room_type` = 3 and `ai_handle_status` = 100))'
all_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `is_ignore` = 0 and (`room_type` in (0,1,3) or (`room_type` = 3 and `ai_handle_status` = 100))'
your_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `allocation_uid` = {ticketStatusData.userId} and `is_ignore` = 0 and (`room_type` in (0,1,3) or (`room_type` = 3 and `ai_handle_status` = 100))'
unread_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `read_status` = 1 and `is_ignore` = 0 and (`room_type` in (0,1,3) or (`room_type` = 3 and `ai_handle_status` = 100))'
unassigned_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `allocation_uid` = 0 and `is_ignore` = 0 and (`room_type` in (0,1,3) or (`room_type` = 3 and `ai_handle_status` = 100))'
chatbot_ticket_select_sql = f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `is_ignore` = 0 and room_type in (2,3)'
......
......@@ -9,11 +9,11 @@ api1:
- eq: {"$.data.list[?(@.id == '${channel_id}')].name" : "${channel_name}"}
- eq: {"$.data.list[?(@.id == '${channel_id}')].openCount" : "${channel_open_room_num}"}
- eq: {"$.data.list[?(@.id == '${channel_id}')].resourceId" : "${channel_resource_id}"}
- eq: {"$.data.list[?(@.id == '${channel_id}')].memberCount" : "${customer_service_num}"}
- eq: {"$.data.list[?(@.id == '${channel_id}')].members[?(@.id == '${customer_service_id}')].openedRoomCount" : "${customer_channel_open_room_num}"}
- eq: {"$.data.list[?(@.id == '${channel_id}')].members[?(@.id == '${customer_service_id}')].profile" : "${customer_service_image}"}
- eq: {"$.data.list[?(@.id == '${channel_id}')].members[?(@.id == '${customer_service_id}')].name" : "${customer_service_name}"}
- eq: {"$.data.list[?(@.id == '${channel_id}')].members[?(@.id == '${customer_service_id}')].email" : "${customer_service_email}"}
- exec: {"code": "assert len([member for member in res.json()['data']['list'][0]['members'] if member['isActivation'] == 1]) == '${customer_service_num}'"}
api2:
title: 检查渠道对应客服信息
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment