api1: title: 检查列表文章数量 url: /api/v1/helpcenter/buser/GetFaqList?v=${v} method: get before_sql: FAQ/article_list_select.py expected: - eq: {"$.code": 0} - exec: {"code" : "assert len(res.json()['data']['articleList']) == ${all_article_num}"} - exec: {"code" : "assert len([article for article in res.json()['data']['articleList'] if article['shopId'] == ${shopId}]) == ${shop_article_num}"} api2: title: 检查文章信息 url: /api/v1/helpcenter/buser/GetFaqList?v=${v} method: get expected: - eq: {"$.code": 0} - eq: {"$.data.articleList[?(@.id == '${article_id}')].title": "${article_title}"} - eq: {"$.data.articleList[?(@.id == '${article_id}')].articleCategoryId": "${article_category_id}"} - eq: {"$.data.articleList[?(@.id == '${article_id}')].sort": "${article_sort}"} - eq: {"$.data.articleList[?(@.id == '${article_id}')].content": "${article_content}"} - eq: {"$.data.articleList[?(@.id == '${article_id}')].isPublish": "${article_is_published}"} - eq: {"$.data.articleList[?(@.id == '${article_id}')].isPopular": "${article_is_popular}"} - eq: {"$.data.articleList[?(@.id == '${article_id}')].metaTitle": "${article_meta_title}"} - eq: {"$.data.articleList[?(@.id == '${article_id}')].metaDescription": "${article_meta_description}"} - eq: {"$.data.articleList[?(@.id == '${article_id}')].views": "${article_view_count}"} - eq: {"$.data.articleList[?(@.id == '${article_id}')].articleEvaluateGood": "${article_evaluate_good}"} - eq: {"$.data.articleList[?(@.id == '${article_id}')].articleEvaluateBad": "${article_evaluate_bad}"} api3: title: 设置文章为隐藏状态 url: /api/v1/faq/updatePublish method: post data: {"isPublish":2,"id":"${article_id}","v":"${v}"} expected: - eq: {"$.code": 0} api4: title: 设置文章为非特色文章 url: /api/v1/faq/updatePopular before_sql: FAQ/popular_article_update.py method: post data: {"isPopular":2,"id":"${article_id}","v":"${v}"} expected: - eq: {"$.code": 0} api5: title: 检查文章信息 url: /api/v1/helpcenter/buser/GetFaqList?v=${v} method: get expected: - eq: { "$.code": 0} - eq: {"$.data.articleList[?(@.id == '${article_id}')].isPublish": 2} - eq: {"$.data.articleList[?(@.id == '${article_id}')].isPopular": 2} api6: title: C端-检查文章是否隐藏 url: /api/v1/client/faq/getHelpCenter?shopId=${shopId}&v=${v} method: get expected: - eq: {"$.code": 0} - exec: {"code" : "assert ${article_id} not in [article['id'] for article in res.json()['data']['list']]"} api7: title: C端-检查文章是否为非特色文章 url: /api/v1/client/faq/getPopularFaq?shopId=${shopId}&v=${v} method: get expected: - eq: {"$.code": 0} - exec: {"code" : "assert ${article_id} not in [article['id'] for article in res.json()['data']['list']]"} api8: title: 设置文章为公开状态 url: /api/v1/faq/updatePublish method: post data: {"isPublish":1,"id":"${article_id}","v":"${v}"} expected: - eq: {"$.code": 0} api9: title: 设置文章为特色文章 url: /api/v1/faq/updatePopular before_sql: FAQ/popular_article_update.py method: post data: {"isPopular":1,"id":"${article_id}","v":"${v}"} expected: - eq: {"$.code": 0} api10: title: 检查文章信息 url: /api/v1/helpcenter/buser/GetFaqList?v=${v} method: get expected: - eq: { "$.code": 0} - eq: {"$.data.articleList[?(@.id == '${article_id}')].isPublish": 1} - eq: {"$.data.articleList[?(@.id == '${article_id}')].isPopular": 1} api11: title: C端-检查是否特色文章 url: /api/v1/client/faq/getPopularFaq?shopId=${shopId}&v=${v} method: get set_value: {"faqUrl" : "$.data.list[?(@.id == '${article_id}')].faqUrl"} expected: - eq: {"$.code": 0} - eq: {"$.data.list[?(@.id == '${article_id}')].articleCategoryId" : "${article_category_id}"} - eq: {"$.data.list[?(@.id == '${article_id}')].content" : "${article_content}"} - eq: {"$.data.list[?(@.id == '${article_id}')].title" : "${article_title}"} api12: title: C端-检查是否公开文章 url: /api/v1/client/faq/getHelpCenter?shopId=${shopId}&v=${v} method: get expected: - eq: {"$.code": 0 } - eq: {"$.data.list[?(@.id == '${article_category_id}')].articleList[?(@.id == '${article_id}')].title" : "${article_title}"} - eq: {"$.data.list[?(@.id == '${article_category_id}')].articleList[?(@.id == '${article_id}')].sort": "${article_sort}"} api13: title: 访问文章,增加阅读量 url: /api/v1/client/faq/getFaqArticle?id=${article_id}&shopId=${shopId}&v=${v} method: get expected: - eq: {"$.code": 0} api14: title: 点赞文章 url: /api/v1/faq/articleEvaluation method: post data: {"evaluationType":1,"id":"${article_id}"} expected: - eq: {"$.code": 0} api15: title: 差评文章 url: /api/v1/faq/articleEvaluation method: post data: {"evaluationType":2,"id":"${article_id}"} expected: - eq: {"$.code": 0} api16: title: 检查文章信息 url: /api/v1/helpcenter/buser/GetFaqList?v=${v} method: get expected: - eq: {"$.code": 0} - eq: {"$.data.articleList[?(@.id == '${article_id}')].articleEvaluateBad": "${article_evaluate_bad_add}"} - eq: {"$.data.articleList[?(@.id == '${article_id}')].articleEvaluateGood": "${article_evaluate_good_add}"} - eq: {"$.data.articleList[?(@.id == '${article_id}')].views": "${article_view_count_add}"}