Commit c1dfa4af authored by zhanhuasheng's avatar zhanhuasheng

bugfix

parent a35c1b18
import pytest
from Utils import yaml_handler
from Utils import req_handler
from TestData.setting.notification_test_data import notifycationData
class TestNotifycation:
yaml_path = r'setting/notification.yaml'
yaml_data = yaml_handler.yaml_handler.get_case(yaml_path)
@pytest.mark.flaky(reruns=notifycationData.rerun, reruns_delay=notifycationData.rerun_delay)
@pytest.mark.parametrize('case',yaml_data)
def test_notifycation(self,case):
req_handler.ReqHandler.send_requests(case=case,var_class=notifycationData)
from Utils.global_variate import Global
class notifycationData(Global):
insert_team_name = 'autotest_insert_team'
insert_room_id = 501307576659487524
\ No newline at end of file
from Utils.sql_handler import test_env_conn
from TestData.setting.shopify_integration_test_data import shopifyIntegrationData
shopify_shop_select_sql = f'select * from `shop` where brand_id = {shopifyIntegrationData.brandId} and source in (1,2) and is_delete in (0,2)'
shopify_shop_select_result = test_env_conn.select_many_value(shopify_shop_select_sql)
shopify_shop_num = len(shopify_shop_select_result)
setattr(shopifyIntegrationData, 'shop_num', shopify_shop_num)
\ No newline at end of file
......@@ -47,13 +47,13 @@ api6:
url: /api/v1/customerService/updateCustomerServiceAccount
method: post
data: {"id" : "${userId}" , "localLang" : "${target_language}" , "profile" : "${picUrl}", "v" : "${v}"}
after_sql: /account/account_selectLanguage.py
expected:
- eq: {"$.code" : 0}
api7:
title: 检查设置语言
url: /api/v1/customerService/getCustomerServiceInfo?v=${v}
before_sql: /account/account_selectLanguage.py
method: get
expected:
- eq: {"$.code": 0 }
......
api1:
title: 关闭所有消息通知
url: /api/v1/setting/updateShopSetting
method: post
data: {"item":[{"itemId":102,"itemName":"messageNotifyToAll","itemValue":"0","shopId":"0"},{"itemId":103,"itemName":"messageNotifyToTeam","itemValue":"0","shopId":"0"}],"v":"${v}"}
expected:
- eq: {"$.code": 0}
api2:
title: 检查是否关闭所有消息通知
url: /api/v1/setting/getShopSetting?v=${v}
method: get
expected:
- eq: {"$.code": 0}
- eq: {"$.data.settingInfoMap.mapList.0.settings[?(@.itemId == 102)].itemValue": "0"}
- eq: {"$.data.settingInfoMap.mapList.0.settings[?(@.itemId == 103)].itemValue": "0"}
api3:
title: 开启仅针对分配给您的团队的通知
url: /api/v1/setting/updateShopSetting
method: post
data: {"item":[{"itemId":102,"itemName":"messageNotifyToAll","itemValue":"0","shopId":"0"},{"itemId":103,"itemName":"messageNotifyToTeam","itemValue":"1","shopId":"0"}],"v":"${v}"}
expected:
- eq: {"$.code": 0}
api4:
title: 检查是否开启仅针对分配给您的团队的通知
url: /api/v1/setting/getShopSetting?v=${v}
method: get
expected:
- eq: {"$.code": 0}
- eq: {"$.data.settingInfoMap.mapList.0.settings[?(@.itemId == 102)].itemValue": "0"}
- eq: {"$.data.settingInfoMap.mapList.0.settings[?(@.itemId == 103)].itemValue": "1"}
api5:
title: 开启所有消息通知
url: /api/v1/setting/updateShopSetting
method: post
data: {"item":[{"itemId":102,"itemName":"messageNotifyToAll","itemValue":"1","shopId":"0"},{"itemId":103,"itemName":"messageNotifyToTeam","itemValue":"0","shopId":"0"}],"v":"${v}"}
expected:
- eq: {"$.code": 0}
api6:
title: 检查是否开启所有消息通知
url: /api/v1/setting/getShopSetting?v=${v}
method: get
expected:
- eq: {"$.code": 0}
- eq: {"$.data.settingInfoMap.mapList.0.settings[?(@.itemId == 102)].itemValue": "1"}
- eq: {"$.data.settingInfoMap.mapList.0.settings[?(@.itemId == 103)].itemValue": "0"}
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