api1: title: 新增快捷回复 url: /api/v1/macro/add method: post data: {"title":"${append_macro_title}","related_id":["${brandId}"],"content":"${append_macro_content}","perm_type":"${append_macro_perm_type}","sorts":1,"v":"${v}"} expected: - eq: {"$.code" : 0} api2: title: 检查快捷回复列表 url: /api/v1/macro/getAllList?v=${v} method: get before_sql: setting/macro/macro_select.py expected: - eq: {"$.code" : 0} - eq: {"$.data.brandList[?(@.macroId == '${macro_id}')].title" : "${macro_title}"} - in: {"$.data.brandList[?(@.macroId == '${append_macro_id}')].content" : "${macro_content_append}"} - eq: {"$.data.brandList[?(@.macroId == '${append_macro_id}')].permType" : "${append_macro_perm_type}"} - eq: {"$.data.brandList[?(@.macroId == '${macro_id}')].sorts" : "${macro_sorts}"} - eq: {"$.data.brandList[?(@.macroId == '${macro_id}')].clicks" : "${macro_clicks}"} - eq: {"$.data.brandList[?(@.macroId == '${macro_id}')].relatedId" : "${macro_brand_id}"} - eq: {"$.data.brandList[?(@.macroId == '${macro_id}')].createByUid" : "${macro_create_by_id}"} - eq: {"$.data.brandList[?(@.macroId == '${macro_id}')].createByName" : "${macro_create_by_name}"} - exec: {"code" : "assert len(res.json()['data']['brandList']) == ${brand_macro_num}"} - exec: {"code" : "assert len(res.json()['data']['userList']) == ${user_macro_num}"} - exec: {"code" : "assert len(res.json()['data']['teamList']) == ${team_macro_num}"} api3: title: 检查inbox处快捷回复列表 url: /api/v1/macro/getList?v=${v} method: get expected: - eq: {"$.code" : 0} - eq: {"$.data.brandList[?(@.macroId == '${append_macro_id}')].title" : "${append_macro_title}"} - in: {"$.data.brandList[?(@.macroId == '${append_macro_id}')].content" : "${macro_content_append}"} - eq: {"$.data.brandList[?(@.macroId == '${append_macro_id}')].brandId" : "${brandId}"} - eq: {"$.data.brandList[?(@.macroId == '${append_macro_id}')].relatedId" : ["${brandId}"]} api4: title: 更新快捷回复 url: /api/v1/macro/edit method: post data: {"macro_id":"${append_macro_id}","title":"${update_macro_title}","related_id":["${userId}"],"content":"${update_macro_content}","perm_type":"${update_macro_perm_type}","v":"${v}"} expected: - eq: {"$.code": 0 } api5: title: 选中macro url: /api/v1/macro/logClick method: post data: {"macro_id":"${append_macro_id}","v":"${v}"} expected: - eq: {"$.code" : 0} api6: title: 检查更新后的快捷回复列表 url: /api/v1/macro/getAllList?v=${v} method: get expected: - eq: {"$.code" : 0} - eq: {"$.data.userList[?(@.macroId == '${append_macro_id}')].title" : "${update_macro_title}"} - in: {"$.data.userList[?(@.macroId == '${append_macro_id}')].content" : "${macro_content_update}"} - eq: {"$.data.userList[?(@.macroId == '${append_macro_id}')].clicks": 1} - eq: {"$.data.userList[?(@.macroId == '${append_macro_id}')].relatedId" : ["${userId}"]} - eq: {"$.data.userList[?(@.macroId == '${append_macro_id}')].permType" : "${update_macro_perm_type}"} - not_in: {"$.data.brandList[*].macroId": "${append_macro_id}"} api7: title: 检查inbox处快捷回复列表 url: /api/v1/macro/getList?v=${v} method: get expected: - eq: {"$.code" : 0} - eq: {"$.data.userList[?(@.macroId == '${append_macro_id}')].title" : "${update_macro_title}"} - in: {"$.data.userList[?(@.macroId == '${append_macro_id}')].content" : "${macro_content_update}"} - eq: {"$.data.userList[?(@.macroId == '${append_macro_id}')].clicks": 1} - eq: {"$.data.userList[?(@.macroId == '${append_macro_id}')].brandId" : "${brandId}"} - eq: {"$.data.userList[?(@.macroId == '${append_macro_id}')].relatedId" : ["${userId}"]} - eq: {"$.data.userList[?(@.macroId == '${append_macro_id}')].permType" : "${update_macro_perm_type}"} - not_in: {"$.data.brandList[*].macroId": "${append_macro_id}"} api8: title: 删除快捷回复 url: /api/v1/macro/del method: post data: {"macro_id":"${append_macro_id}","v":"${v}"} expected: - eq: {"$.code" : 0} api9: title: 检查快捷回复是否删除成功 - 设置页快捷回复列表 url: /api/v1/macro/getAllList?v=${v} method: get expected: - eq: {"$.code": 0} - not_in: {"$.data.brandList[*].macroId": "${append_macro_id}"} - not_in: {"$.data.userList[*].macroId": "${append_macro_id}"} - not_in: {"$.data.teamList[*].macroId": "${append_macro_id}"} api10: title: 检查快捷回复是否删除成功 - inbox页快捷回复列表 url: /api/v1/macro/getList?v=${v} method: get expected: - eq: {"$.code": 0} - not_in: {"$.data.brandList[*].macroId": "${append_macro_id}"} - not_in: {"$.data.userList[*].macroId": "${append_macro_id}"} - not_in: {"$.data.teamList[*].macroId": "${append_macro_id}"}